diff --git a/plugins/upstash/api_key.go b/plugins/upstash/api_key.go index 0b0964745..29387c296 100644 --- a/plugins/upstash/api_key.go +++ b/plugins/upstash/api_key.go @@ -26,6 +26,7 @@ func APIKey() schema.CredentialType { Charset: schema.Charset{ Lowercase: true, Digits: true, + Symbols: true, }, }, }, diff --git a/plugins/upstash/api_key_test.go b/plugins/upstash/api_key_test.go index 613881415..6d26d7c84 100644 --- a/plugins/upstash/api_key_test.go +++ b/plugins/upstash/api_key_test.go @@ -13,12 +13,12 @@ func TestAPIKeyProvisioner(t *testing.T) { "default": { ItemFields: map[sdk.FieldName]string{ fieldname.APIKey: "d68850db-69f7-qxe9pubcmjnqfgyexample", - fieldname.Email: "fakememail12@gmail.com", + fieldname.Email: "wendy@appleseed.com", }, ExpectedOutput: sdk.ProvisionOutput{ Environment: map[string]string{ "UPSTASH_API_KEY": "d68850db-69f7-qxe9pubcmjnqfgyexample", - "UPSTASH_EMAIL": "fakememail12@gmail.com", + "UPSTASH_EMAIL": "wendy@appleseed.com", }, }, }, @@ -30,13 +30,13 @@ func TestAPIKeyImporter(t *testing.T) { "environment": { Environment: map[string]string{ "UPSTASH_API_KEY": "d68850db-69f7-qxe9pubcmjnqfgyexample", - "UPSTASH_EMAIL": "fakememail12@gmail.com", + "UPSTASH_EMAIL": "wendy@appleseed.com", }, ExpectedCandidates: []sdk.ImportCandidate{ { Fields: map[sdk.FieldName]string{ fieldname.APIKey: "d68850db-69f7-qxe9pubcmjnqfgyexample", - fieldname.Email: "fakememail12@gmail.com", + fieldname.Email: "wendy@appleseed.com", }, }, }, @@ -50,7 +50,7 @@ func TestAPIKeyImporter(t *testing.T) { { Fields: map[sdk.FieldName]string{ fieldname.APIKey: "d68850db-69f7-qxe9pubcmjnqfgyexample", - fieldname.Email: "fakememail12@gmail.com", + fieldname.Email: "wendy@appleseed.com", }, }, }, diff --git a/plugins/upstash/test-fixtures/.upstash.json b/plugins/upstash/test-fixtures/.upstash.json index 77f770494..2a9830fd5 100755 --- a/plugins/upstash/test-fixtures/.upstash.json +++ b/plugins/upstash/test-fixtures/.upstash.json @@ -1,4 +1,4 @@ { "apiKey":"d68850db-69f7-qxe9pubcmjnqfgyexample", - "email" : "fakememail12@gmail.com" + "email" : "wendy@appleseed.com" } \ No newline at end of file diff --git a/plugins/upstash/upstash.go b/plugins/upstash/upstash.go index 4ce262baa..89e88f3cb 100644 --- a/plugins/upstash/upstash.go +++ b/plugins/upstash/upstash.go @@ -15,7 +15,8 @@ func UpstashCLI() schema.Executable { NeedsAuth: needsauth.IfAll( needsauth.NotForHelpOrVersion(), needsauth.NotWithoutArgs(), - needsauth.NotForExactArgs("config"), + needsauth.NotWhenContainsArgs("--config"), + needsauth.NotWhenContainsArgs("-c"), needsauth.NotWhenContainsArgs("auth"), ), Uses: []schema.CredentialUsage{