Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-05-25 06:21:48 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-06-01 03:39:04 +0300
commitc557de8d5e324da35d55fbb763a00574ff8f47e9 (patch)
treed65ef36d3da273efe8c4fb403e72fe67cee5cfbf /acceptance_test.go
parent35c937be058d70d1e4fd4dd49de329dc32936f73 (diff)
Enable the remaining linters
- ineffassign - misspell - structcheck - typecheck - unconvert - unused - varcheck - whitespace
Diffstat (limited to 'acceptance_test.go')
-rw-r--r--acceptance_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/acceptance_test.go b/acceptance_test.go
index 4a1b3028..1cd854d3 100644
--- a/acceptance_test.go
+++ b/acceptance_test.go
@@ -291,7 +291,6 @@ func TestKnownHostWithPortReturns200(t *testing.T) {
rsp.Body.Close()
require.Equal(t, http.StatusOK, rsp.StatusCode)
}
-
}
func TestHttpToHttpsRedirectDisabled(t *testing.T) {
@@ -576,7 +575,6 @@ func TestArtifactProxyRequest(t *testing.T) {
t.Log("Artifact server URL", artifactServerURL)
for _, tt := range tests {
-
t.Run(tt.name, func(t *testing.T) {
teardown := RunPagesProcessWithSSLCertFile(
t,
@@ -674,7 +672,6 @@ func TestPrivateArtifactProxyRequest(t *testing.T) {
t.Log("Artifact server URL", artifactServerURL)
for _, tt := range tests {
-
t.Run(tt.name, func(t *testing.T) {
configFile, cleanup := defaultConfigFileWith(t,
"artifacts-server="+artifactServerURL,
@@ -731,6 +728,7 @@ func TestPrivateArtifactProxyRequest(t *testing.T) {
// Request auth callback in project domain
authrsp, err = GetRedirectPageWithCookie(t, httpsListener, url.Host, url.Path+"?"+url.RawQuery, cookie)
+ require.NoError(t, err)
// server returns the ticket, user will be redirected to the project page
require.Equal(t, http.StatusFound, authrsp.StatusCode)
@@ -847,6 +845,7 @@ func TestWhenAuthIsEnabledPrivateWillRedirectToAuthorize(t *testing.T) {
url, err := url.Parse(rsp.Header.Get("Location"))
require.NoError(t, err)
rsp, err = GetRedirectPage(t, httpsListener, url.Host, url.Path+"?"+url.RawQuery)
+ require.NoError(t, err)
require.Equal(t, http.StatusFound, rsp.StatusCode)
require.Equal(t, 1, len(rsp.Header["Location"]))
@@ -1074,7 +1073,6 @@ func sleepIfAuthorized(t *testing.T, authorization string, w http.ResponseWriter
} else {
w.WriteHeader(http.StatusNotFound)
}
-
}
func TestAccessControlUnderCustomDomain(t *testing.T) {
@@ -1139,6 +1137,7 @@ func TestAccessControlUnderCustomDomain(t *testing.T) {
// Fetch page in custom domain
authrsp, err = GetRedirectPageWithCookie(t, httpListener, "private.domain.com", "/", cookie)
+ require.NoError(t, err)
require.Equal(t, http.StatusOK, authrsp.StatusCode)
}
@@ -1204,6 +1203,7 @@ func TestAccessControlUnderCustomDomainWithHTTPSProxy(t *testing.T) {
// Fetch page in custom domain
authrsp, err = GetProxyRedirectPageWithCookie(t, proxyListener, "private.domain.com", "/",
cookie, true)
+ require.NoError(t, err)
require.Equal(t, http.StatusOK, authrsp.StatusCode)
}
@@ -1337,7 +1337,6 @@ func TestAccessControl(t *testing.T) {
}
for _, tt := range tests {
-
t.Run(tt.name, func(t *testing.T) {
teardown := RunPagesProcessWithAuthServerWithSSL(t, *pagesBinary, listeners, "", certFile, testServer.URL)
defer teardown()
@@ -1380,6 +1379,7 @@ func TestAccessControl(t *testing.T) {
// Request auth callback in project domain
authrsp, err = GetRedirectPageWithCookie(t, httpsListener, url.Host, url.Path+"?"+url.RawQuery, cookie)
+ require.NoError(t, err)
// server returns the ticket, user will be redirected to the project page
require.Equal(t, http.StatusFound, authrsp.StatusCode)