[VOL-3780] Passing INFRA_NAMESPACE as parameter with consistent name
Change-Id: I617c818ba338b9d9958b9fd190c1f38d1e39a460
diff --git a/Makefile b/Makefile
index 9823039..3c45ee0 100755
--- a/Makefile
+++ b/Makefile
@@ -506,5 +506,5 @@
cd docker && docker build -t opencord/voltctl:local -f Dockerfile.voltctl .
voltctl-docker-image-install-kind:
- @if [ "`kind get clusters | grep voltha`" = '' ]; then echo "no voltha cluster found" && exit 1; fi
- kind load docker-image --name `kind get clusters | grep voltha` opencord/voltctl:local
+ @if [ "`kind get clusters | grep kind`" = '' ]; then echo "no kind cluster found" && exit 1; fi
+ kind load docker-image --name `kind get clusters | grep kind` opencord/voltctl:local
diff --git a/docker/Dockerfile.voltctl b/docker/Dockerfile.voltctl
index 6244814..cd30dcb 100644
--- a/docker/Dockerfile.voltctl
+++ b/docker/Dockerfile.voltctl
@@ -15,7 +15,7 @@
FROM busybox:1.31.1-glibc
RUN mkdir -p /usr/bin
-RUN wget -O - https://github.com/opencord/voltctl/releases/download/v1.4.3/voltctl-1.4.3-linux-amd64 > /usr/bin/voltctl
+RUN wget -O - https://github.com/opencord/voltctl/releases/download/v1.6.1./voltctl-1.6.1.-linux-amd64 > /usr/bin/voltctl
COPY volt.config /root/.volt/config
RUN chmod a+x /usr/bin/voltctl && sync && voltctl completion bash >> /root/.bashrc
CMD ["sh", "-c", "sleep infinity"]
diff --git a/tests/functional/K8S_SystemTest.robot b/tests/functional/K8S_SystemTest.robot
index 13023ef..2fd906b 100644
--- a/tests/functional/K8S_SystemTest.robot
+++ b/tests/functional/K8S_SystemTest.robot
@@ -29,7 +29,7 @@
${desired_ETCD_cluster_size} 3
${minimal_ETCD_cluster_size} 2
${namespace} voltha
-${ETCD_namespace} default
+${INFRA_NAMESPACE} default
${ETCD_resources} statefulsets
${ETCD_name} etcd
${ETCD_pod_label_key} app
@@ -52,20 +52,20 @@
[Teardown] Run Keywords Collect Logs
... AND Teardown Suite
... AND Stop Logging EtcdScaleTest
- ${current_size}= Get ETCD Replica Count ${ETCD_namespace}
+ ${current_size}= Get ETCD Replica Count ${INFRA_NAMESPACE}
Pass Execution If '${current_size}' != '${desired_ETCD_cluster_size}'
... 'Skip the test if the cluster size smaller than minimal size 3'
# The minimal cluster size after scale down
# based on https://github.com/ETCD-io/ETCD/blob/master/Documentation/faq.md#what-is-failure-tolerance
- Scale ETCD ${ETCD_namespace} ${minimal_ETCD_cluster_size}
+ Scale ETCD ${INFRA_NAMESPACE} ${minimal_ETCD_cluster_size}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Validate ETCD Size ${ETCD_namespace} ${minimal_ETCD_cluster_size}
+ ... Validate ETCD Size ${INFRA_NAMESPACE} ${minimal_ETCD_cluster_size}
# Perform the sanity-test
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
# We scale up the size to 3, the recommended size of ETCD cluster.
- Scale ETCD ${ETCD_namespace} ${desired_ETCD_cluster_size}
+ Scale ETCD ${INFRA_NAMESPACE} ${desired_ETCD_cluster_size}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Validate ETCD Size ${ETCD_namespace} ${desired_ETCD_cluster_size}
+ ... Validate ETCD Size ${INFRA_NAMESPACE} ${desired_ETCD_cluster_size}
# Perform the sanity-test again
Run Keyword If ${has_dataplane} Clean Up Linux
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
@@ -76,9 +76,9 @@
[Setup] Start Logging EtcdFailureTest
[Teardown] Run Keywords Collect Logs
... AND Stop Logging EtcdFailureTest
- Delete K8s Pods By Label ${ETCD_namespace} ${ETCD_pod_label_key} ${ETCD_name}
+ Delete K8s Pods By Label ${INFRA_NAMESPACE} ${ETCD_pod_label_key} ${ETCD_name}
#Wait Until Keyword Succeeds ${timeout} 2s
- #... Pods Do Not Exist By Label ${ETCD_namespace} ${ETCD_pod_label_key} ${ETCD_name}
+ #... Pods Do Not Exist By Label ${INFRA_NAMESPACE} ${ETCD_pod_label_key} ${ETCD_name}
Wait Until Keyword Succeeds ${timeout} 2s
... Pods Are Ready By Label ${namespace} ${common_pod_label_key} ${rwcore_pod_label_value}
Wait Until Keyword Succeeds ${timeout} 2s
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index 3c77df6..1e29331 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -43,7 +43,7 @@
${VOLTHA_POD_NUM} 8
${NAMESPACE} voltha
${DEFAULTSPACE} default
-${RADIUSSPACE} infra
+${INFRA_NAMESPACE} infra
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
@@ -228,8 +228,8 @@
... AND Stop Logging RadiusRestart
${waitforRestart} Set Variable 120s
${podName} Set Variable radius
- Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${RADIUSSPACE} app ${podName}
- Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pods Status By Label ${RADIUSSPACE}
+ Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${INFRA_NAMESPACE} app ${podName}
+ Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pods Status By Label ${INFRA_NAMESPACE}
... app ${podName} Running
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
diff --git a/tests/functional/Voltha_ONOSHATests.robot b/tests/functional/Voltha_ONOSHATests.robot
index e9ecac8..809a945 100644
--- a/tests/functional/Voltha_ONOSHATests.robot
+++ b/tests/functional/Voltha_ONOSHATests.robot
@@ -41,7 +41,7 @@
${HELM_CHARTS_DIR} ~/helm-charts
${VOLTHA_POD_NUM} 8
${NAMESPACE} default
-${ONOSSPACE} infra
+${INFRA_NAMESPACE} infra
# For below variable value, using deployment name as using grep for
# parsing radius pod name, we can also use full radius pod name
${RESTART_POD_NAME} radius
@@ -66,7 +66,7 @@
[Setup] Start Logging onosMasterRestart
[Teardown] Run Keywords Collect Logs
... AND Stop Logging onosMasterRestart
- ${numOfOnos}= Wait Until Keyword Succeeds 20s 5s Get Number of Running Pods Number By Label ${ONOSSPACE}
+ ${numOfOnos}= Wait Until Keyword Succeeds 20s 5s Get Number of Running Pods Number By Label ${INFRA_NAMESPACE}
... app onos-classic
Should Not Be Equal As Integers ${numOfOnos} 0 Error fetching number of ONOS instances
Pass Execution If ${numOfOnos} == 1 Skipping test: just one instance of ONOS
@@ -85,9 +85,9 @@
${node_id}= Wait Until Keyword Succeeds 20s 5s Get Master Instace in ONOS ${of_id}
@{onos_id}= Split String ${node_id} -
${podName}= Catenate SEPARATOR=- voltha-infra-onos-classic ${onos_id[1]}
- Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Name ${ONOSSPACE} ${podName}
+ Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Name ${INFRA_NAMESPACE} ${podName}
Sleep 60s
- Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Name ${ONOSSPACE}
+ Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Name ${INFRA_NAMESPACE}
... ${podName} Running
# Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
Run Keyword If ${has_dataplane} Clean Up Linux