From 9f2d28af31eb856a56da4f3e0eb7cf0267e89e74 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Wed, 2 Oct 2024 15:44:44 +0200 Subject: [PATCH] Fix basic30 to add timeout for dhclient execution Change-Id: Iee8c4e1344af6219b4fb27841d689e6ab51a658b Signed-off-by: garciadeblas --- robot-systest/testsuite/basic_30-ns_ipv6_profile.robot | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot b/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot index 8b2e16c..dee0512 100644 --- a/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot +++ b/robot-systest/testsuite/basic_30-ns_ipv6_profile.robot @@ -107,7 +107,9 @@ Verify Vnf1 Interfaces Variable Should Exist ${VNF1_IPMGMT} msg=IP address of the data VNF '${VNF_MEMBER_INDEX_1}' is not available Variable Should Exist ${PRIVATEKEY} msg=SSH private key not available Sleep 120 seconds Wait for SSH daemon to be up - ${stdout}= Execute Remote Command Check Rc Return Output ${VNF1_IPMGMT} ${USERNAME} ${EMPTY} ${PRIVATEKEY} sudo dhclient -6 ens4 ; ip --brief addr show up | grep -v "^lo" | awk '{print $3}' + ${stdout}= Execute Remote Command Check Rc Return Output ${VNF1_IPMGMT} ${USERNAME} ${EMPTY} ${PRIVATEKEY} sudo timeout 30s dhclient -v -6 ens4 + Log ${stdout} + ${stdout}= Execute Remote Command Check Rc Return Output ${VNF1_IPMGMT} ${USERNAME} ${EMPTY} ${PRIVATEKEY} ip --brief addr show up | grep -v "^lo" | awk '{print $3}' Log ${stdout} @{ip}= Split String ${stdout} Should Match Regexp ${ip}[1] ${DATANET1_PREFIX} msg=${ip}[1] doesn't match subnet's regexp ${DATANET1_PREFIX} @@ -116,7 +118,9 @@ Verify Vnf2 Interfaces [Documentation] Check whether IP addresses of the second VNF configured inside the VM meet the expected CIDR. Variable Should Exist ${VNF2_IPMGMT} msg=IP address of the data VNF '${VNF_MEMBER_INDEX_2}' is not available Variable Should Exist ${PRIVATEKEY} msg=SSH private key not available - ${stdout}= Execute Remote Command Check Rc Return Output ${VNF2_IPMGMT} ${USERNAME} ${EMPTY} ${PRIVATEKEY} sudo dhclient -6 ens4 ; ip --brief addr show up | grep -v "^lo" | awk '{print $3}' + ${stdout}= Execute Remote Command Check Rc Return Output ${VNF2_IPMGMT} ${USERNAME} ${EMPTY} ${PRIVATEKEY} sudo timeout 30s dhclient -v -6 ens4 + Log ${stdout} + ${stdout}= Execute Remote Command Check Rc Return Output ${VNF2_IPMGMT} ${USERNAME} ${EMPTY} ${PRIVATEKEY} ip --brief addr show up | grep -v "^lo" | awk '{print $3}' Log ${stdout} @{ip}= Split String ${stdout} Should Match Regexp ${ip}[1] ${DATANET1_PREFIX} msg=${ip}[1] doesn't match subnet's regexp ${DATANET1_PREFIX} -- 2.25.1