|
@@ -281,25 +281,23 @@ func DockerJSONConfigVault(f *framework.Framework) (string, func(*framework.Test
|
|
|
return "[common] should sync docker configurated json secrets with template", func(tc *framework.TestCase) {
|
|
return "[common] should sync docker configurated json secrets with template", func(tc *framework.TestCase) {
|
|
|
cloudSecretName := fmt.Sprintf("%s-%s", f.Namespace.Name, "docker-config-example")
|
|
cloudSecretName := fmt.Sprintf("%s-%s", f.Namespace.Name, "docker-config-example")
|
|
|
//cloudSecretValue := `{"auths":{"https://index.docker.io/v1/": {"auth": "c3R...zE2"}}}`
|
|
//cloudSecretValue := `{"auths":{"https://index.docker.io/v1/": {"auth": "c3R...zE2"}}}`
|
|
|
|
|
+ //dockerconfig := "{\"auths\":{\"https://index.docker.io/v1/\": {\"auth\": \"c3R...zE2\"}}}" // so we have the json string that is the final docker config that we want
|
|
|
|
|
+ //cloudSecretValue := "{\"dockerconfig\": {\"auths\":{\"https://index.docker.io/v1/\": {\"auth\": \"c3R...zE2\"}}}}"
|
|
|
|
|
+ // cloudSecretValue := fmt.Sprintf(`{"dockerconfig": %s}`, dockerconfig)
|
|
|
|
|
+ //dockerconfig := "{\"auths\":{\"https://index.docker.io/v1/\": {\"auth\": \"c3R...zE2\"}}}"
|
|
|
|
|
+
|
|
|
|
|
+ dockerconfigString := `"{\"auths\":{\"https://index.docker.io/v1/\": {\"auth\": \"c3R...zE2\"}}}"`
|
|
|
dockerconfig := `{"auths":{"https://index.docker.io/v1/": {"auth": "c3R...zE2"}}}`
|
|
dockerconfig := `{"auths":{"https://index.docker.io/v1/": {"auth": "c3R...zE2"}}}`
|
|
|
- cloudSecretValue := fmt.Sprintf(`{"dockerconfig": %s}`, dockerconfig)
|
|
|
|
|
- /*cloudSecretValue := `{
|
|
|
|
|
- "dockerconfig": {
|
|
|
|
|
- "auths": {
|
|
|
|
|
- "https://index.docker.io/v1/": {
|
|
|
|
|
- "auth": "c3R...zE2"
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }`*/
|
|
|
|
|
|
|
+ cloudSecretValue := fmt.Sprintf(`{"dockerconfig": %s}`, dockerconfigString)
|
|
|
|
|
+
|
|
|
tc.Secrets = map[string]string{
|
|
tc.Secrets = map[string]string{
|
|
|
cloudSecretName: cloudSecretValue,
|
|
cloudSecretName: cloudSecretValue,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
tc.ExpectedSecret = &v1.Secret{
|
|
tc.ExpectedSecret = &v1.Secret{
|
|
|
- Type: v1.SecretTypeOpaque,
|
|
|
|
|
|
|
+ Type: v1.SecretTypeDockerConfigJson, // we forgot to change this type
|
|
|
Data: map[string][]byte{
|
|
Data: map[string][]byte{
|
|
|
- ".dockerconfigjson": []byte(dockerconfig),
|
|
|
|
|
|
|
+ cloudSecretName: []byte(dockerconfig),
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
|
|
|