From 2145d1984f92d686d2a76a8b184300453d7a8ca5 Mon Sep 17 00:00:00 2001 From: yugo kobayashi Date: Tue, 5 Jul 2022 02:53:32 +0000 Subject: [PATCH] add missing test case --- cmd/config/internal/commands/e2e/e2e_test.go | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/cmd/config/internal/commands/e2e/e2e_test.go b/cmd/config/internal/commands/e2e/e2e_test.go index 1ee93a255..aa26caf1a 100644 --- a/cmd/config/internal/commands/e2e/e2e_test.go +++ b/cmd/config/internal/commands/e2e/e2e_test.go @@ -402,6 +402,42 @@ metadata: }, }, + { + name: "container_function_config", + skipIfFalseEnv: "KUSTOMIZE_DOCKER_E2E", + args: func(d string) []string { return []string{} }, + files: func(d string) map[string]string { + return map[string]string{ + "deployment.yaml": ` +apiVersion: apps/v1 +kind: Deployment +metadata: + name: foo + annotations: + config.kubernetes.io/function: | + container: + image: "gcr.io/kustomize-functions/e2econtainerconfig" +`, + } + }, + expectedFiles: func(d string) map[string]string { + return map[string]string{ + "deployment.yaml": ` +apiVersion: apps/v1 +kind: Deployment +metadata: + name: foo + annotations: + config.kubernetes.io/function: | + container: + image: "gcr.io/kustomize-functions/e2econtainerconfig" + a-string-value: '' + a-int-value: '0' + a-bool-value: 'false' +`} + }, + }, + { name: "container_function_config", skipIfFalseEnv: "KUSTOMIZE_DOCKER_E2E",