From c5ae3ebbfd62fdeee6621c4e2dd0459b34ba64ef Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Fri, 21 Jun 2019 10:08:04 +0100
Subject: [PATCH] Fix also the httpsso and proxy tests

---
 httpsso/handler_test.go | 8 ++++----
 proxy/proxy_test.go     | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/httpsso/handler_test.go b/httpsso/handler_test.go
index cccec5f..d6019a3 100644
--- a/httpsso/handler_test.go
+++ b/httpsso/handler_test.go
@@ -46,8 +46,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
 	if err != nil {
 		t.Fatalf("Get(%s): %v", path, err)
 	}
-	if resp.StatusCode != http.StatusFound {
-		t.Fatalf("Get(%s) expected 302, got %d", path, resp.StatusCode)
+	if resp.StatusCode != http.StatusTemporaryRedirect {
+		t.Fatalf("Get(%s) expected 307, got %d", path, resp.StatusCode)
 	}
 	loc, err := url.Parse(resp.Header.Get("Location"))
 	if err != nil {
@@ -78,8 +78,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
 	if err != nil {
 		t.Fatal("Get(/sso_login):", err)
 	}
-	if resp.StatusCode != http.StatusFound {
-		t.Fatalf("Get(/sso_login) expected 302, got %d", resp.StatusCode)
+	if resp.StatusCode != http.StatusTemporaryRedirect {
+		t.Fatalf("Get(/sso_login) expected 307, got %d", resp.StatusCode)
 	}
 	resp.Body.Close()
 	if s := resp.Header.Get("Location"); s != destURL {
diff --git a/proxy/proxy_test.go b/proxy/proxy_test.go
index 1fedce4..55fabeb 100644
--- a/proxy/proxy_test.go
+++ b/proxy/proxy_test.go
@@ -99,8 +99,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
 	if err != nil {
 		t.Fatalf("Get(%s): %v", path, err)
 	}
-	if resp.StatusCode != http.StatusFound {
-		t.Fatalf("Get(%s) expected 302, got %d", path, resp.StatusCode)
+	if resp.StatusCode != http.StatusTemporaryRedirect {
+		t.Fatalf("Get(%s) expected 307, got %d", path, resp.StatusCode)
 	}
 	loc, err := url.Parse(resp.Header.Get("Location"))
 	if err != nil {
@@ -131,8 +131,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
 	if err != nil {
 		t.Fatal("Get(/sso_login):", err)
 	}
-	if resp.StatusCode != http.StatusFound {
-		t.Fatalf("Get(/sso_login) expected 302, got %d", resp.StatusCode)
+	if resp.StatusCode != http.StatusTemporaryRedirect {
+		t.Fatalf("Get(/sso_login) expected 307, got %d", resp.StatusCode)
 	}
 	resp.Body.Close()
 	if s := resp.Header.Get("Location"); s != destURL {
-- 
GitLab