Skip to content

Commit

Permalink
issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhikhapare committed Jun 27, 2023
1 parent 7861adf commit 84b4a56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions plugins/upstash/api_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ func TestAPIKeyProvisioner(t *testing.T) {
"default": {
ItemFields: map[sdk.FieldName]string{
fieldname.APIKey: "d68850db-69f7-rr97jk7wcvshbkuexample",
fieldname.Email : "fakememail12@gmail.com"
fieldname.Email : "fakememail12@gmail.com",
},
ExpectedOutput: sdk.ProvisionOutput{
Environment: map[string]string{
"UPSTASH_API_KEY": "d68850db-69f7-rr97jk7wcvshbkuexample",
"UPSTASH_EMAIL" : "fakememail12@gmail.com"
"UPSTASH_EMAIL" : "fakememail12@gmail.com",
},
},
},
Expand All @@ -30,13 +30,13 @@ func TestAPIKeyImporter(t *testing.T) {
"environment": {
Environment: map[string]string{
"UPSTASH_API_KEY": "d68850db-69f7-rr97jk7wcvshbkuexample",
"UPSTASH_EMAIL" : "fakememail12@gmail.com"
"UPSTASH_EMAIL" : "fakememail12@gmail.com",
},
ExpectedCandidates: []sdk.ImportCandidate{
{
Fields: map[sdk.FieldName]string{
fieldname.APIKey: "d68850db-69f7-rr97jk7wcvshbkuexample",
fieldname.Email : "fakememail12@gmail.com"
fieldname.Email : "fakememail12@gmail.com",
},
},
},
Expand All @@ -50,7 +50,7 @@ func TestAPIKeyImporter(t *testing.T) {
{
Fields: map[sdk.FieldName]string{
fieldname.Token: "d68850db-69f7-rr97jk7wcvshbkuexample",
fieldname.Email : "fakememail12@gmail.com"
fieldname.Email : "fakememail12@gmail.com",
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion plugins/upstash/upstash.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func UpstashCLI() schema.Executable {
NeedsAuth: needsauth.IfAll(
needsauth.NotForHelpOrVersion(),
needsauth.NotWithoutArgs(),
needsauth.NotWhenContainsArgs("auth","login"),
needsauth.NotForExactArgs("config"),
needsauth.NotWhenContainsArgs("auth"),
),
Uses: []schema.CredentialUsage{
{
Expand Down

0 comments on commit 84b4a56

Please sign in to comment.