VOL-2668 Write separate wpa logs, stricter log check
Change-Id: I0885bb791df348f11b7824a05481251a453333f3
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 8ddbbe9..4e01212 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -107,13 +107,18 @@
[Documentation]
... Executes a particular reassociate request on the RG using wpa_cli.
... auth_pass determines if authentication should pass
+ ${wpa_log}= Catenate SEPARATOR=. /tmp/wpa ${iface} log
+ ${output}= Login And Run Command On Remote System truncate -s 0 ${wpa_log}; cat ${wpa_log}
+ ... ${ip} ${user} ${pass} ${container_type} ${container_name}
+ Log ${output}
+ Should Not Contain ${output} authentication completed successfully
WPA Reassociate ${iface} ${ip} ${user} ${pass} ${container_type} ${container_name}
Run Keyword If '${auth_pass}' == 'True' Wait Until Keyword Succeeds ${timeout} 2s
- ... Check Remote File Contents True /tmp/wpa.log authentication completed successfully
+ ... Check Remote File Contents True ${wpa_log} ${iface}.*authentication completed successfully
... ${ip} ${user} ${pass} ${container_type} ${container_name}
Run Keyword If '${auth_pass}' == 'False' Sleep 20s
Run Keyword If '${auth_pass}' == 'False' Check Remote File Contents False /tmp/wpa.log
- ... authentication completed successfully ${ip} ${user} ${pass}
+ ... ${iface}.*authentication completed successfully ${ip} ${user} ${pass}
... ${container_type} ${container_name}
Send Dhclient Request To Release Assigned IP
@@ -161,9 +166,11 @@
... ENABLED ACTIVE REACHABLE
... ${src['onu']} onu=True onu_reason=omci-flows-pushed
# Perform Authentication
+ ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
+ ... /tmp/wpa ${src['dp_iface_name']} log
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
+ ... ${src['container_type']} ${src['container_name']} ${wpa_log}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
... Verify ONU in AAA-Users ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
index e0883d7..4fe034d 100644
--- a/libraries/voltctl.robot
+++ b/libraries/voltctl.robot
@@ -419,5 +419,3 @@
Should Be Equal As Integers ${rc} 0
Run Keyword and Ignore Error Wait Until Keyword Succeeds 60s 1s Validate Device
... ENABLED DISCOVERED UNREACHABLE ${onu_id} onu=True
-
-
diff --git a/requirements.txt b/requirements.txt
index 572f40c..cf35ea1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -10,4 +10,4 @@
yamllint
# replace when we can use upstream (needs python 3.6)
git+https://github.com/zdw/robotframework-importresource@b81b87aabaee0594e966687b41e3674b866f28ee
-cord-robot==2.1.0
+cord-robot==2.1.1
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index f9bcfaa..98c243d 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -206,9 +206,11 @@
... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip}
... ${ONOS_SSH_PORT} ${onu_port}
+ ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
+ ... /tmp/wpa ${src['dp_iface_name']} log
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
+ ... ${src['container_type']} ${src['container_name']} ${wpa_log}
Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip}
... ${ONOS_SSH_PORT} ${onu_port}
END
@@ -275,9 +277,11 @@
... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip}
... ${ONOS_SSH_PORT} ${onu_port}
+ ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
+ ... /tmp/wpa ${src['dp_iface_name']} log
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
+ ... ${src['container_type']} ${src['container_name']} ${wpa_log}
Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip}
... ${ONOS_SSH_PORT} ${onu_port}
END
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 1d172a5..d925664 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -387,9 +387,11 @@
Disable Device ${onu_device_id}
Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN
... REACHABLE ${src['onu']} onu=false
+ ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
+ ... /tmp/wpa ${src['dp_iface_name']} log
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False
... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
+ ... ${src['container_type']} ${src['container_name']} ${wpa_log}
Enable Device ${onu_device_id}
Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']}
... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
@@ -398,7 +400,7 @@
... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
- ... ${src['container_type']} ${src['container_name']}
+ ... ${src['container_type']} ${src['container_name']} ${wpa_log}
Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
END
Run Keyword and Ignore Error Collect Logs