From f21d9da8d739bf889ee49ef3ee8fb2d252ab858f Mon Sep 17 00:00:00 2001 From: yadavmr Date: Tue, 5 Nov 2019 11:42:57 +0530 Subject: [PATCH] Bug 873: Robot Automation improvement to install chrome driver only for gui test Change-Id: If11bbb9a2f8e0b011fcdc3d16d7a6b72a035343f Signed-off-by: yadavmr --- robot-systest/lib/cli/ns_lib.robot | 50 +++++++++---------- robot-systest/lib/cli/sdnc_account_lib.robot | 8 +-- robot-systest/lib/cli/vim_account_lib.robot | 21 +++++++- robot-systest/run_test.sh | 17 ++++--- .../testsuite/cli/TS01__Test_VNF.robot | 7 --- .../cli/TS03__Hackfest_Basic_NS.robot | 6 --- .../cli/TS04__Hackfest_Simplecharm_NS.robot | 10 +--- .../cli/TS05__Hackfest_Multivdu_NS.robot | 6 --- .../cli/TS06__Hackfest_Cloudinit_NS.robot | 6 --- .../testsuite/cli/TS07__Hackfest_EPA_NS.robot | 6 --- robot-systest/testsuite/cli/__init__.robot | 39 +++++++++++++++ .../TS01__OSMClient_Library_Test.robot | 2 +- 12 files changed, 99 insertions(+), 79 deletions(-) create mode 100644 robot-systest/testsuite/cli/__init__.robot diff --git a/robot-systest/lib/cli/ns_lib.robot b/robot-systest/lib/cli/ns_lib.robot index e3e3a021..18f6430c 100644 --- a/robot-systest/lib/cli/ns_lib.robot +++ b/robot-systest/lib/cli/ns_lib.robot @@ -35,59 +35,59 @@ ${ns_delete_pol_time} 15sec Get NS List [Documentation] Get ns instance list - ${rc} ${stdout}= Run and Return RC and Output osm ns-list + ${rc} ${stdout}= Run and Return RC and Output osm ns-list log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} Launch Network Services and Return [Arguments] ${vim_name} - - Should Not Be Empty ${nsd_ids} There are no NS descriptors to launch the NS + + Should Not Be Empty ${nsd_ids} There are no NS descriptors to launch the NS :FOR ${nsd} IN @{nsd_ids} \ ${ns_name}= GENERATE NAME \ Append To List ${ns_ids} ${ns_name} \ Create Network Service ${nsd} ${vim_name} ${ns_name} \ Delete NS ${ns_name} - + Create Network Service [Documentation] Create ns at osm [Arguments] ${nsd} ${vim_name} ${ns_name} - ${ns_config}= Get Environment Variable NS_CONFIG ${EMPTY} - Run Keyword If ${ns_config}!='${EMPTY}' Create Network Service With Config ${nsd} ${vim_name} ${ns_name} ${ns_config} - ... ELSE Create Network Service Without Config ${nsd} ${vim_name} ${ns_name} - + ${ns_config}= Get Environment Variable NS_CONFIG '' + Run Keyword If ${ns_config}!='' Create Network Service With Config ${nsd} ${vim_name} ${ns_name} ${ns_config} + ... ELSE Create Network Service Without Config ${nsd} ${vim_name} ${ns_name} + WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For NS Instance To Configured ${ns_name} Check For NS Instance For Failure ${ns_name} - + Create Network Service Without Config [Documentation] Create ns at osm [Arguments] ${nsd} ${vim_name} ${ns_name} - ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} + ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} Create Network Service With Config [Documentation] Create ns at osm [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} - ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} --config ${ns_config} + ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} --config ${ns_config} log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} + - Delete NS [Documentation] Delete ns [Arguments] ${ns} - ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns} + ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns} log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Delete ${ns} @@ -95,27 +95,27 @@ Delete NS Check For NS Instance To Configured [Arguments] ${ns_name} - ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" + ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} Should Contain Any ${stdout} configured failed Check For NS Instance For Failure [Arguments] ${ns_name} - ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" + ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} Should Not Contain ${stdout} failed Check For NS Instance To Be Delete [Arguments] ${ns} - ${rc} ${stdout}= Run and Return RC and Output osm ns-list + ${rc} ${stdout}= Run and Return RC and Output osm ns-list log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} Should Not Contain ${stdout} ${ns} @@ -123,7 +123,7 @@ Force Delete NS [Documentation] Forcely Delete ns [Arguments] ${ns} - ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns} + ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns} log ${stdout} - Should Be Equal As Integers ${rc} ${success_return_code} + Should Be Equal As Integers ${rc} ${success_return_code} WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Delete ${ns} diff --git a/robot-systest/lib/cli/sdnc_account_lib.robot b/robot-systest/lib/cli/sdnc_account_lib.robot index 3085c1c5..71680b89 100644 --- a/robot-systest/lib/cli/sdnc_account_lib.robot +++ b/robot-systest/lib/cli/sdnc_account_lib.robot @@ -27,14 +27,14 @@ ${password} "admin" ${ip} "1.1.1.1" ${type} "onos" ${port} "5858" -${dpid} "" +${dpid} "a7:2f:aa:be:C3:c1:fe:C9" *** Keywords *** Create SDNC Account [Documentation] create new sdnc account - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-create --name ${name} --type ${type} --ip-address ${ip} --user ${user} --password ${password} --port ${port} --switch_dpid ${dpid} return_rc=True + ${rc} ${stdout}= Run and Return RC and Output osm sdnc-create --name ${name} --type ${type} --ip_address ${ip} --user ${user} --password ${password} --port ${port} --switch_dpid ${dpid} log ${rc} log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} @@ -50,7 +50,7 @@ Get SDNC List Show SDNC Account [Documentation] Get sdnc account details - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${name} return_rc=True + ${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${name} log ${rc} log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} @@ -59,7 +59,7 @@ Show SDNC Account Delete SDNC Account [Documentation] Get sdnc account details - ${rc} ${stdout}= Run and Return RC and Output osm sdnc-delete ${name} return_rc=True + ${rc} ${stdout}= Run and Return RC and Output osm sdnc-delete ${name} log ${rc} log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} \ No newline at end of file diff --git a/robot-systest/lib/cli/vim_account_lib.robot b/robot-systest/lib/cli/vim_account_lib.robot index 699d1991..76e6ff14 100644 --- a/robot-systest/lib/cli/vim_account_lib.robot +++ b/robot-systest/lib/cli/vim_account_lib.robot @@ -22,13 +22,19 @@ # 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019 ## +*** Settings *** +Library OperatingSystem +Library String +Library Collections +Library ../custom_lib.py + *** Variables *** ${success_return_code} 0 ${name} "helloworld-os" ${user} "robottest" ${password} "fred" -${authurl} "https://169.254.169.245/" +${authurl} "https://127.0.0.1/" ${type} "openstack" ${desc} "a test vim" ${tenant} "robottest2" @@ -63,16 +69,18 @@ Delete Vim Account VIM Setup To Launch Network Services [Documentation] Setup a VIM to launch network services + set global variable @{vim} ${vmware_url}= Get Environment Variable VCD_AUTH_URL ${EMPTY} ${openstack_url}= Get Environment Variable OS_AUTH_URL ${EMPTY} ${vmware_vim}= Run Keyword And Return If '${vmware_url}'!='${EMPTY}' Setup Vmware Vim ${vmware_url} 'vmware' 'pytest system test' ${openstack_vim}= Run Keyword And Return If '${openstack_url}'!='${EMPTY}' Setup Openstack Vim ${openstack_url} 'openstack' 'pytest system test' - + Should Not Be Empty ${vim} VIM details not provided Log Many @{vim} Setup Openstack Vim [Documentation] Openstack Vim Account Setup + [Tags] vim-setup [Arguments] ${authurl} ${type} ${desc} ${user}= Get Environment Variable OS_USERNAME '' @@ -84,12 +92,17 @@ Setup Openstack Vim ${rc} ${stdout}= Run and Return RC and Output osm vim-create --name ${vim_name} --user ${user} --password ${password} --auth_url ${authurl} --tenant ${tenant} --account_type ${type} --description ${desc} --config ${vim-config} log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} + Sleep 30s Wait for to get vim ready + ${rc} ${vim_detail}= Run and Return RC and Output osm vim-show ${vim_name} + Should Contain ${vim_detail} "operationalState": "ENABLED" msg=Openstack vim is not available values=False Append To List ${vim} ${stdout} + [Return] ${stdout} Setup Vmware Vim [Documentation] Vmware Vim Account Setup + [Tags] vim-setup [Arguments] ${authurl} ${type} ${desc} ${user}= Get Environment Variable VCD_USERNAME '' @@ -102,7 +115,11 @@ Setup Vmware Vim ${rc} ${stdout}= Run and Return RC and Output osm vim-create --name ${vim_name} --user ${user} --password ${password} --auth_url ${authurl} --tenant ${tenant} --account_type ${type} --description ${desc} --config ${vim-config} log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} + Sleep 30s Wait for to get vim ready + ${rc} ${vim_detail}= Run and Return RC and Output osm vim-show ${vim_name} + Should Contain ${vim_detail} "operationalState": "ENABLED" msg=VMWare VCD vim is not available values=False Append To List ${vim} ${stdout} + [Return] ${stdout} diff --git a/robot-systest/run_test.sh b/robot-systest/run_test.sh index 74f8aa1a..42b23284 100644 --- a/robot-systest/run_test.sh +++ b/robot-systest/run_test.sh @@ -32,11 +32,6 @@ robot_prerequisite(){ echo -e "\nInstalling robot requirements" # installing python packages pip install haikunator requests robotframework robotframework-seleniumlibrary robotframework-requests - - # installing chrome driver and chrome for UI testing - curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list - apt-get update && apt-get -y install google-chrome-stable chromium-chromedriver } while getopts ":t:-:" o; do @@ -65,7 +60,7 @@ if [[ "$TEST" == "vim" ]]; then exit 0 elif [[ "$TEST" == "smoke" ]]; then echo "Robot Framework SMOKE test" - robot -d $BASEDIR/reports -i smoke $BASEDIR/testsuite/ + robot --removekeywords tag:vim-setup --removekeywords WUKS -d $BASEDIR/reports -i smoke $BASEDIR/testsuite/ exit 0 elif [[ "$TEST" == "sanity" ]]; then echo "Robot Framework Cirros VNF Test" @@ -81,10 +76,16 @@ elif [[ "$TEST" == "sanity" ]]; then ovf_converter $BASEDIR/images/cache/cirros-0.3.5-x86_64-disk.img -n cirros python $TOPDIR/tools/vmware_ovf_upload.py $VCD_AUTH_URL $VCD_USERNAME $VCD_PASSWORD $VCD_ORGANIZATION $BASEDIR/images/cache/cirros.ovf fi - robot -d $BASEDIR/reports -i sanity $BASEDIR/testsuite/ + robot --removekeywords tag:vim-setup --removekeywords WUKS -d $BASEDIR/reports -i sanity $BASEDIR/testsuite/ exit 0 elif [[ "$TEST" == "comprehensive" ]]; then echo "Robot Framework Comprehensive Test" + echo "Installing chrome driver and chrome for UI testing" + # installing chrome driver and chrome for UI testing + curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - + echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list + apt-get update && apt-get -y install google-chrome-stable chromium-chromedriver + echo "Checking of image over VIMs" mkdir -p $BASEDIR/images/cache if [[ ! -z $OS_AUTH_URL ]]; then (openstack image show ubuntu1604) || (wget -r -nc https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -O $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img && make $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img && openstack image create --file $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img ubuntu1604) @@ -98,7 +99,7 @@ elif [[ "$TEST" == "comprehensive" ]]; then ovf_converter $BASEDIR/images/cache/xenial-server-cloudimg-amd64-disk1.img -n ubuntu1604 python $TOPDIR/tools/vmware_ovf_upload.py $VCD_AUTH_URL $VCD_USERNAME $VCD_PASSWORD $VCD_ORGANIZATION $BASEDIR/images/cache/ubuntu1604.ovf fi - robot -d $BASEDIR/reports -i comprehensive $BASEDIR/testsuite/ + robot --removekeywords tag:vim-setup --removekeywords WUKS -d $BASEDIR/reports -i comprehensive $BASEDIR/testsuite/ exit 0 else echo "wrong test provided" diff --git a/robot-systest/testsuite/cli/TS01__Test_VNF.robot b/robot-systest/testsuite/cli/TS01__Test_VNF.robot index 08a4e0ea..4059cff3 100644 --- a/robot-systest/testsuite/cli/TS01__Test_VNF.robot +++ b/robot-systest/testsuite/cli/TS01__Test_VNF.robot @@ -42,8 +42,6 @@ Suite Teardown Run Keyword And Ignore Error Test Cleanup @{vnfd_ids} @{nsd_ids} @{ns_ids} -@{vim} -#${vim_name} robot_test *** Test Cases *** @@ -66,10 +64,8 @@ Create NS Descriptor Test Network Service Instance Test [Documentation] Launch and terminate network services [Tags] sanity - [Setup] VIM Setup To Launch Network Services [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup - Should Not Be Empty ${vim} VIM details not provided :FOR ${vim_name} IN @{vim} \ Launch Network Services and Return ${vim_name} @@ -104,6 +100,3 @@ Network Service Instance Cleanup :FOR ${ns} IN @{ns_ids} \ Force Delete NS ${ns} - - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} diff --git a/robot-systest/testsuite/cli/TS03__Hackfest_Basic_NS.robot b/robot-systest/testsuite/cli/TS03__Hackfest_Basic_NS.robot index d55540a2..1065b3a6 100644 --- a/robot-systest/testsuite/cli/TS03__Hackfest_Basic_NS.robot +++ b/robot-systest/testsuite/cli/TS03__Hackfest_Basic_NS.robot @@ -43,7 +43,6 @@ Suite Teardown Run Keyword And Ignore Error Test Cleanup ${nsd_id} @{nsd_ids} @{ns_ids} -@{vim} *** Test Cases *** @@ -66,10 +65,8 @@ Create Hackfest Basic NS Descriptor Network Service Instance Test [Documentation] Launch and terminate network services [Tags] comprehensive hackfest_basic_ns - [Setup] VIM Setup To Launch Network Services [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup - Should Not Be Empty ${vim} VIM details not provided :FOR ${vim_name} IN @{vim} \ Launch Network Services and Return ${vim_name} @@ -104,6 +101,3 @@ Network Service Instance Cleanup :FOR ${ns_id} IN @{ns_ids} \ Force Delete NS ${ns_id} - - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} diff --git a/robot-systest/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot b/robot-systest/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot index 74392595..6534deba 100644 --- a/robot-systest/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot +++ b/robot-systest/testsuite/cli/TS04__Hackfest_Simplecharm_NS.robot @@ -43,7 +43,6 @@ Suite Teardown Run Keyword And Ignore Error Test Cleanup ${nsd_id} @{nsd_ids} @{ns_ids} -@{vim} ${vnfdftpPath} https://osm-download.etsi.org/ftp/osm-6.0-six/7th-hackfest/packages/hackfest_simplecharm_vnf.tar.gz ${nsdftpPath} https://osm-download.etsi.org/ftp/osm-6.0-six/7th-hackfest/packages/hackfest_simplecharm_ns.tar.gz @@ -54,7 +53,7 @@ Create Hackfest Simple Charm VNF Descriptor #Build VNF Descriptor ${vnfdPckgPath} #Workarround for charm build issue - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../..${vnfdPckgPath}${/}build/' ${vnfdftpPath} + ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../..${vnfdPckgPath}${/}build/' ${vnfdftpPath} ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}' Append To List ${vnfd_ids} ${vnfd_id} @@ -63,7 +62,7 @@ Create Hackfest Simple Charm NS Descriptor [Tags] hackfest_simplecharm comprehensive #Build NS Descriptor ${nsdPckgPath} - ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../..${nsdPckgPath}${/}build/' ${nsdftpPath} + ${rc} ${stdout}= Run and Return RC and Output wget -P '${CURDIR}${/}../../..${nsdPckgPath}${/}build/' ${nsdftpPath} ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}' Append To List ${nsd_ids} ${nsd_id} @@ -71,10 +70,8 @@ Create Hackfest Simple Charm NS Descriptor Network Service Instance Test [Documentation] Launch and terminate network services [Tags] hackfest_simplecharm comprehensive - [Setup] VIM Setup To Launch Network Services [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup - Should Not Be Empty ${vim} VIM details not provided :FOR ${vim_name} IN @{vim} \ Launch Network Services and Return ${vim_name} @@ -109,6 +106,3 @@ Network Service Instance Cleanup :FOR ${ns_id} IN @{ns_ids} \ Force Delete NS ${ns_id} - - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} diff --git a/robot-systest/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot b/robot-systest/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot index 7fa6c24a..dd6ee10b 100644 --- a/robot-systest/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot +++ b/robot-systest/testsuite/cli/TS05__Hackfest_Multivdu_NS.robot @@ -43,7 +43,6 @@ Suite Teardown Run Keyword And Ignore Error Test Cleanup ${nsd_id} @{nsd_ids} @{ns_ids} -@{vim} *** Test Cases *** @@ -66,10 +65,8 @@ Create Hackfest Multivdu NS Descriptor Network Service Instance Test [Documentation] Launch and terminate network services [Tags] comprehensive hackfest_multivdu - [Setup] VIM Setup To Launch Network Services [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup - Should Not Be Empty ${vim} VIM details not provided :FOR ${vim_name} IN @{vim} \ Launch Network Services and Return ${vim_name} @@ -104,6 +101,3 @@ Network Service Instance Cleanup :FOR ${ns_id} IN @{ns_ids} \ Force Delete NS ${ns_id} - - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} diff --git a/robot-systest/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot b/robot-systest/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot index a43f3a22..9f3e01da 100644 --- a/robot-systest/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot +++ b/robot-systest/testsuite/cli/TS06__Hackfest_Cloudinit_NS.robot @@ -43,7 +43,6 @@ Suite Teardown Run Keyword And Ignore Error Test Cleanup ${nsd_id} @{nsd_ids} @{ns_ids} -@{vim} *** Test Cases *** @@ -66,10 +65,8 @@ Create Hackfest Cloudinit NS Descriptor Network Service Instance Test [Documentation] Launch and terminate network services [Tags] comprehensive hackfest_cloudinit - [Setup] VIM Setup To Launch Network Services [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup - Should Not Be Empty ${vim} VIM details not provided :FOR ${vim_name} IN @{vim} \ Launch Network Services and Return ${vim_name} @@ -104,6 +101,3 @@ Network Service Instance Cleanup :FOR ${ns_id} IN @{ns_ids} \ Force Delete NS ${ns_id} - - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} diff --git a/robot-systest/testsuite/cli/TS07__Hackfest_EPA_NS.robot b/robot-systest/testsuite/cli/TS07__Hackfest_EPA_NS.robot index 2d8d3be0..4d7f12de 100644 --- a/robot-systest/testsuite/cli/TS07__Hackfest_EPA_NS.robot +++ b/robot-systest/testsuite/cli/TS07__Hackfest_EPA_NS.robot @@ -43,7 +43,6 @@ Suite Teardown Run Keyword And Ignore Error Test Cleanup ${nsd_id} @{nsd_ids} @{ns_ids} -@{vim} *** Test Cases *** @@ -66,10 +65,8 @@ Create Hackfest EPA NS Descriptor Network Service Instance Test [Documentation] Launch and terminate network services [Tags] hackfest_epa - [Setup] VIM Setup To Launch Network Services [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup - Should Not Be Empty ${vim} VIM details not provided :FOR ${vim_name} IN @{vim} \ Launch Network Services and Return ${vim_name} @@ -104,6 +101,3 @@ Network Service Instance Cleanup :FOR ${ns_id} IN @{ns_ids} \ Force Delete NS ${ns_id} - - :FOR ${vim_id} IN @{vim} - \ Force Delete Vim Account ${vim_id} diff --git a/robot-systest/testsuite/cli/__init__.robot b/robot-systest/testsuite/cli/__init__.robot new file mode 100644 index 00000000..2d959da1 --- /dev/null +++ b/robot-systest/testsuite/cli/__init__.robot @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- + +## +# Copyright 2019 Tech Mahindra Limited +# +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +## + +*** Settings *** +Library OperatingSystem +Library String +Library Collections +Library ../../lib/custom_lib.py +Resource ../../lib/cli/vim_account_lib.robot + +Suite Setup Wait Until Keyword Succeeds 2x 30sec VIM Setup To Launch Network Services +Suite Teardown Run Keyword And Ignore Error Suite Cleanup + + +*** Variables *** +@{vim} + + +*** Keywords *** +Suite Cleanup + :FOR ${vim_id} IN @{vim} + \ Force Delete Vim Account ${vim_id} \ No newline at end of file diff --git a/robot-systest/testsuite/client_library/TS01__OSMClient_Library_Test.robot b/robot-systest/testsuite/client_library/TS01__OSMClient_Library_Test.robot index 42b455ac..88d8b5cb 100644 --- a/robot-systest/testsuite/client_library/TS01__OSMClient_Library_Test.robot +++ b/robot-systest/testsuite/client_library/TS01__OSMClient_Library_Test.robot @@ -79,4 +79,4 @@ Delete Vim Account Test Setup OSM Client evaluate sys.path.append('${CURDIR}${/}../../lib/client_lib') modules=sys ${host}= Get Environment Variable OSM_HOSTNAME 127.0.0.1 - Import Library ClientLib host=${host} WITH NAME osmclient + Import Library client_lib.ClientLib host=${host} WITH NAME osmclient -- 2.25.1