Auth: Modify scopes field value in tests to be comma separated (SSO Settings API) (#79759)

modify scopes field value to be comma separated
This commit is contained in:
Mihai Doarna 2023-12-20 17:43:18 +02:00 committed by GitHub
parent 824e0f9ce8
commit 0f4cd3090b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")