summaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index 80a42efb5c..e9b46ffcb9 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -42,7 +42,7 @@ type NilResponseRecorder struct {
}
func (n *NilResponseRecorder) Write(b []byte) (int, error) {
- n.Length = n.Length + len(b)
+ n.Length += len(b)
return len(b), nil
}
@@ -141,8 +141,7 @@ func initIntegrationTest() {
if err != nil {
log.Fatalf("sql.Open: %v", err)
}
- rows, err := db.Query(fmt.Sprintf("SELECT 1 FROM pg_database WHERE datname = '%s'",
- models.DbCfg.Name))
+ rows, err := db.Query(fmt.Sprintf("SELECT 1 FROM pg_database WHERE datname = '%s'", models.DbCfg.Name))
if err != nil {
log.Fatalf("db.Query: %v", err)
}
@@ -210,7 +209,7 @@ func (s *TestSession) MakeRequest(t testing.TB, req *http.Request, expectedStatu
resp := MakeRequest(t, req, expectedStatus)
ch := http.Header{}
- ch.Add("Cookie", strings.Join(resp.HeaderMap["Set-Cookie"], ";"))
+ ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
cr := http.Request{Header: ch}
s.jar.SetCookies(baseURL, cr.Cookies())
@@ -226,7 +225,7 @@ func (s *TestSession) MakeRequestNilResponseRecorder(t testing.TB, req *http.Req
resp := MakeRequestNilResponseRecorder(t, req, expectedStatus)
ch := http.Header{}
- ch.Add("Cookie", strings.Join(resp.HeaderMap["Set-Cookie"], ";"))
+ ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
cr := http.Request{Header: ch}
s.jar.SetCookies(baseURL, cr.Cookies())
@@ -266,7 +265,7 @@ func loginUserWithPassword(t testing.TB, userName, password string) *TestSession
resp = MakeRequest(t, req, http.StatusFound)
ch := http.Header{}
- ch.Add("Cookie", strings.Join(resp.HeaderMap["Set-Cookie"], ";"))
+ ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
cr := http.Request{Header: ch}
session := emptyTestSession(t)