Skip to content

Commit 83d999c

Browse files
committed
file import in a test
Signed-off-by: wind57 <[email protected]>
1 parent 3e7f3f9 commit 83d999c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-reload/src/main/resources/bootstrap-with-bootstrap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ spring:
77
enabled: false
88

99
config:
10-
import: "configtree:/tmp/"
10+
import: "file:/tmp/application.properties"

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-reload/src/test/java/org/springframework/cloud/kubernetes/k8s/client/reload/it/K8sClientSecretConfigTreeIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ void test() throws Exception {
9797
// replace data in secret and wait for k8s to pick it up
9898
// our polling will detect that and restart the app
9999
V1Secret secret = (V1Secret) util.yaml("mount/secret.yaml");
100-
secret.setData(Map.of("from.properties.secret.key", "as-mount-changed".getBytes(StandardCharsets.UTF_8)));
100+
secret.setData(Map.of("application.properties",
101+
"from.properties.secret.key=as-mount-changed".getBytes(StandardCharsets.UTF_8)));
101102

102103
// add label so that configuration-watcher picks this up
103104
Map<String, String> existingLabels = new HashMap<>(

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-reload/src/test/resources/mount/secret.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ metadata:
55
namespace: default
66
data:
77
# from.properties.secret.key=initial
8-
from.properties.secret.key: aW5pdGlhbA==
8+
application.properties:
9+
ZnJvbS5wcm9wZXJ0aWVzLnNlY3JldC5rZXk6IGluaXRpYWw=

0 commit comments

Comments
 (0)