Fix for Robot tests: implement adjustable timeouts for slow NS (basic_03, basic_06, basic_07
Change-Id: I73f2cc91b2872b9a7a9e9cd1cc4953133d4cd24c
Signed-off-by: ramonsalguer <javier.ramon@telefonica.com>
diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot
index fb4561e..6a8c84b 100644
--- a/robot-systest/lib/ns_lib.robot
+++ b/robot-systest/lib/ns_lib.robot
@@ -12,7 +12,6 @@
*** Variables ***
${success_return_code} 0
-${ns_launch_max_wait_time} 5min
${ns_launch_pol_time} 30sec
${ns_delete_max_wait_time} 1min
${ns_delete_pol_time} 15sec
@@ -24,7 +23,7 @@
*** Keywords ***
Create Network Service
- [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey}
+ [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey} ${ns_launch_max_wait_time}=5min
${config_attr} Set Variable If '${ns_config}'!='${EMPTY}' --config '${ns_config}' \
${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \
diff --git a/robot-systest/testsuite/basic_06-vnf_with_charm.robot b/robot-systest/testsuite/basic_06-vnf_with_charm.robot
index b42ba27..2514ce2 100644
--- a/robot-systest/testsuite/basic_06-vnf_with_charm.robot
+++ b/robot-systest/testsuite/basic_06-vnf_with_charm.robot
@@ -36,6 +36,7 @@
${day_1_file_name} /home/ubuntu/first-touch
${day_2_file_name_1} /home/ubuntu/mytouch1
${day_2_file_name_2} /home/ubuntu/mytouch2
+${ns_timeout} 15min
*** Test Cases ***
@@ -54,7 +55,7 @@
Instantiate Charm Network Service
[Tags] charm
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
+ ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} ${ns_timeout}
Set Suite Variable ${ns_id} ${id}
diff --git a/robot-systest/testsuite/basic_07-secure_key_management.robot b/robot-systest/testsuite/basic_07-secure_key_management.robot
index 98e6edf..b0e0377 100644
--- a/robot-systest/testsuite/basic_07-secure_key_management.robot
+++ b/robot-systest/testsuite/basic_07-secure_key_management.robot
@@ -34,6 +34,7 @@
${vnf_member_index} 1
${day_1_file_name} /home/ubuntu/first-touch
${day_2_file_name} /home/ubuntu/mytouch1
+${ns_timeout} 15min
*** Test Cases ***
@@ -52,7 +53,7 @@
Instantiate Nopasswd Charm Network Service
[Tags] nopasswd
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${EMPTY}
+ ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${EMPTY} ${ns_timeout}
Set Suite Variable ${ns_id} ${id}
diff --git a/robot-systest/testsuite/hackfest_multivdu.robot b/robot-systest/testsuite/hackfest_multivdu.robot
index 508d11f..7c5abed 100644
--- a/robot-systest/testsuite/hackfest_multivdu.robot
+++ b/robot-systest/testsuite/hackfest_multivdu.robot
@@ -35,6 +35,7 @@
${vnf_member_index} 1
${vnf_ip_addr} ${EMPTY}
${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
+${wait_guard_for_vm_boot} 50s
# ${ns_config} ${EMPTY}
*** Test Cases ***
@@ -56,7 +57,7 @@
Run Keyword If "${status}" == "FAIL" Set Global Variable ${publickey} ${EMPTY}
${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
Set Suite Variable ${ns_id} ${id}
-
+ Sleep ${wait_guard_for_vm_boot} Waiting for VM's daemons to be up and running
Get Vnf Ip Address
[Tags] hackfest_multivdu
@@ -71,7 +72,6 @@
Test SSH Access
[Tags] hackfest_multivdu
- Sleep 30s Waiting ssh daemon to be up
${status} ${message}= Run Keyword And Ignore Error Variable Should Exist ${privatekey}
Run Keyword If "${status}" == "FAIL" Set Global Variable ${privatekey} ${EMPTY}
Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${privatekey}