MCPcopy Create free account
hub / github.com/coder/coder / fakeOIDCIssuerDiscovery

Function fakeOIDCIssuerDiscovery

cli/server_fix_oidc_links_internal_test.go:22–36  ·  view source on GitHub ↗
(t *testing.T, issuer string)

Source from the content-addressed store, hash-verified

20)
21
22func fakeOIDCIssuerDiscovery(t *testing.T, issuer string) *httptest.Server {
23 t.Helper()
24 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
25 if r.URL.Path != "/.well-known/openid-configuration" {
26 http.NotFound(w, r)
27 return
28 }
29 w.Header().Set("Content-Type", "application/json")
30 _ = json.NewEncoder(w).Encode(map[string]string{
31 "issuer": issuer,
32 })
33 }))
34 t.Cleanup(srv.Close)
35 return srv
36}
37
38func newDeploymentValues(t *testing.T, issuerURL string, autoRepair bool) *codersdk.DeploymentValues {
39 t.Helper()

Callers 1

TestOIDCAuthLinksFunction · 0.85

Calls 5

EncodeMethod · 0.80
HelperMethod · 0.65
SetMethod · 0.65
CleanupMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected