Build virtualenv using the Makefile
Add tidy target (don't use yet as there's a bug)
Make lint target cover all the files
Start at documentation generation using libdoc/testdoc within robot
Change-Id: I8117baf4bd006588ae9383e0731c49e17102348c
diff --git a/tests/Voltha_PODTests.robot b/tests/Voltha_PODTests.robot
index f55afc0..6d1949d 100644
--- a/tests/Voltha_PODTests.robot
+++ b/tests/Voltha_PODTests.robot
@@ -13,7 +13,7 @@
# limitations under the License.
*** Settings ***
-Documentation Test various end-to-end scenarios
+Documentation Test various end-to-end scenarios
Suite Setup Setup Suite
Test Setup Setup
Test Teardown Teardown
@@ -33,38 +33,41 @@
Resource ../variables/variables.robot
*** Variables ***
-${POD_NAME} flex-ocp-cord
-${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
-${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
-#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
-${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
-${HELM_CHARTS_DIR} ~/helm-charts
-${VOLTHA_POD_NUM} 8
-${timeout} 90s
-${num_onus} 1
-${of_id} 0
-${logical_id} 0
+${POD_NAME} flex-ocp-cord
+${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
+${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
+#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
+${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
+${HELM_CHARTS_DIR} ~/helm-charts
+${VOLTHA_POD_NUM} 8
+${timeout} 90s
+${num_onus} 1
+${of_id} 0
+${logical_id} 0
*** Test Cases ***
Sanity E2E Test for OLT/ONU on POD
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
... Validate successful authentication/DHCP/E2E ping for the tech profile that is used
- #[Setup] Clean Up Linux
[Tags] test1
- ${of_id}= Wait Until Keyword Succeeds 60s 15s Validate OLT Device in ONOS ${olt_serial_number}
- #Wait Until Keyword Succeeds 60s 2s Verify Eapol Flows Added ${k8s_node_ip} ${ONOS_SSH_PORT} 5
- Validate Authentication True ${src0['dp_iface_name']} wpa_supplicant.conf ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']}
+ #[Setup] Clean Up Linux
+ ${of_id}= Wait Until Keyword Succeeds 60s 15s Validate OLT Device in ONOS ${olt_serial_number}
+ #Wait Until Keyword Succeeds 60s 2s Verify Eapol Flows Added ${k8s_node_ip} ${ONOS_SSH_PORT} 5
+ Validate Authentication True ${src0['dp_iface_name']} wpa_supplicant.conf ${src0['ip']} ${src0['user']} ${src0['pass']}
+ ... ${src0['container_type']} ${src0['container_name']}
#Validate ONU authenticated in ONOS
Wait Until Keyword Succeeds 90s 2s Verify Number of AAA-Users ${k8s_node_ip} ${ONOS_SSH_PORT} ${num_onus}
Wait Until Keyword Succeeds 60s 2s Execute ONOS Command ${k8s_node_ip} ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} 16
# Perform dhclient and ping operations
- Validate DHCP and Ping True True ${src0['dp_iface_name']} ${src0['s_tag']} ${src0['c_tag']} ${dst0['dp_iface_ip_qinq']} ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']} ${dst0['dp_iface_name']} ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
+ Validate DHCP and Ping True True ${src0['dp_iface_name']} ${src0['s_tag']} ${src0['c_tag']} ${dst0['dp_iface_ip_qinq']}
+ ... ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']} ${dst0['dp_iface_name']}
+ ... ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
#Validate DHCP allocation in ONOS
- Wait Until Keyword Succeeds 60s 2s Validate DHCP Allocations ${k8s_node_ip} ${ONOS_SSH_PORT} ${num_onus}
-
+ Wait Until Keyword Succeeds 60s 2s Validate DHCP Allocations ${k8s_node_ip} ${ONOS_SSH_PORT} ${num_onus}
*** Keywords ***
Setup Suite
+ [Documentation] Setup the whole test suite
Set Global Variable ${KUBECTL_CONFIG} export KUBECONFIG=%{KUBECONFIG}
Set Global Variable ${export_kubeconfig} export KUBECONFIG=${KUBERNETES_CONF}
Set Global Variable ${of_id}
@@ -104,15 +107,18 @@
Set Suite Variable ${datetime}
Setup
+ [Documentation] Pre-test Setup
#create/preprovision device
${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT}
Set Suite Variable ${olt_device_id}
#enable device
Enable Device ${olt_device_id}
#validate olt states
- Wait Until Keyword Succeeds 60s 5s Validate Device ${olt_serial_number} ENABLED ACTIVE REACHABLE
+ Wait Until Keyword Succeeds 60s 5s Validate Device ${olt_serial_number} ENABLED ACTIVE
+ ... REACHABLE
#validate onu states
- Wait Until Keyword Succeeds 60s 5s Validate Device ${onu_serial_number} ENABLED ACTIVE REACHABLE onu=True onu_reason=tech-profile-config-download-success
+ Wait Until Keyword Succeeds 60s 5s Validate Device ${onu_serial_number} ENABLED ACTIVE
+ ... REACHABLE onu=True onu_reason=tech-profile-config-download-success
#get onu device id
${onu_device_id}= Get Device ID From SN ${onu_serial_number}
Set Suite Variable ${onu_device_id}
@@ -129,9 +135,12 @@
Clean Up Linux
[Documentation] Kill processes and clean up interfaces on src+dst servers
- Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']}
- Run Keyword And Ignore Error Kill Linux Process [d]hclient ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']}
- Run Keyword If '${dst0['ip']}' != '${None}' Run Keyword And Ignore Error Kill Linux Process [d]hcpd ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
+ Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']}
+ ... ${src0['container_name']}
+ Run Keyword And Ignore Error Kill Linux Process [d]hclient ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']}
+ ... ${src0['container_name']}
+ Run Keyword If '${dst0['ip']}' != '${None}' Run Keyword And Ignore Error Kill Linux Process [d]hcpd ${dst0['ip']} ${dst0['user']}
+ ... ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
Delete IP Addresses from Interface on Remote Host ${src0['dp_iface_name']} ${src0['ip']} ${src0['user']} ${src0['pass']} ${src0['container_type']} ${src0['container_name']}
- Run Keyword If '${dst0['ip']}' != '${None}' Delete Interface on Remote Host ${dst0['dp_iface_name']}.${src0['s_tag']} ${dst0['ip']} ${dst0['user']} ${dst0['pass']} ${dst0['container_type']} ${dst0['container_name']}
-
+ Run Keyword If '${dst0['ip']}' != '${None}' Delete Interface on Remote Host ${dst0['dp_iface_name']}.${src0['s_tag']} ${dst0['ip']} ${dst0['user']} ${dst0['pass']}
+ ... ${dst0['container_type']} ${dst0['container_name']}