diff --git a/example-project/internal/platform/auth/auth_test.go b/example-project/internal/platform/auth/auth_test.go index 7c8acb2..16063a9 100644 --- a/example-project/internal/platform/auth/auth_test.go +++ b/example-project/internal/platform/auth/auth_test.go @@ -1,6 +1,8 @@ package auth_test import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" "os" "testing" "time" @@ -28,6 +30,17 @@ func TestAuthenticator(t *testing.T) { awsSecretID := "jwt-key" + uuid.NewRandom().String() + defer func() { + // cleanup the secret after test is complete + sm := secretsmanager.New(test.AwsSession) + _, err := sm.DeleteSecret(&secretsmanager.DeleteSecretInput{ + SecretId: aws.String(awsSecretID), + }) + if err != nil { + t.Fatal(err) + } + }() + var authTests = []struct { name string awsSecretID string