Skip to content

Commit c6b3b24

Browse files
committed
fix tests
1 parent 65b08c8 commit c6b3b24

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

codersdk/deployment_test.go

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -396,27 +396,28 @@ func TestExternalAuthYAMLConfig(t *testing.T) {
396396
return string(data)
397397
}
398398
githubCfg := codersdk.ExternalAuthConfig{
399-
Type: "github",
400-
ClientID: "client_id",
401-
ClientSecret: "client_secret",
402-
ID: "id",
403-
AuthURL: "https://example.com/auth",
404-
TokenURL: "https://example.com/token",
405-
ValidateURL: "https://example.com/validate",
406-
RevokeURL: "https://example.com/revoke",
407-
AppInstallURL: "https://example.com/install",
408-
AppInstallationsURL: "https://example.com/installations",
409-
NoRefresh: true,
410-
Scopes: []string{"user:email", "read:org"},
411-
ExtraTokenKeys: []string{"extra", "token"},
412-
DeviceFlow: true,
413-
DeviceCodeURL: "https://example.com/device",
414-
Regex: "^https://example.com/.*$",
415-
DisplayName: "GitHub",
416-
DisplayIcon: "/static/icons/github.svg",
417-
MCPURL: "https://api.githubcopilot.com/mcp/",
418-
MCPToolAllowRegex: ".*",
419-
MCPToolDenyRegex: "create_gist",
399+
Type: "github",
400+
ClientID: "client_id",
401+
ClientSecret: "client_secret",
402+
ID: "id",
403+
AuthURL: "https://example.com/auth",
404+
TokenURL: "https://example.com/token",
405+
ValidateURL: "https://example.com/validate",
406+
RevokeURL: "https://example.com/revoke",
407+
AppInstallURL: "https://example.com/install",
408+
AppInstallationsURL: "https://example.com/installations",
409+
NoRefresh: true,
410+
Scopes: []string{"user:email", "read:org"},
411+
ExtraTokenKeys: []string{"extra", "token"},
412+
DeviceFlow: true,
413+
DeviceCodeURL: "https://example.com/device",
414+
Regex: "^https://example.com/.*$",
415+
DisplayName: "GitHub",
416+
DisplayIcon: "/static/icons/github.svg",
417+
MCPURL: "https://api.githubcopilot.com/mcp/",
418+
MCPToolAllowRegex: ".*",
419+
MCPToolDenyRegex: "create_gist",
420+
CodeChallengeMethodsSupported: []string{"S256"},
420421
}
421422

422423
// Input the github section twice for testing a slice of configs.

codersdk/testdata/githubcfg.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ externalAuthProviders:
2424
regex: ^https://example.com/.*$
2525
display_name: GitHub
2626
display_icon: /static/icons/github.svg
27+
code_challenge_methods_supported:
28+
- S256

0 commit comments

Comments
 (0)