[VOL-2495]Realign failure testcases
Change-Id: I82b16e3dbc2814a2881acd80d63197b2e86190f2
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index ca3e153..df4bde8 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -101,6 +101,53 @@
Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
Log to console Pod ${podName} restarted and sanity checks passed successfully
+Check ONU adapter crash not forcing authentication again
+ [Documentation] After ONU adapter restart, checks wpa log for 'authentication started'
+ ... message count to make sure auth not started again and validates EAP status and ping.
+ ... Assuming that test1 or sanity was executed where all the ONUs are authenticated/DHCP/pingable
+ [Tags] functional ONUAdaptCrash notready
+ [Setup] None
+ [Teardown] None
+ @{before_list}= Create List
+ @{after_list}= Create List
+ FOR ${I} IN RANGE 0 ${num_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${onu_device_id}= Get Device ID From SN ${src['onu']}
+ ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
+ ... ${of_id}
+ ${before}= Run Keyword If ${has_dataplane} Check Remote File Contents For WPA Logs
+ ... True /tmp/wpa.log authentication started ${src['ip']} ${src['user']} ${src['pass']}
+ ... ${src['container_type']} ${src['container_name']}
+ Append To List ${before_list} ${before}
+ END
+ Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${NAMESPACE} adapter-open-onu
+ Wait Until Keyword Succeeds ${timeout} 2s Validate Pod Status ${podName} ${NAMESPACE}
+ ... Running
+ FOR ${I} IN RANGE 0 ${num_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${onu_device_id}= Get Device ID From SN ${src['onu']}
+ ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
+ ... ${of_id}
+ ${after}= Run Keyword If ${has_dataplane} Check Remote File Contents For WPA Logs
+ ... True /tmp/wpa.log authentication started ${src['ip']} ${src['user']} ${src['pass']}
+ ... ${src['container_type']} ${src['container_name']}
+ Append To List ${after_list} ${after}
+ ${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System
+ ... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']}
+ ... ${src['container_type']} ${src['container_name']}
+ Run Keyword If ${has_dataplane} Should Contain ${output} SUCCESS
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds 60s 2s Check Ping
+ ... True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']} ${src['user']}
+ ... ${src['pass']} ${src['container_type']} ${src['container_name']}
+ END
+ Lists Should Be Equal ${after_list} ${before_list}
+ Log ${after_list}
+ Log ${before_list}
+ Run Keyword and Ignore Error Collect Logs
+
Verify ONU after rebooting physically
[Documentation] Test the ONU funcaionality by physically turning on/off ONU.
... Prerequisite : Subscriber are authenticated/DHCP/pingable state
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 7b8cb46..323e979 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -260,54 +260,6 @@
Run Keyword and Ignore Error Collect Logs
END
-Check ONU adapter crash not forcing authentication again
- [Documentation] After ONU adapter restart, checks wpa log for 'authentication started'
- ... message count to make sure auth not started again and validates EAP status and ping.
- ... Assuming that test1 or sanity was executed where all the ONUs are authenticated/DHCP/pingable
- [Tags] functional ONUAdaptCrash notready
- [Setup] Announce Message START TEST ONUAdaptCrash
- [Teardown] Run Keywords Collect Logs
- ... AND Announce Message END TEST ONUAdaptCrash
- @{before_list}= Create List
- @{after_list}= Create List
- FOR ${I} IN RANGE 0 ${num_onus}
- ${src}= Set Variable ${hosts.src[${I}]}
- ${dst}= Set Variable ${hosts.dst[${I}]}
- ${onu_device_id}= Get Device ID From SN ${src['onu']}
- ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
- ${before}= Run Keyword If ${has_dataplane} Check Remote File Contents For WPA Logs
- ... True /tmp/wpa.log authentication started ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
- Append To List ${before_list} ${before}
- END
- Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${NAMESPACE} adapter-open-onu
- Wait Until Keyword Succeeds ${timeout} 2s Validate Pod Status ${podName} ${NAMESPACE}
- ... Running
- FOR ${I} IN RANGE 0 ${num_onus}
- ${src}= Set Variable ${hosts.src[${I}]}
- ${dst}= Set Variable ${hosts.dst[${I}]}
- ${onu_device_id}= Get Device ID From SN ${src['onu']}
- ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
- ${after}= Run Keyword If ${has_dataplane} Check Remote File Contents For WPA Logs
- ... True /tmp/wpa.log authentication started ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
- Append To List ${after_list} ${after}
- ${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System
- ... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
- Run Keyword If ${has_dataplane} Should Contain ${output} SUCCESS
- Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
- ... Wait Until Keyword Succeeds 60s 2s Check Ping
- ... True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']} ${src['user']}
- ... ${src['pass']} ${src['container_type']} ${src['container_name']}
- END
- Lists Should Be Equal ${after_list} ${before_list}
- Log ${after_list}
- Log ${before_list}
-
-
Test Disable and Enable ONU scenario for ATT workflow
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable