Skip to content

Commit d1565b2

Browse files
committed
Clean up test manifest attributes
1 parent f27d1ce commit d1565b2

File tree

9 files changed

+28
-57
lines changed

9 files changed

+28
-57
lines changed

kustomize/data_source_kustomization_build_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func TestAccDataSourceKustomization_helmChart(t *testing.T) {
8080
resource.TestCheckResourceAttr("data.kustomization_build.test", "ids.#", "5"),
8181
resource.TestCheckResourceAttr("data.kustomization_build.test", "ids_prio.#", "3"),
8282
resource.TestCheckResourceAttr("data.kustomization_build.test", "manifests.%", "5"),
83-
resource.TestCheckOutput("service", "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"creationTimestamp\":null,\"labels\":{\"app\":\"nginx\"},\"name\":\"nginx\",\"namespace\":\"test-basic\"},\"spec\":{\"ports\":[{\"name\":\"http\",\"port\":80,\"protocol\":\"TCP\",\"targetPort\":80}],\"selector\":{\"app\":\"nginx\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}"),
84-
resource.TestCheckOutput("deployment", "{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"creationTimestamp\":null,\"labels\":{\"app\":\"nginx\"},\"name\":\"nginx\",\"namespace\":\"test-basic\"},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"nginx\"}},\"strategy\":{},\"template\":{\"metadata\":{\"creationTimestamp\":null,\"labels\":{\"app\":\"nginx\"}},\"spec\":{\"containers\":[{\"image\":\"nginx:6.0.10\",\"name\":\"test-basic\",\"resources\":{}}]}}},\"status\":{}}"),
83+
resource.TestCheckOutput("service", "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"labels\":{\"app\":\"nginx\"},\"name\":\"nginx\",\"namespace\":\"test-basic\"},\"spec\":{\"ports\":[{\"name\":\"http\",\"port\":80,\"protocol\":\"TCP\",\"targetPort\":80}],\"selector\":{\"app\":\"nginx\"},\"type\":\"ClusterIP\"}}"),
84+
resource.TestCheckOutput("deployment", "{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"labels\":{\"app\":\"nginx\"},\"name\":\"nginx\",\"namespace\":\"test-basic\"},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"nginx\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"nginx\"}},\"spec\":{\"containers\":[{\"image\":\"nginx:6.0.10\",\"name\":\"test-basic\"}]}}}}"),
8585
),
8686
},
8787
},

kustomize/data_source_kustomization_overlay_test.go

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: test
76
name: test
@@ -10,15 +9,11 @@ spec:
109
selector:
1110
matchLabels:
1211
app: test
13-
strategy: {}
1412
template:
1513
metadata:
16-
creationTimestamp: null
1714
labels:
1815
app: test
1916
spec:
2017
containers:
2118
- image: nginx
2219
name: nginx
23-
resources: {}
24-
status: {}

kustomize/test_kustomizations/_example_app/service.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: test
76
name: test
@@ -14,5 +13,3 @@ spec:
1413
selector:
1514
app: test
1615
type: ClusterIP
17-
status:
18-
loadBalancer: {}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: test2
76
name: test2
@@ -11,15 +10,11 @@ spec:
1110
selector:
1211
matchLabels:
1312
app: test2
14-
strategy: {}
1513
template:
1614
metadata:
17-
creationTimestamp: null
1815
labels:
1916
app: test2
2017
spec:
2118
containers:
2219
- image: nginx
2320
name: nginx
24-
resources: {}
25-
status: {}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: {{ include "test-basic.name" . }}
76
name: {{ include "test-basic.name" . }}
@@ -10,15 +9,11 @@ spec:
109
selector:
1110
matchLabels:
1211
app: {{ include "test-basic.name" . }}
13-
strategy: {}
1412
template:
1513
metadata:
16-
creationTimestamp: null
1714
labels:
1815
app: {{ include "test-basic.name" . }}
1916
spec:
2017
containers:
2118
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2219
name : {{ .Chart.Name }}
23-
resources: {}
24-
status: {}

kustomize/test_kustomizations/helm/initial/charts/test-basic/templates/service.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: {{ include "test-basic.name" . }}
76
name: {{ include "test-basic.name" . }}
@@ -14,5 +13,3 @@ spec:
1413
selector:
1514
app: {{ include "test-basic.name" . }}
1615
type: ClusterIP
17-
status:
18-
loadBalancer: {}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: {{ include "test-basic.name" . }}
76
name: {{ include "test-basic.name" . }}
@@ -10,15 +9,11 @@ spec:
109
selector:
1110
matchLabels:
1211
app: {{ include "test-basic.name" . }}
13-
strategy: {}
1412
template:
1513
metadata:
16-
creationTimestamp: null
1714
labels:
1815
app: {{ include "test-basic.name" . }}
1916
spec:
2017
containers:
2118
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2219
name : {{ .Chart.Name }}
23-
resources: {}
24-
status: {}

kustomize/test_kustomizations/helm/initial/charts/test-releasename/templates/service.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
creationTimestamp: null
54
labels:
65
app: {{ include "test-basic.name" . }}
76
name: {{ include "test-basic.name" . }}
@@ -14,5 +13,3 @@ spec:
1413
selector:
1514
app: {{ include "test-basic.name" . }}
1615
type: ClusterIP
17-
status:
18-
loadBalancer: {}

0 commit comments

Comments
 (0)