From 0f4cd3090b93c14932cf177a9c864d1119056fb6 Mon Sep 17 00:00:00 2001 From: Mihai Doarna Date: Wed, 20 Dec 2023 17:43:18 +0200 Subject: [PATCH] Auth: Modify scopes field value in tests to be comma separated (SSO Settings API) (#79759) modify scopes field value to be comma separated --- pkg/services/ssosettings/strategies/oauth_strategy_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/ssosettings/strategies/oauth_strategy_test.go b/pkg/services/ssosettings/strategies/oauth_strategy_test.go index 4250abf339b..378ed5bf66c 100644 --- a/pkg/services/ssosettings/strategies/oauth_strategy_test.go +++ b/pkg/services/ssosettings/strategies/oauth_strategy_test.go @@ -20,7 +20,7 @@ var ( auto_login = true client_id = test_client_id client_secret = test_client_secret - scopes = ["openid", "profile", "email"] + scopes = openid, profile, email empty_scopes = false email_attribute_name = email:primary email_attribute_path = email @@ -61,7 +61,7 @@ var ( "auto_login": true, "client_id": "test_client_id", "client_secret": "test_client_secret", - "scopes": "[\"openid\", \"profile\", \"email\"]", + "scopes": "openid, profile, email", "empty_scopes": false, "email_attribute_name": "email:primary", "email_attribute_path": "email", @@ -151,7 +151,7 @@ func setupEnvVars(t *testing.T) { t.Setenv("GF_AUTH_GENERIC_OAUTH_AUTO_LOGIN", "true") t.Setenv("GF_AUTH_GENERIC_OAUTH_CLIENT_ID", "test_client_id") t.Setenv("GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET", "test_client_secret") - t.Setenv("GF_AUTH_GENERIC_OAUTH_SCOPES", `["openid", "profile", "email"]`) + t.Setenv("GF_AUTH_GENERIC_OAUTH_SCOPES", "openid, profile, email") t.Setenv("GF_AUTH_GENERIC_OAUTH_EMPTY_SCOPES", "") t.Setenv("GF_AUTH_GENERIC_OAUTH_EMAIL_ATTRIBUTE_NAME", "email:primary") t.Setenv("GF_AUTH_GENERIC_OAUTH_EMAIL_ATTRIBUTE_PATH", "email")