Skip to content

Commit

Permalink
Merge pull request #250 from 1Password/wpark/249-ngrok-credential-length
Browse files Browse the repository at this point in the history
Correct ngrok credential lengths
  • Loading branch information
SimonBarendse authored Jun 2, 2023
2 parents c95bf76 + 2fbd1e8 commit bb20d67
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions plugins/ngrok/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func Credentials() schema.CredentialType {
Optional: false,
Secret: true,
Composition: &schema.ValueComposition{
Length: 43,
Length: 49,
Charset: schema.Charset{
Uppercase: true,
Lowercase: true,
Expand All @@ -36,7 +36,7 @@ func Credentials() schema.CredentialType {
Optional: true,
Secret: true,
Composition: &schema.ValueComposition{
Length: 48,
Length: 49,
Charset: schema.Charset{
Uppercase: true,
Lowercase: true,
Expand Down
20 changes: 10 additions & 10 deletions plugins/ngrok/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ func TestCredentialsProvisioner(t *testing.T) {
plugintest.TestProvisioner(t, ngrokProvisioner(), map[string]plugintest.ProvisionCase{
"temp file": {
ItemFields: map[sdk.FieldName]string{
fieldname.Authtoken: "uSuQ7LUOJLs4xRbIySZ15F4v5KxfTnMknMdFEXAMPLE",
fieldname.APIKey: "L4STpMP3K8FNaQjBo5EAsXA2SThzq0J7BKD3jUZgtEXAMPLE",
fieldname.Authtoken: "cxG2Im21Yzkh8VnvFQaetlPHcQ9ZDUUk1IzzyHhcGcEXAMPLE",
fieldname.APIKey: "NQdxymVXmWC15916Mmy1vYkpzzNG6a84Bo4mYKuDahEXAMPLE",
},
CommandLine: []string{"ngrok"},
ExpectedOutput: sdk.ProvisionOutput{
Expand All @@ -33,14 +33,14 @@ func TestCredentialsImporter(t *testing.T) {
plugintest.TestImporter(t, Credentials().Importer, map[string]plugintest.ImportCase{
"environment": {
Environment: map[string]string{
"NGROK_AUTHTOKEN": "uSuQ7LUOJLs4xRbIySZ15F4v5KxfTnMknMdFEXAMPLE",
"NGROK_API_KEY": "L4STpMP3K8FNaQjBo5EAsXA2SThzq0J7BKD3jUZgtEXAMPLE",
"NGROK_AUTHTOKEN": "cxG2Im21Yzkh8VnvFQaetlPHcQ9ZDUUk1IzzyHhcGcEXAMPLE",
"NGROK_API_KEY": "NQdxymVXmWC15916Mmy1vYkpzzNG6a84Bo4mYKuDahEXAMPLE",
},
ExpectedCandidates: []sdk.ImportCandidate{
{
Fields: map[sdk.FieldName]string{
fieldname.Authtoken: "uSuQ7LUOJLs4xRbIySZ15F4v5KxfTnMknMdFEXAMPLE",
fieldname.APIKey: "L4STpMP3K8FNaQjBo5EAsXA2SThzq0J7BKD3jUZgtEXAMPLE",
fieldname.Authtoken: "cxG2Im21Yzkh8VnvFQaetlPHcQ9ZDUUk1IzzyHhcGcEXAMPLE",
fieldname.APIKey: "NQdxymVXmWC15916Mmy1vYkpzzNG6a84Bo4mYKuDahEXAMPLE",
},
},
},
Expand All @@ -53,8 +53,8 @@ func TestCredentialsImporter(t *testing.T) {
ExpectedCandidates: []sdk.ImportCandidate{
{
Fields: map[sdk.FieldName]string{
fieldname.Authtoken: "uSuQ7LUOJLs4xRbIySZ15F4v5KxfTnMknMdFEXAMPLE",
fieldname.APIKey: "L4STpMP3K8FNaQjBo5EAsXA2SThzq0J7BKD3jUZgtEXAMPLE",
fieldname.Authtoken: "cxG2Im21Yzkh8VnvFQaetlPHcQ9ZDUUk1IzzyHhcGcEXAMPLE",
fieldname.APIKey: "NQdxymVXmWC15916Mmy1vYkpzzNG6a84Bo4mYKuDahEXAMPLE",
},
},
},
Expand All @@ -67,8 +67,8 @@ func TestCredentialsImporter(t *testing.T) {
ExpectedCandidates: []sdk.ImportCandidate{
{
Fields: map[sdk.FieldName]string{
fieldname.Authtoken: "uSuQ7LUOJLs4xRbIySZ15F4v5KxfTnMknMdFEXAMPLE",
fieldname.APIKey: "L4STpMP3K8FNaQjBo5EAsXA2SThzq0J7BKD3jUZgtEXAMPLE",
fieldname.Authtoken: "cxG2Im21Yzkh8VnvFQaetlPHcQ9ZDUUk1IzzyHhcGcEXAMPLE",
fieldname.APIKey: "NQdxymVXmWC15916Mmy1vYkpzzNG6a84Bo4mYKuDahEXAMPLE",
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions plugins/ngrok/test-fixtures/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
api_key: L4STpMP3K8FNaQjBo5EAsXA2SThzq0J7BKD3jUZgtEXAMPLE
authtoken: uSuQ7LUOJLs4xRbIySZ15F4v5KxfTnMknMdFEXAMPLE
api_key: NQdxymVXmWC15916Mmy1vYkpzzNG6a84Bo4mYKuDahEXAMPLE
authtoken: cxG2Im21Yzkh8VnvFQaetlPHcQ9ZDUUk1IzzyHhcGcEXAMPLE
version: "2"

0 comments on commit bb20d67

Please sign in to comment.