Merge pull request #4901 from reitermarkus/rspec-retry

Retry all specs with `:needs_network`.
This commit is contained in:
Markus Reiter 2018-09-14 17:38:56 +02:00 committed by GitHub
commit 04e3344f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View File

@ -25,7 +25,7 @@ describe "brew search", :integration_test do
.and be_a_success
end
it "falls back to a GitHub tap search when no formula is found", :needs_network, retry: 3 do
it "falls back to a GitHub tap search when no formula is found", :needs_network do
setup_remote_tap "homebrew/cask"
expect { brew "search", "homebrew/cask/firefox" }

View File

@ -1,4 +1,4 @@
describe "brew services", :integration_test, :needs_macos, :needs_network, retry: 3 do
describe "brew services", :integration_test, :needs_macos, :needs_network do
it "allows controlling services" do
setup_remote_tap "homebrew/services"

View File

@ -1,5 +1,5 @@
describe "brew pull", :integration_test do
it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network, retry: 3 do
it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network do
CoreTap.instance.path.cd do
system "git", "init"
system "git", "checkout", "-b", "new-branch"

View File

@ -84,6 +84,10 @@ RSpec.configure do |config|
skip "Requires network connection." unless ENV["HOMEBREW_TEST_ONLINE"]
end
config.around(:each, :needs_network) do |example|
example.run_with_retry retry: 3, retry_wait: 1
end
config.before(:each, :needs_svn) do
skip "subversion not installed." unless which "svn"
end