Skip to content

Commit

Permalink
retry
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannchaudet committed Sep 13, 2024
1 parent b691bf5 commit b3523d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ group :development do
gem "pry", "~> 0.10"
gem "pry-byebug"
gem "rspec", "~> 3.0"
gem "rspec-retry", "~> 0.6"
gem "rubocop", "~> 0.52"
gem "webmock", "~> 3.8"
end
Expand Down
4 changes: 2 additions & 2 deletions spec/github_pages_health_check/domain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def stop
@servers.each(&:stop)
end

it "it does not follow anything other than http/https by default", :retry do
it "it does not follow anything other than http/https by default", :retry => 3 do
Typhoeus.get(
"http://localhost:#{@servers[1].port}",
GitHubPages::HealthCheck.typhoeus_options
Expand All @@ -733,7 +733,7 @@ def stop
expect(@out).to_not include("HIT #{@servers[0].port}")
end

it "it follows ftp if requested (negative test)", :retry do
it "it follows ftp if requested (negative test)", :retry => 3 do
Typhoeus.get(
"http://localhost:#{@servers[1].port}",
GitHubPages::HealthCheck.typhoeus_options.merge(:redir_protocols => %i[http https ftp])
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
require "bundler/setup"
require "webmock/rspec"
require "pry-byebug"
require "rspec/retry"

require_relative "../lib/github-pages-health-check"

WebMock.disable_net_connect!(:allow => "localhost")
Expand Down

0 comments on commit b3523d9

Please sign in to comment.