1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

fixing local changes

This commit is contained in:
Kian 2021-07-29 12:25:08 +01:00
parent 6cc66d17cc
commit 7be8db468e
2 changed files with 6 additions and 4 deletions

View file

@ -380,7 +380,6 @@ func SSHKeySync(f *framework.Framework) (string, func(*framework.TestCase)) {
func SSHKeySyncDataProperty(f *framework.Framework) (string, func(*framework.TestCase)) {
return "[common] should sync ssh key with provider.", func(tc *framework.TestCase) {
cloudSecretName := fmt.Sprintf("%s-%s", f.Namespace.Name, "docker-config-example")
//SSHKey := "EY2NNWddRADTFdNvEojrCwo+DUxy6va2JltQAbxmhyvSZsL1eYsutunsKEwonGSru0Zd+m z5DHJOOQdHEsH3AAAACmFub3RoZXJvbmU= -----END OPENSSH PRIVATE KEY-----"
SSHKey := `-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAsARoZUqo6L5dd0WRjZ2QPq/kKlbjtUY1njzJ01UtdC1u1eSJFUnV

View file

@ -52,6 +52,9 @@ const (
errReadSecret = "cannot read secret data from Vault: %w"
errAuthFormat = "cannot initialize Vault client: no valid auth method specified: %w"
errVaultData = "cannot parse Vault response data: %w"
errDataField = "failed to find data field: %v"
errJSONUnmarshall = "failed to unmarshall JSON: %v"
errSecretFormat = "Secret data not in expected format: %v"
errVaultToken = "cannot parse Vault authentication token: %w"
errVaultReqParams = "cannot set Vault request parameters: %w"
errVaultRequest = "error from Vault request: %w"
@ -190,11 +193,11 @@ func (v *client) readSecret(ctx context.Context, path, version string) (map[stri
dataInt, ok := vaultSecret.Data["data"]
if !ok {
return nil, errors.New(fmt.Sprintf("failed to find data field: %v", vaultSecret.Data))
return nil, errors.New(fmt.Sprintf(errDataField, vaultSecret.Data))
}
secretData, ok = dataInt.(map[string]interface{})
if !ok {
return nil, errors.New(fmt.Sprintf("failed to unmarshall JSON: %v", dataInt))
return nil, errors.New(fmt.Sprintf(errJSONUnmarshall, dataInt))
}
}
@ -213,7 +216,7 @@ func (v *client) readSecret(ctx context.Context, path, version string) (map[stri
}
default:
return nil, errors.New(fmt.Sprintf("Secret data not in expected format: %v", secretData))
return nil, errors.New(fmt.Sprintf(errSecretFormat, secretData))
}
}