tests: handle file leaks and SVN test prompt.
- Ignore files that are generated by `brew tests` - Make the SVN tests work without prompting for GitHub's SSL certificate
This commit is contained in:
parent
5869842e7e
commit
ec9e45a8f0
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,6 +18,8 @@
|
||||
/Library/Homebrew/test/bin
|
||||
/Library/Homebrew/test/coverage
|
||||
/Library/Homebrew/test/fs_leak_log
|
||||
/Library/Homebrew/test/.gem
|
||||
/Library/Homebrew/test/.subversion
|
||||
/Library/Homebrew/tmp
|
||||
/Library/Homebrew/.npmignore
|
||||
/Library/LinkedKegs
|
||||
|
||||
@ -32,7 +32,9 @@ describe Utils do
|
||||
|
||||
it "returns true when remote exists", :needs_network, :needs_svn do
|
||||
HOMEBREW_CACHE.cd do
|
||||
system HOMEBREW_SHIMS_PATH/"scm/svn", "checkout", "https://github.com/Homebrew/install"
|
||||
system HOMEBREW_SHIMS_PATH/"scm/svn", "checkout",
|
||||
"--non-interactive", "--trust-server-cert", "--quiet",
|
||||
"https://github.com/Homebrew/install"
|
||||
end
|
||||
|
||||
expect(described_class).to be_svn_remote_exists(HOMEBREW_CACHE/"install")
|
||||
|
||||
@ -10,6 +10,7 @@ module Utils
|
||||
|
||||
def self.svn_remote_exists?(url)
|
||||
return true unless svn_available?
|
||||
quiet_system "svn", "ls", url, "--depth", "empty"
|
||||
ssl_args = ["--non-interactive", "--trust-server-cert"] if ENV["HOMEBREW_TEST_ONLINE"]
|
||||
quiet_system "svn", "ls", url, "--depth", "empty", *ssl_args
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user