From: garciaale Date: Thu, 19 Nov 2020 21:05:13 +0000 (+0000) Subject: Fixes tests QUOTAS-01, BASIC-08 and hackfest_cloudinit for SOL006 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fsol006;p=osm%2Ftests.git Fixes tests QUOTAS-01, BASIC-08 and hackfest_cloudinit for SOL006 Change-Id: I65ad52a95666e41a9f76525447ea19f3265e907d Signed-off-by: garciaale --- diff --git a/docker/Dockerfile b/docker/Dockerfile index 97b8222..72bf215 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,11 +25,11 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git soft RUN add-apt-repository -y ppa:rmescandon/yq && apt update && apt install yq -y RUN python3 -m pip install haikunator requests robotframework robotframework-seleniumlibrary robotframework-requests robotframework-jsonlibrary \ - robotframework-sshlibrary charm-tools git+https://osm.etsi.org/gerrit/osm/IM.git git+https://osm.etsi.org/gerrit/osm/osmclient.git + robotframework-sshlibrary charm-tools git+https://osm.etsi.org/gerrit/osm/IM.git@sol006 git+https://osm.etsi.org/gerrit/osm/osmclient.git@sol006 # Preparing working environment WORKDIR /robot-systest -RUN git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages +RUN git clone --branch sol006 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git --recurse-submodules /robot-systest/osm-packages # Copy robot folder and charm.sh COPY robot-systest /robot-systest diff --git a/robot-systest/lib/vnf_lib.robot b/robot-systest/lib/vnf_lib.robot index 12f44bc..eda7ff4 100644 --- a/robot-systest/lib/vnf_lib.robot +++ b/robot-systest/lib/vnf_lib.robot @@ -19,7 +19,7 @@ Get VNF VIM ID [Arguments] ${vnf_id} Should Not Be Empty ${vnf_id} - ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | grep vim-id | awk '{print $2}' + ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | grep vim_id | awk '{print $2}' log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${stdout} diff --git a/robot-systest/resources/basic_08-disable_port_security_network_level_data.py b/robot-systest/resources/basic_08-disable_port_security_network_level_data.py index 2c15871..f4ee5f3 100644 --- a/robot-systest/resources/basic_08-disable_port_security_network_level_data.py +++ b/robot-systest/resources/basic_08-disable_port_security_network_level_data.py @@ -64,6 +64,7 @@ if vim_user_domain_name: if vim_insecure: vim_config_dict["insecure"] = True vim_config_dict["disable_network_port_security"] = True +vim_config_dict["management_network_name"] = os.environ.get("VIM_MGMT_NET") vim_config = "'{}'".format(yaml.safe_dump(vim_config_dict, default_flow_style=True, width=10000).rstrip('\r\n')) # Get ${HOME} from local machine diff --git a/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot b/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot index 8535014..7e65c9e 100644 --- a/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot +++ b/robot-systest/testsuite/basic_08-disable_port_security_network_level.robot @@ -61,8 +61,8 @@ Instantiate Network Service Check Port Security Is Disabled [Tags] disable_port_security sanity regression - ${rc} ${disabled_ports}= Run and Return RC and Output osm ns-show ${ns_name} | grep -c '${port_disabled_msg}' - Run Keyword Unless ${disabled_ports} > 6 Fail msg=Found only '${disabled_ports}' matches for '${port_disabled_msg}' + ${rc} ${disabled_ports}= Run and Return RC and Output osm ns-show ${ns_name} --literal | grep -c '${port_disabled_msg}' + Run Keyword Unless ${disabled_ports} > 0 Fail msg=Found '${disabled_ports}' matches for '${port_disabled_msg}' Delete NS Instance diff --git a/robot-systest/testsuite/hackfest_cloudinit.robot b/robot-systest/testsuite/hackfest_cloudinit.robot index 2fb79fa..3ac1189 100644 --- a/robot-systest/testsuite/hackfest_cloudinit.robot +++ b/robot-systest/testsuite/hackfest_cloudinit.robot @@ -31,7 +31,7 @@ Suite Teardown Run Keyword And Ignore Error Suite Cleanup *** Variables *** ${ns_id} ${EMPTY} ${username} ubuntu -${password} ${EMPTY} +${password} osm4u ${vnf_member_index} 1 ${vnf_ip_addr} ${EMPTY} ${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] } @@ -53,7 +53,7 @@ Create Hackfest Cloudinit NS Descriptor Network Service Instance Test [Tags] hackfest_cloudinit sanity regression - ${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} ${EMPTY} Set Suite Variable ${ns_id} ${id} diff --git a/robot-systest/testsuite/quotas_01-quota_enforcement.robot b/robot-systest/testsuite/quotas_01-quota_enforcement.robot index e0cb576..db91be0 100644 --- a/robot-systest/testsuite/quotas_01-quota_enforcement.robot +++ b/robot-systest/testsuite/quotas_01-quota_enforcement.robot @@ -80,8 +80,8 @@ Change First Project Name to Third Project Name Create VNFDs On Third Project Until Exceed Quota [Tags] quota_enforcement sanity regression - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v1;name=v1' - Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v2;name=v2' + Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v1;product-name=v1' + Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v2;product-name=v2' Increase Third Project Quotas @@ -95,18 +95,18 @@ Increase Third Project Quotas Create More VNFDs On Third Project Until Exceed Quota [Tags] quota_enforcement sanity regression - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v2;name=v2' - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v3;name=v3' - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v4;name=v4' - Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v5;name=v5' - Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v6;name=v6' + Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v2;product-name=v2' + Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v3;product-name=v3' + Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v4;product-name=v4' + Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v5;product-name=v5' + Run Keyword And Expect Error * Create VNFD In Project ${project_3_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=v6;product-name=v6' Create VNFDs On Second Project Until Exceed Quota [Tags] quota_enforcement sanity regression - Create VNFD In Project ${project_2_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=vp2_1;name=vp2_1' - Run Keyword And Expect Error * Create VNFD In Project ${project_2_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=vp2_2;name=vp2_2' + Create VNFD In Project ${project_2_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=vp2_1;product-name=vp2_1' + Run Keyword And Expect Error * Create VNFD In Project ${project_2_name} ${vnfd_pkg} ${user_name} ${user_password} override='id=vp2_2;product-name=vp2_2' Check Project Scopes