Closed thbar closed 2 years ago
Interesting. I don't remember seeing that in the past, but unfortunately I haven't really used this project in a few years and I'd consider it unsupported at this point.
I'll leave this issue open though, and would gladly accept and merge a pull request to fix this.
Thanks for taking the time to make me (and other users) aware!
One fix that appears to be working is this one: use subject
to delay the evaluation.
describe http_get(80, target_host, '/', 10, 'http', false) do
it { should be_redirected_to "https://#{target_host}/" }
its(:status) { should eq 301 }
end
describe "http access" do
subject { http_get(80, target_host, '/', 10, 'http', false) }
it { should be_redirected_to "https://#{target_host}/" }
its(:status) { should eq 301 }
end
I'll go ahead and close the issue!
While provisioning a new machine, I have noticed that I use
http_get
and the server is not yet available (e.g.nginx
not installed), instead of just failing this group of test, it will cause the whole ServerSpec suite to crash.I presume this is because some connection occurs at
initialize
time.Not a huge problem but I thought I'd report it, still!