fix etcd data check - part III
- delete onu etcd data in suite setup to ensure clean etcd data
- validate etcd in both teardown, test as well suite with Wait Until Keyword Succeeds
- add a flag to decide etcd check is executed in test or suite teardown
- some small further improvements
Change-Id: If323a0ce85e46fda46ed5aaa229788260df27c83
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 755a0f9..ff7f136 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -214,6 +214,8 @@
Set Suite Variable ${onu_state}
# delete etcd MIB Template Data
Delete MIB Template Data
+ # delete etcd onu data
+ Delete ONU Go Adapter ETCD Data validate=True
Teardown Suite
[Documentation] Replaces the Suite Teardown in utils.robot.
@@ -223,7 +225,7 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Validate Onu Data In Etcd 0 ${kvstoreprefix} without_pm_data=False
+ Wait Until Keyword Succeeds ${timeout} 1s 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
Remove Tech Profile