MCPcopy Create free account
hub / github.com/brimdata/super / TestAuthMethodGet

Function TestAuthMethodGet

service/auth_test.go:66–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

64}
65
66func TestAuthMethodGet(t *testing.T) {
67 t.Run("none", func(t *testing.T) {
68 _, connNoAuth := newCoreWithConfig(t, service.Config{})
69 resp := connNoAuth.TestAuthMethod()
70 require.Equal(t, api.AuthMethodResponse{
71 Kind: api.AuthMethodNone,
72 }, resp)
73 })
74
75 t.Run("auth0", func(t *testing.T) {
76 authConfig := testAuthConfig()
77 _, connWithAuth := newCoreWithConfig(t, service.Config{
78 Auth: authConfig,
79 })
80 resp := connWithAuth.TestAuthMethod()
81 require.Equal(t, api.AuthMethodResponse{
82 Kind: "auth0",
83 Auth0: &api.AuthMethodAuth0Details{
84 Audience: authConfig.Audience,
85 Domain: authConfig.Domain,
86 ClientID: authConfig.ClientID,
87 },
88 }, resp)
89 })
90}

Callers

nothing calls this directly

Calls 5

newCoreWithConfigFunction · 0.85
testAuthConfigFunction · 0.85
TestAuthMethodMethod · 0.80
RunMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected