SecretsManager: Keeper and secure value contracts, secretkeeper changes (#105379)

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
This commit is contained in:
Dana Axinte
2025-05-14 15:24:25 +01:00
committed by GitHub
co-authored by PoorlyDefinedBehaviour Matheus Macabu
parent 137639e0de
commit 8c64078965
10 changed files with 204 additions and 83 deletions
@@ -21,12 +21,12 @@ func NewSQLKeeper(
tracer tracing.Tracer,
encryptionManager contracts.EncryptionManager,
store contracts.EncryptedValueStorage,
) (*SQLKeeper, error) {
) *SQLKeeper {
return &SQLKeeper{
tracer: tracer,
encryptionManager: encryptionManager,
store: store,
}, nil
}
}
func (s *SQLKeeper) Store(ctx context.Context, cfg secretv0alpha1.KeeperConfig, namespace string, exposedValueOrRef string) (contracts.ExternalID, error) {
@@ -143,9 +143,9 @@ func setupTestService(t *testing.T, cfg *setting.Cfg) (*SQLKeeper, error) {
encValueStore := newInMemoryEncryptedValueStorage()
// Initialize the SQLKeeper
sqlKeeper, err := NewSQLKeeper(tracing.InitializeTracerForTest(), encMgr, encValueStore)
sqlKeeper := NewSQLKeeper(tracing.InitializeTracerForTest(), encMgr, encValueStore)
return sqlKeeper, err
return sqlKeeper, nil
}
// While we don't have the real implementation, use an in-memory one