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:
authorVladimir Shushlin <v.shushlin@gmail.com>2021-12-06 16:24:20 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2021-12-07 12:07:31 +0300
commit0ab62643e5b61daf82ecf5a2c1ed196796059514 (patch)
tree87c3aad7e854a40b86ca1c0578d20135965cddd4 /test/acceptance/auth_test.go
parentd228c13c76d11091f8514e40940dc7df1b633e5a (diff)
refactor: enable unparam in .golangci.yml
and fix offences
Diffstat (limited to 'test/acceptance/auth_test.go')
-rw-r--r--test/acceptance/auth_test.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/acceptance/auth_test.go b/test/acceptance/auth_test.go
index 49d2806d..ad5c343a 100644
--- a/test/acceptance/auth_test.go
+++ b/test/acceptance/auth_test.go
@@ -27,7 +27,7 @@ func TestWhenAuthIsEnabledPrivateWillRedirectToAuthorize(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpsListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -63,7 +63,7 @@ func TestWhenAuthDeniedWillCauseUnauthorized(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpsListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -78,7 +78,7 @@ func TestWhenLoginCallbackWithWrongStateShouldFail(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpsListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -100,7 +100,7 @@ func TestWhenLoginCallbackWithUnencryptedCode(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpsListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -133,7 +133,7 @@ func TestAccessControlUnderCustomDomain(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -214,7 +214,7 @@ func TestCustomErrorPageWithAuth(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -323,7 +323,7 @@ func TestAccessControlUnderCustomDomainWithHTTPSProxy(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{proxyListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -390,7 +390,7 @@ func TestAccessControlGroupDomain404RedirectsAuth(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -409,7 +409,7 @@ func TestAccessControlProject404DoesNotRedirect(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{httpListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -568,7 +568,7 @@ func TestHijackedCode(t *testing.T) {
RunPagesProcess(t,
withListeners([]ListenSpec{proxyListener}),
withArguments([]string{
- "-config=" + defaultAuthConfigWith(t),
+ "-config=" + defaultAuthConfig(t),
}),
)
@@ -643,13 +643,13 @@ func getValidCookieAndState(t *testing.T, domain string) (string, string) {
return cookie, state
}
-func defaultAuthConfigWith(t *testing.T, configs ...string) string {
+func defaultAuthConfig(t *testing.T) string {
t.Helper()
- configs = append(configs,
+ configs := []string{
"gitlab-server=https://public-gitlab-auth.com",
"auth-redirect-uri=https://projects.gitlab-example.com/auth",
- )
+ }
configFile := defaultConfigFileWith(t, configs...)