1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

fix: aws secretexists returns true ifnotexists (#3684)

Signed-off-by: Alok N <alokme123@gmail.com>
This commit is contained in:
Alok N 2024-07-16 11:08:57 +05:30 committed by GitHub
parent 393189209c
commit 0fcf972a70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -230,7 +230,7 @@ func (sm *SecretsManager) handleSecretError(err error) (bool, error) {
return false, err
}
if aerr.Code() == awssm.ErrCodeResourceNotFoundException {
return true, nil
return false, nil
}
return false, err
}

View file

@ -1359,7 +1359,7 @@ func TestSecretExists(t *testing.T) {
wantError: true,
},
},
"SecretExistsReturnsTrueForNonExistingSecret": {
"SecretExistsReturnsFalseForNonExistingSecret": {
args: args{
store: makeValidSecretStore().Spec.Provider.AWS,
client: fakesm.Client{
@ -1369,7 +1369,7 @@ func TestSecretExists(t *testing.T) {
},
want: want{
err: nil,
wantError: true,
wantError: false,
},
},
"SecretExistsReturnsFalseForErroredSecret": {