You've already forked prometheus-postgres-exporter
							
							test(deployment): hostNetwork, hostname, subdomain
This commit is contained in:
		| @@ -81,7 +81,7 @@ spec: | ||||
|       dnsPolicy: {{ .Values.deployment.dnsPolicy }} | ||||
|       {{- end }} | ||||
|       {{- if .Values.deployment.hostname }} | ||||
|       hostname: {{ .Values.batch.dbUpdate.hostname }} | ||||
|       hostname: {{ .Values.deployment.hostname }} | ||||
|       {{- end }} | ||||
|       hostNetwork: {{ .Values.deployment.hostNetwork }} | ||||
|       {{- with .Values.deployment.imagePullSecrets }} | ||||
|   | ||||
| @@ -68,10 +68,17 @@ tests: | ||||
|       path: spec.template.spec.dnsConfig | ||||
|   - notExists: | ||||
|       path: spec.template.spec.dnsPolicy | ||||
|   - notExists: | ||||
|       path: spec.template.spec.hostname | ||||
|   - equal: | ||||
|       path: spec.template.spec.hostNetwork | ||||
|       value: false | ||||
|   - notExists: | ||||
|       path: spec.template.spec.nodeSelector | ||||
|   - notExists: | ||||
|       path: spec.template.spec.priorityClassName | ||||
|   - notExists: | ||||
|       path: spec.template.spec.subdomain | ||||
|  | ||||
| - it: Test additional arguments | ||||
|   set: | ||||
| @@ -228,6 +235,22 @@ tests: | ||||
|       path: spec.template.spec.dnsPolicy | ||||
|       value: ClusterFirst | ||||
|  | ||||
| - it: Test hostNetwork, hostname, subdomain | ||||
|   set: | ||||
|     deployment.hostNetwork: true | ||||
|     deployment.hostname: pg-exporter | ||||
|     deployment.subdomain: exporters.internal | ||||
|   asserts: | ||||
|   - equal: | ||||
|       path: spec.template.spec.hostNetwork | ||||
|       value: true | ||||
|   - equal: | ||||
|       path: spec.template.spec.hostname | ||||
|       value: pg-exporter | ||||
|   - equal: | ||||
|       path: spec.template.spec.subdomain | ||||
|       value: exporters.internal | ||||
|  | ||||
| - it: Test nodeSelector | ||||
|   set: | ||||
|     deployment.nodeSelector: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user