mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Add a test case
This commit is contained in:
6
pkg/commands/testdata/testcase-configmaps/base/myapp/mycomponent/kustomization.yaml
vendored
Normal file
6
pkg/commands/testdata/testcase-configmaps/base/myapp/mycomponent/kustomization.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namePrefix: com1-
|
||||||
|
configMapGenerator:
|
||||||
|
- name: com1
|
||||||
|
behavior: create
|
||||||
|
literals:
|
||||||
|
- from=base
|
||||||
6
pkg/commands/testdata/testcase-configmaps/base/myapp/mycomponent2/kustomization.yaml
vendored
Normal file
6
pkg/commands/testdata/testcase-configmaps/base/myapp/mycomponent2/kustomization.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namePrefix: com2-
|
||||||
|
configMapGenerator:
|
||||||
|
- name: com2
|
||||||
|
behavior: create
|
||||||
|
literals:
|
||||||
|
- from=base
|
||||||
16
pkg/commands/testdata/testcase-configmaps/expected.diff
vendored
Normal file
16
pkg/commands/testdata/testcase-configmaps/expected.diff
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
diff -u -N /tmp/noop/v1_ConfigMap_com1.yaml /tmp/transformed/v1_ConfigMap_com1.yaml
|
||||||
|
--- /tmp/noop/v1_ConfigMap_com1.yaml YYYY-MM-DD HH:MM:SS
|
||||||
|
+++ /tmp/transformed/v1_ConfigMap_com1.yaml YYYY-MM-DD HH:MM:SS
|
||||||
|
@@ -1,9 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
+ baz: qux
|
||||||
|
+ foo: bar
|
||||||
|
from: overlay
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
creationTimestamp: null
|
||||||
|
labels: {}
|
||||||
|
- name: com1-com1-8mk424df76
|
||||||
|
+ name: com1-com1-687g9gmkdf
|
||||||
21
pkg/commands/testdata/testcase-configmaps/expected.yaml
vendored
Normal file
21
pkg/commands/testdata/testcase-configmaps/expected.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
baz: qux
|
||||||
|
foo: bar
|
||||||
|
from: overlay
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
creationTimestamp: null
|
||||||
|
labels: {}
|
||||||
|
name: com1-com1-687g9gmkdf
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
from: overlay
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
creationTimestamp: null
|
||||||
|
labels: {}
|
||||||
|
name: com2-com2-bcd85m642t
|
||||||
9
pkg/commands/testdata/testcase-configmaps/overlay/dev/kustomization.yaml
vendored
Normal file
9
pkg/commands/testdata/testcase-configmaps/overlay/dev/kustomization.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
bases:
|
||||||
|
- myapp/mycomponent
|
||||||
|
- myapp/mycomponent2
|
||||||
|
configMapGenerator:
|
||||||
|
- name: com1
|
||||||
|
behavior: merge
|
||||||
|
literals:
|
||||||
|
- foo=bar
|
||||||
|
- baz=qux
|
||||||
7
pkg/commands/testdata/testcase-configmaps/overlay/dev/myapp/mycomponent/kustomization.yaml
vendored
Normal file
7
pkg/commands/testdata/testcase-configmaps/overlay/dev/myapp/mycomponent/kustomization.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
bases:
|
||||||
|
- ../../../../base/myapp/mycomponent
|
||||||
|
configMapGenerator:
|
||||||
|
- name: com1
|
||||||
|
behavior: merge
|
||||||
|
literals:
|
||||||
|
- from=overlay
|
||||||
7
pkg/commands/testdata/testcase-configmaps/overlay/dev/myapp/mycomponent2/kustomization.yaml
vendored
Normal file
7
pkg/commands/testdata/testcase-configmaps/overlay/dev/myapp/mycomponent2/kustomization.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
bases:
|
||||||
|
- ../../../../base/myapp/mycomponent2
|
||||||
|
configMapGenerator:
|
||||||
|
- name: com2
|
||||||
|
behavior: merge
|
||||||
|
literals:
|
||||||
|
- from=overlay
|
||||||
5
pkg/commands/testdata/testcase-configmaps/test.yaml
vendored
Normal file
5
pkg/commands/testdata/testcase-configmaps/test.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
description: configmap generator overlay
|
||||||
|
args: []
|
||||||
|
filename: testdata/testcase-configmaps/overlay/dev
|
||||||
|
expectedStdout: testdata/testcase-configmaps/expected.yaml
|
||||||
|
expectedDiff: testdata/testcase-configmaps/expected.diff
|
||||||
Reference in New Issue
Block a user