From: garciadeblas Date: Tue, 22 Sep 2020 14:37:39 +0000 (+0200) Subject: Fix K8s cluster tests to check that the k8s cluster is enabled X-Git-Tag: release-v9.0-start~23 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F70%2F9770%2F1;p=osm%2Ftests.git Fix K8s cluster tests to check that the k8s cluster is enabled Fixes bug 1224 Change-Id: I4f15c7f39a7396a867a38a71ba8a15c1b68f3979 Signed-off-by: garciadeblas --- diff --git a/robot-systest/lib/k8scluster_lib.robot b/robot-systest/lib/k8scluster_lib.robot index b663d52..8a68bce 100644 --- a/robot-systest/lib/k8scluster_lib.robot +++ b/robot-systest/lib/k8scluster_lib.robot @@ -14,7 +14,7 @@ *** Variables *** ${success_return_code} 0 -${k8scluster_launch_max_wait_time} 5min +${k8scluster_launch_max_wait_time} 6min ${k8scluster_launch_pol_time} 30sec ${k8scluster_delete_max_wait_time} 2min ${k8scluster_delete_pol_time} 15sec @@ -26,6 +26,7 @@ Create K8s Cluster log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} WAIT UNTIL KEYWORD SUCCEEDS ${k8scluster_launch_max_wait_time} ${k8scluster_launch_pol_time} Check For K8s Cluster To Be Ready ${k8scluster_name} + Check For K8s Cluster To Be Enabled ${k8scluster_name} [Return] ${stdout} Delete K8s Cluster @@ -52,6 +53,12 @@ Check For K8s Cluster To Be Deleted Should Be Empty ${stdout} Check For K8s Cluster To Be Ready + [Arguments] ${k8scluster_name} + ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}" --filter _admin.operationalState="ENABLED,DEGRADED" | awk '{print $2}' | grep ${k8scluster_name} + Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Strings ${stdout} ${k8scluster_name} + +Check For K8s Cluster To Be Enabled [Arguments] ${k8scluster_name} ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}" --filter _admin.operationalState="ENABLED" | awk '{print $2}' | grep ${k8scluster_name} Should Be Equal As Integers ${rc} ${success_return_code}