aboutsummaryrefslogtreecommitdiffstats
path: root/kud
diff options
context:
space:
mode:
authorRajamohan Raj <rajamohan.raj@intel.com>2020-04-03 07:43:11 +0000
committerRitu Sood <Ritu.Sood@intel.com>2020-04-13 16:46:10 +0000
commitc8ba8f21b68b64b4068f188614dd7c891edf035f (patch)
treebf7b48d32552a60b6635204c49fd2a3f7665e310 /kud
parent502b61039dbdc9089768a49b87163e654d8cbfb7 (diff)
Test cases for resolving the helm templates
Added test cases for overriding values and resolving the helm charts. Also addressed the merge conflicts and review comments Issue-ID: MULTICLOUD-1041 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I511e8e2e71c60e878df434370fc053f09cda1f66
Diffstat (limited to 'kud')
-rwxr-xr-xkud/tests/plugin_collection_v2.sh4
-rw-r--r--kud/tests/vnfs/comp-app/collection/app1/profile/override_values.yaml3
-rw-r--r--kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/templates/service.yaml4
-rw-r--r--kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/values.yaml2
-rw-r--r--kud/tests/vnfs/comp-app/collection/app2/profile/override_values.yaml2
5 files changed, 7 insertions, 8 deletions
diff --git a/kud/tests/plugin_collection_v2.sh b/kud/tests/plugin_collection_v2.sh
index 5af4c00b..ffa366f1 100755
--- a/kud/tests/plugin_collection_v2.sh
+++ b/kud/tests/plugin_collection_v2.sh
@@ -351,14 +351,14 @@ payload="$(cat <<EOF
"app-name":"${app1_name}",
"values":
{
- "collectd_prometheus.service.name":"collectd-override-by-set-value"
+ "collectd_prometheus.service.targetPort":"9104"
}
},
{
"app-name":"${app2_name}",
"values":
{
- "service.name":"Prometheus-override-by-set-value"
+ "prometheus.service.nameOfPort":"WebPort9090"
}
}
]
diff --git a/kud/tests/vnfs/comp-app/collection/app1/profile/override_values.yaml b/kud/tests/vnfs/comp-app/collection/app1/profile/override_values.yaml
index 3a99b73b..b3c36804 100644
--- a/kud/tests/vnfs/comp-app/collection/app1/profile/override_values.yaml
+++ b/kud/tests/vnfs/comp-app/collection/app1/profile/override_values.yaml
@@ -1,8 +1,7 @@
collectd_prometheus:
service:
type: ClusterIP
- name: collectd-override-by-file
- port: 9103
+ port: 9104
targetPort: 9103
selector:
app: collectd
diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/templates/service.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/templates/service.yaml
index 0114ed2e..56fbb5f4 100644
--- a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/templates/service.yaml
+++ b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/templates/service.yaml
@@ -26,12 +26,12 @@ spec:
{{- end }}
{{- end }}
ports:
- - name: web
+ - name: {{ .Values.prometheus.service.nameOfPort }}
{{- if eq .Values.prometheus.service.type "NodePort" }}
nodePort: {{ .Values.global.nodePortPrefix }}{{ .Values.prometheus.service.nodePort }}
{{- end }}
port: 9090
- targetPort: web
+ targetPort: {{ .Values.prometheus.service.nameOfPort }}
selector:
app: prometheus
prometheus: {{ template "prometheus.fullname" . }}-prometheus
diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/values.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/values.yaml
index 19bf0477..fa528900 100644
--- a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/values.yaml
+++ b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus/values.yaml
@@ -40,8 +40,8 @@ prometheus:
resources: {}
service:
+ nameOfPort: web
type: ClusterIP
- name: Prometheus-value-file
annotations: {}
labels: {}
clusterIP: ""
diff --git a/kud/tests/vnfs/comp-app/collection/app2/profile/override_values.yaml b/kud/tests/vnfs/comp-app/collection/app2/profile/override_values.yaml
index ec551668..041fc40d 100644
--- a/kud/tests/vnfs/comp-app/collection/app2/profile/override_values.yaml
+++ b/kud/tests/vnfs/comp-app/collection/app2/profile/override_values.yaml
@@ -1,6 +1,6 @@
service:
type: ClusterIP
- name: Prometheus-override-by-file
+ nameOfPort: webPort
annotations: {}
labels: {}
clusterIP: "" \ No newline at end of file