X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Ftestsuite%2Fk8s_01-create_k8s_cluster.robot;h=a49bbd301629f640f38bc1b8f27caff9616ac1b9;hb=refs%2Fchanges%2F49%2F10649%2F2;hp=5be48001138e6ef64b0bf347982f601998dd5b11;hpb=79fcc85bc2682f83c2d18900662d13da747db5ca;p=osm%2Ftests.git diff --git a/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot b/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot index 5be4800..a49bbd3 100644 --- a/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot +++ b/robot-systest/testsuite/k8s_01-create_k8s_cluster.robot @@ -13,6 +13,8 @@ # limitations under the License. *** Settings *** +Documentation [K8s-01] Create K8s cluster. + Library OperatingSystem Library String Library Collections @@ -27,7 +29,9 @@ Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_01-create_k8s_cluster_data.py -Suite Teardown Run Keyword And Ignore Error Test Cleanup +Force Tags k8s_01 cluster_k8s regression + +Suite Teardown Run Keyword And Ignore Error Suite Cleanup *** Variables *** @@ -37,34 +41,28 @@ ${password} ${EMPTY} *** Test Cases *** Render a template - [Tags] newK8sCluster regression ${stdout}= Render template %{ROBOT_DEVOPS_FOLDER}/resources/${template} %{ROBOT_DEVOPS_FOLDER}/resources/${config_file} IP_VM1=%{IP_VM1} IP_VM2=%{IP_VM2} IP_VM3=%{IP_VM3} IP_VM4=%{IP_VM4} IP_JUJU=%{IP_JUJU} NETWORK=%{VIM_MGMT_NET} Log To Console \n${stdout} Create Controller VNF Descriptor - [Tags] newK8sCluster regression Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg1}' Create Machines VNF Descriptor - [Tags] newK8sCluster regression Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg2}' Create K8s Cluster NS Descriptor - [Tags] newK8sCluster regression Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' Instantiate K8s Cluster Network Service - [Tags] newK8sCluster regression ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ns_config=${EMPTY} publickey=${publickey} ns_launch_max_wait_time=70min config_file=%{ROBOT_DEVOPS_FOLDER}/resources/${config_file} Set Suite Variable ${ns_id} ${id} Get Management Ip Addresses - [Tags] newK8sCluster regression ${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1} log ${ip_addr_1} @@ -83,7 +81,6 @@ Get Management Ip Addresses Set Suite Variable ${vnf_5_ip_addr} ${ip_addr_5} Test SSH Access - [Tags] newK8sCluster regression Variable Should Exist ${vnf_1_ip_addr} msg=IP address of the management VNF '${vnf_member_index_1}' is not available Variable Should Exist ${vnf_2_ip_addr} msg=IP address of the management VNF '${vnf_member_index_2}' is not available @@ -98,37 +95,36 @@ Test SSH Access Test SSH Connection ${vnf_5_ip_addr} ${username} ${password} ${privatekey} Check kubeconfig file - [Tags] newK8sCluster regression Check If remote File Exists ${vnf_5_ip_addr} ${username} ${password} ${privatekey} ${kubeconfig_file} Delete NS Instance - [Tags] newK8sCluster regression cleanup + [Tags] cleanup Delete NS ${ns_name} Delete NS Descriptor - [Tags] newK8sCluster regression cleanup + [Tags] cleanup Delete NSD ${nsd_name} Delete Controller VNF Descriptor - [Tags] newK8sCluster regression cleanup + [Tags] cleanup Delete VNFD ${vnfd_name1} Delete Machines VNF Descriptor - [Tags] newK8sCluster regression cleanup + [Tags] cleanup Delete VNFD ${vnfd_name2} *** Keywords *** -Test Cleanup +Suite Cleanup [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance - Run Keyword If Test Failed Delete NS ${ns_name} - Run Keyword If Test Failed Delete NSD ${nsd_name} - Run Keyword If Test Failed Delete VNFD ${vnfd_name} + Run Keyword If Any Tests Failed Delete NS ${ns_name} + Run Keyword If Any Tests Failed Delete NSD ${nsd_name} + Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name}