(t *testing.T)
| 404 | } |
| 405 | |
| 406 | func TestMCPServerConfigsUserOIDCDirect(t *testing.T) { |
| 407 | t.Parallel() |
| 408 | |
| 409 | // Create with user_oidc and confirm validation accepts the value |
| 410 | // while no auth-specific fields are persisted on the row. |
| 411 | ctx := testutil.Context(t, testutil.WaitLong) |
| 412 | client := newMCPClient(t) |
| 413 | _ = coderdtest.CreateFirstUser(t, client) |
| 414 | |
| 415 | created, err := client.CreateMCPServerConfig(ctx, codersdk.CreateMCPServerConfigRequest{ |
| 416 | DisplayName: "User OIDC Direct", |
| 417 | Slug: "user-oidc-direct", |
| 418 | Transport: "streamable_http", |
| 419 | URL: "https://mcp.example.com/oidc-direct", |
| 420 | AuthType: "user_oidc", |
| 421 | Availability: "default_off", |
| 422 | Enabled: true, |
| 423 | ToolAllowList: []string{}, |
| 424 | ToolDenyList: []string{}, |
| 425 | }) |
| 426 | require.NoError(t, err) |
| 427 | require.Equal(t, "user_oidc", created.AuthType) |
| 428 | require.False(t, created.HasOAuth2Secret) |
| 429 | require.False(t, created.HasAPIKey) |
| 430 | require.False(t, created.HasCustomHeaders) |
| 431 | } |
| 432 | |
| 433 | func TestMCPServerConfigsAvailability(t *testing.T) { |
| 434 | t.Parallel() |
nothing calls this directly
no test coverage detected