(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func 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 | } |
nothing calls this directly
no test coverage detected