MCPcopy
hub / github.com/ory/hydra / TestHelperClientAutoGenerateKey

Function TestHelperClientAutoGenerateKey

client/manager_test_helpers.go:30–46  ·  view source on GitHub ↗
(m Storage)

Source from the content-addressed store, hash-verified

28)
29
30func TestHelperClientAutoGenerateKey(m Storage) func(t *testing.T) {
31 return func(t *testing.T) {
32 ctx := context.TODO()
33 c := &Client{
34 Secret: "secret",
35 RedirectURIs: []string{"http://redirect"},
36 TermsOfServiceURI: "foo",
37 }
38 require.NoError(t, m.CreateClient(ctx, c))
39 dbClient, err := m.GetClient(ctx, c.GetID())
40 require.NoError(t, err)
41 dbClientConcrete, ok := dbClient.(*Client)
42 require.True(t, ok)
43 testhelpersuuid.AssertUUID(t, dbClientConcrete.ID)
44 assert.NoError(t, m.DeleteClient(ctx, c.GetID()))
45 }
46}
47
48func TestHelperClientAuthenticate(m Manager) func(t *testing.T) {
49 return func(t *testing.T) {

Callers 1

testRegistryFunction · 0.92

Calls 4

GetIDMethod · 0.95
CreateClientMethod · 0.65
GetClientMethod · 0.65
DeleteClientMethod · 0.65

Tested by

no test coverage detected