Skip to content

Commit

Permalink
fix: aws secretexists returns true ifnotexists (external-secrets#3684)
Browse files Browse the repository at this point in the history
Signed-off-by: Alok N <[email protected]>
  • Loading branch information
mintbomb27 authored Jul 16, 2024
1 parent 3931892 commit 0fcf972
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/provider/aws/secretsmanager/secretsmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/aws/secretsmanager/secretsmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ func TestSecretExists(t *testing.T) {
wantError: true,
},
},
"SecretExistsReturnsTrueForNonExistingSecret": {
"SecretExistsReturnsFalseForNonExistingSecret": {
args: args{
store: makeValidSecretStore().Spec.Provider.AWS,
client: fakesm.Client{
Expand All @@ -1369,7 +1369,7 @@ func TestSecretExists(t *testing.T) {
},
want: want{
err: nil,
wantError: true,
wantError: false,
},
},
"SecretExistsReturnsFalseForErroredSecret": {
Expand Down

0 comments on commit 0fcf972

Please sign in to comment.