]> git.openstreetmap.org Git - chef.git/blob - test/integration/community/inspec/http_spec.rb
community: ensure acme redirect includes token
[chef.git] / test / integration / community / inspec / http_spec.rb
1 describe port(80) do
2   it { should be_listening }
3   its("protocols") { should cmp %w[tcp tcp6] }
4 end
5
6 describe port(443) do
7   it { should be_listening }
8   its("protocols") { should cmp %w[tcp tcp6] }
9 end
10
11 describe http("http://localhost/.well-known/acme-challenge/abc",
12               :headers => { "Host" => "community.openstreetmap.org" },
13               :allow_redirects => false) do
14   its("status") { should cmp 301 }
15   its("headers.Location") { should cmp %r{^http://acme\.openstreetmap\.org/\.well-known/acme-challenge/abc} }
16 end