Add a test case

This commit is contained in:
Jingfang Liu
2018-06-11 12:18:26 -07:00
parent e017d04a16
commit 37720765fc
8 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
namePrefix: com1-
configMapGenerator:
- name: com1
behavior: create
literals:
- from=base

View File

@@ -0,0 +1,6 @@
namePrefix: com2-
configMapGenerator:
- name: com2
behavior: create
literals:
- from=base

View 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

View 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

View File

@@ -0,0 +1,9 @@
bases:
- myapp/mycomponent
- myapp/mycomponent2
configMapGenerator:
- name: com1
behavior: merge
literals:
- foo=bar
- baz=qux

View File

@@ -0,0 +1,7 @@
bases:
- ../../../../base/myapp/mycomponent
configMapGenerator:
- name: com1
behavior: merge
literals:
- from=overlay

View File

@@ -0,0 +1,7 @@
bases:
- ../../../../base/myapp/mycomponent2
configMapGenerator:
- name: com2
behavior: merge
literals:
- from=overlay

View 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