( ctx context.Context, t *testing.T, rawDB database.Store, keyID uuid.UUID, ciphers []Cipher, wantAPIKey string, )
| 1103 | } |
| 1104 | |
| 1105 | func 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 | |
| 1119 | func TestAIProviders(t *testing.T) { |
| 1120 | t.Parallel() |
no test coverage detected