Skip to content
Snippets Groups Projects
Commit c5ae3ebb authored by ale's avatar ale
Browse files

Fix also the httpsso and proxy tests

parent 41319c74
No related branches found
No related tags found
1 merge request!3Use 307 redirects
Pipeline #3514 passed
...@@ -46,8 +46,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s ...@@ -46,8 +46,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
if err != nil { if err != nil {
t.Fatalf("Get(%s): %v", path, err) t.Fatalf("Get(%s): %v", path, err)
} }
if resp.StatusCode != http.StatusFound { if resp.StatusCode != http.StatusTemporaryRedirect {
t.Fatalf("Get(%s) expected 302, got %d", path, resp.StatusCode) t.Fatalf("Get(%s) expected 307, got %d", path, resp.StatusCode)
} }
loc, err := url.Parse(resp.Header.Get("Location")) loc, err := url.Parse(resp.Header.Get("Location"))
if err != nil { if err != nil {
...@@ -78,8 +78,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s ...@@ -78,8 +78,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
if err != nil { if err != nil {
t.Fatal("Get(/sso_login):", err) t.Fatal("Get(/sso_login):", err)
} }
if resp.StatusCode != http.StatusFound { if resp.StatusCode != http.StatusTemporaryRedirect {
t.Fatalf("Get(/sso_login) expected 302, got %d", resp.StatusCode) t.Fatalf("Get(/sso_login) expected 307, got %d", resp.StatusCode)
} }
resp.Body.Close() resp.Body.Close()
if s := resp.Header.Get("Location"); s != destURL { if s := resp.Header.Get("Location"); s != destURL {
......
...@@ -99,8 +99,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s ...@@ -99,8 +99,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
if err != nil { if err != nil {
t.Fatalf("Get(%s): %v", path, err) t.Fatalf("Get(%s): %v", path, err)
} }
if resp.StatusCode != http.StatusFound { if resp.StatusCode != http.StatusTemporaryRedirect {
t.Fatalf("Get(%s) expected 302, got %d", path, resp.StatusCode) t.Fatalf("Get(%s) expected 307, got %d", path, resp.StatusCode)
} }
loc, err := url.Parse(resp.Header.Get("Location")) loc, err := url.Parse(resp.Header.Get("Location"))
if err != nil { if err != nil {
...@@ -131,8 +131,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s ...@@ -131,8 +131,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
if err != nil { if err != nil {
t.Fatal("Get(/sso_login):", err) t.Fatal("Get(/sso_login):", err)
} }
if resp.StatusCode != http.StatusFound { if resp.StatusCode != http.StatusTemporaryRedirect {
t.Fatalf("Get(/sso_login) expected 302, got %d", resp.StatusCode) t.Fatalf("Get(/sso_login) expected 307, got %d", resp.StatusCode)
} }
resp.Body.Close() resp.Body.Close()
if s := resp.Header.Get("Location"); s != destURL { if s := resp.Header.Get("Location"); s != destURL {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment