improve kv store prefix handling
Change-Id: I24697bf2ddeffa8e6b6e0e36e9983f9efc21c963
diff --git a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
index 8e8bf03..3f0b451 100755
--- a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
@@ -53,6 +53,9 @@
# determines the environment workflow: DT, TT or ATT (default)
# example: -v workflow:DT
${workflow} ATT
+# KV Store Prefix
+# example: -v kvstoreprefix:voltha_voltha
+${kvstoreprefix} voltha_voltha
# flag debugmode is used, if true timeout calculation various, can be passed via the command line too
# example: -v debugmode:True
${debugmode} False
@@ -165,7 +168,8 @@
${LogInfo}= Catenate
... \r\nPassed arguments:
... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup},
- ... print2console:${print2console}, usekill2restart:${usekill2restart}, workflow:${workflow}
+ ... print2console:${print2console}, usekill2restart:${usekill2restart}, workflow:${workflow},
+ ... kvstoreprefix:${kvstoreprefix}
Log ${LogInfo} console=yes
Common Test Suite Setup
${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
@@ -186,7 +190,7 @@
Run Keyword If ${teardown_device} Delete All Devices and Verify
Run Keyword If ${usekill2restart} Restart Pod ${namespace} open-onu
Run Keyword Unless ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s
- ... Validate Onu Data In Etcd 0 without_pm_data=False
+ ... Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout}
Close All ONOS SSH Connections
@@ -231,7 +235,7 @@
Delete MIB Template Data
# check etcd data are empty
Run Keyword If ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s
- ... Validate Onu Data In Etcd 0 without_pm_data=False
+ ... Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
Sleep 5s
Do Reconcile In Determined State
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 68a86ff..ff2a9e7 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -185,7 +185,7 @@
... \r\nPassed arguments:
... state2test:${state2test}, testmode:${testmode}, techprofile:${techprofile},
... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup},
- ... print2console:${print2console}
+ ... print2console:${print2console}, kvstoreprefix:${kvstoreprefix}
Log ${LogInfo} console=yes
Common Test Suite Setup
# prepare skip message in yellow for console log
@@ -430,7 +430,7 @@
[Documentation] This keyword checks the loaded TechProfile
${namespace}= Set Variable default
${podname}= Set Variable etcd
- ${kvstoreprefix}= Get Kv Store Prefix
+ ${kvstoreprefix}= Get Kv Store Prefix ${kvstoreprefix}
${commandget} Catenate
... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/${kvstoreprefix}/technology_profiles/XGS-PON/64'
${result}= Exec Pod In Kube ${namespace} ${podname} ${commandget}