fix tests related to secrets (#1198)
1. fix the path used to read secret data without this fix, the path to the compose file is added to the already absolute path, hence readFile was unable to find the secrets file 2. fix the expected json format mountPath includes the entire path including the name of the secret
This commit is contained in:
+5
-1
@@ -39,6 +39,10 @@
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -65,7 +69,7 @@
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "my_secret",
|
||||
"mountPath": "/run/secrets"
|
||||
"mountPath": "/run/secrets/my_secret"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "my_secret",
|
||||
"mountPath": "/run/secrets"
|
||||
"mountPath": "/run/secrets/my_secret"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+6
-2
@@ -39,6 +39,10 @@
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.cmd": "%CMD%",
|
||||
"kompose.version": "%VERSION%"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -76,11 +80,11 @@
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "my_secret",
|
||||
"mountPath": "/run/secrets"
|
||||
"mountPath": "/run/secrets/my_secret"
|
||||
},
|
||||
{
|
||||
"name": "my_other_secret",
|
||||
"mountPath": "/run/secrets"
|
||||
"mountPath": "/run/secrets/my_other_secret"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+2
-2
@@ -101,11 +101,11 @@
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "my_secret",
|
||||
"mountPath": "/run/secrets"
|
||||
"mountPath": "/run/secrets/my_secret"
|
||||
},
|
||||
{
|
||||
"name": "my_other_secret",
|
||||
"mountPath": "/run/secrets"
|
||||
"mountPath": "/run/secrets/my_other_secret"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user