aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml
diff options
context:
space:
mode:
authorKonrad Bańka <k.banka@samsung.com>2021-05-07 12:46:51 +0200
committerKonrad Bańka <k.banka@samsung.com>2021-05-13 18:29:06 +0200
commitb22dee9edad2c90b94cf78f5ed8fddbc1760b0a0 (patch)
treedacec5bdb339e0bfa75a8e8f69eff436403f94dc /heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml
parent1a8e3c3133f0b6c355689875abd57c481f3a1e81 (diff)
[vFW_CNF_CDS] Provide Helm Tests for CNF
Provide simple ping-based Helm tests for vFW CNF for demo purposes. Issue-ID: INT-1899 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ib526989760f34de790bd8d7a403941d73cb7250c
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml')
-rw-r--r--heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml55
1 files changed, 55 insertions, 0 deletions
diff --git a/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml b/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml
new file mode 100644
index 00000000..37b41832
--- /dev/null
+++ b/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml
@@ -0,0 +1,55 @@
+---
+# Copyright © 2021 Samsung Electronics
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+{{- if eq .Values.Tests.enabled "yes" }}
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: "{{ .Values.vfw_name_0 }}-test"
+ labels:
+ vnf-name: {{ .Values.vnf_name }}
+ vf-module-name: {{ .Values.vfw_name_0 }}
+ release: {{ .Release.Name }}
+ chart: {{ .Chart.Name }}
+ annotations:
+ "helm.sh/hook": test-success
+spec:
+ completions: 1
+ template:
+ metadata:
+ annotations:
+ k8s.v1.cni.cncf.io/networks: "{{ .Values.net_attachment_definition }}"
+ k8s.plugin.opnfv.org/nfn-network: |
+ { "type": "ovn4nfv",
+ "interface": [
+ {
+ "name": {{ .Values.int_private1_net_id | quote }},
+ "interface": "eth1" ,
+ "defaultGateway": "false"
+ }
+ {
+ "name": {{ .Values.int_private2_net_id | quote }},
+ "interface": "eth2" ,
+ "defaultGateway": "false"
+ }
+ ]
+ }
+ spec:
+ restartPolicy: Never
+ containers:
+ - name: "ping-test-eth1"
+ image: busybox
+ command:
+ - /bin/sh
+ - -exc
+ - "ping -c {{ .Values.Tests.ping_count }} -I eth1 {{ .Values.vfw_int_private1_ip_0 }}"
+ - name: "ping-test-eth2"
+ image: busybox
+ command:
+ - /bin/sh
+ - -exc
+ - "ping -c {{ .Values.Tests.ping_count }} -I eth2 {{ .Values.vfw_int_private2_ip_0 }}"
+{{- end -}}