MCPcopy Index your code
hub / github.com/coder/coder / requireAIProviderKeyRawEncrypted

Function requireAIProviderKeyRawEncrypted

enterprise/dbcrypt/dbcrypt_internal_test.go:1105–1117  ·  view source on GitHub ↗
(
	ctx context.Context,
	t *testing.T,
	rawDB database.Store,
	keyID uuid.UUID,
	ciphers []Cipher,
	wantAPIKey string,
)

Source from the content-addressed store, hash-verified

1103}
1104
1105func requireAIProviderKeyRawEncrypted(
1106 ctx context.Context,
1107 t *testing.T,
1108 rawDB database.Store,
1109 keyID uuid.UUID,
1110 ciphers []Cipher,
1111 wantAPIKey string,
1112) {
1113 t.Helper()
1114 raw, err := rawDB.GetAIProviderKeyByID(ctx, keyID)
1115 require.NoError(t, err)
1116 requireEncryptedEquals(t, ciphers[0], raw.APIKey, wantAPIKey)
1117}
1118
1119func TestAIProviders(t *testing.T) {
1120 t.Parallel()

Callers 1

TestAIProviderKeysFunction · 0.85

Calls 3

requireEncryptedEqualsFunction · 0.70
HelperMethod · 0.65
GetAIProviderKeyByIDMethod · 0.65

Tested by

no test coverage detected