Skip to content

Commit

Permalink
feat: PR update edgexfoundry#348
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Morton <[email protected]>
  • Loading branch information
Kyle Morton committed Sep 8, 2022
1 parent 9d385f3 commit 05b74f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bootstrap/secret/insecure.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (p *InsecureProvider) ListSecretsAtPath(path string) ([]string, error) {
for _, insecureSecret := range insecureSecrets {
if insecureSecret.Path == path {
pathExists = true
for k, _ := range insecureSecret.Secrets {
for k := range insecureSecret.Secrets {
results = append(results, k)
}
}
Expand Down
6 changes: 5 additions & 1 deletion bootstrap/secret/insecure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/stretchr/testify/require"
)

var expectedSecretsKeys = []string{UsernameKey, PasswordKey}
var expectedSecretsKeys = []string{UsernameKey, PasswordKey, UsernameKey, PasswordKey}

func TestInsecureProvider_GetSecrets(t *testing.T) {
configAllSecrets := TestConfig{
Expand Down Expand Up @@ -103,6 +103,10 @@ func TestInsecureProvider_ListPaths(t *testing.T) {
Path: expectedPath,
Secrets: expectedSecrets,
},
"REDIS": {
Path: expectedPath,
Secrets: expectedSecrets,
},
},
}

Expand Down

0 comments on commit 05b74f5

Please sign in to comment.