Commit ef2e5bb8 authored by Abdullah Gharaibeh's avatar Abdullah Gharaibeh

Addressed reviewers comments.

parent 71b1565f
......@@ -347,14 +347,16 @@ func TestHTTPProbeChecker_HostHeaderPreservedAfterRedirect(t *testing.T) {
headers := http.Header{}
headers.Add("Host", test.hostHeader)
t.Run(desc+"local", func(t *testing.T) {
prober := New(false)
followNonLocalRedirects := false
prober := New(followNonLocalRedirects)
target, err := url.Parse(server.URL + "/redirect")
require.NoError(t, err)
result, _, _ := prober.Probe(target, headers, wait.ForeverTestTimeout)
assert.Equal(t, test.expectedResult, result)
})
t.Run(desc+"nonlocal", func(t *testing.T) {
prober := New(true)
followNonLocalRedirects := true
prober := New(followNonLocalRedirects)
target, err := url.Parse(server.URL + "/redirect")
require.NoError(t, err)
result, _, _ := prober.Probe(target, headers, wait.ForeverTestTimeout)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment