Skip to content

Commit

Permalink
Remove other negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannchaudet committed Sep 13, 2024
1 parent e97b31d commit 437c0e4
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions spec/github_pages_health_check/domain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -674,18 +674,6 @@
context "Protocol redirections" do
let(:log_file) { "/tmp/bad-redirection#{ENV["RUBY_VERSION"]}.log" }

it "it follows ftp if requested" do
# Make a real request to a local server started with /script/test-redirections
Typhoeus.get(
"http://localhost:9988",
GitHubPages::HealthCheck.typhoeus_options.merge(:redir_protocols => %i[http https ftp])
)

# Confirm port 9986 was hit (it is the FTP one)
sleep(0.1) until File.exist?(log_file)
expect(File.read(log_file).strip).to eq("HIT 9988 HIT 9987 HIT 9986")
end

it "it does not follow anything other than http/https by default" do
# Make a real request to a local server started with /script/test-redirections
Typhoeus.get(
Expand All @@ -694,7 +682,7 @@
)

# Confirm port 9986 was NOT hit (it is the FTP one)
sleep(0.1) until File.exist?(log_file)
expect(File.exist?(log_file)).to be_truthy
expect(File.read(log_file).strip).to eq("HIT 9988 HIT 9987")
end
end
Expand Down

0 comments on commit 437c0e4

Please sign in to comment.