From: garciadeblas Date: Fri, 20 May 2022 11:13:01 +0000 (+0200) Subject: Remove tabs in robot files in favour of spaces, add chek in stage-test X-Git-Tag: v12.0.0rc1~14 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=commitdiff_plain;h=refs%2Fchanges%2F07%2F12107%2F5 Remove tabs in robot files in favour of spaces, add chek in stage-test Change-Id: I5ab7d35ee16557b00caf3dc0f136e6b01f948b0c Signed-off-by: garciadeblas --- diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index c5ca053..abc03e2 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -12,4 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # python3 -m rflint testsuites -echo "TEST" +echo "Checking tabs in robot files. No tabs should be present" +tabs_in_testsuite="y" +tabs_in_lib="y" +! grep -ri " " robot-systest/testsuite && tabs_in_testsuite="" +! grep -ri " " robot-systest/lib && tabs_in_lib="" +[ -n "${tabs_in_testsuite}" ] && echo "There are tabs in robot-systest/testsuite" && exit 1 +[ -n "${tabs_in_lib}" ] && echo "There are tabs in robot-systest/lib" && exit 1 +echo "No tabs are present in robot files" +exit 0 + diff --git a/robot-systest/lib/nsi_lib.robot b/robot-systest/lib/nsi_lib.robot index 7d5f8fa..005d536 100644 --- a/robot-systest/lib/nsi_lib.robot +++ b/robot-systest/lib/nsi_lib.robot @@ -160,7 +160,7 @@ Check For Network Slice Instance To Configured ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}" log ${stdout} Should Be Equal As Integers ${rc} ${success_return_code} - Should Contain Any ${stdout} READY BROKEN configured + Should Contain Any ${stdout} READY BROKEN configured Check For Network Slice Instance For Failure diff --git a/robot-systest/testsuite/slice_01-network_slicing.robot b/robot-systest/testsuite/slice_01-network_slicing.robot index d9c8d59..04111a2 100644 --- a/robot-systest/testsuite/slice_01-network_slicing.robot +++ b/robot-systest/testsuite/slice_01-network_slicing.robot @@ -89,7 +89,7 @@ Create Slice Template Network Slice Instance Test [Documentation] Instantiates the NST recently onboarded and sets the instantiation id as a suite variable (nsi_id) - ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey} + ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey} Set Suite Variable ${nsi_id} ${id} diff --git a/robot-systest/testsuite/slice_02-shared_network_slicing.robot b/robot-systest/testsuite/slice_02-shared_network_slicing.robot index 0595480..b64a5ad 100644 --- a/robot-systest/testsuite/slice_02-shared_network_slicing.robot +++ b/robot-systest/testsuite/slice_02-shared_network_slicing.robot @@ -93,7 +93,7 @@ Network Slice First Instance [Documentation] Instantiates the First NST recently onboarded (nst_name) and sets the instantiation id as a suite variable (nsi_id) ... The slice contains 3 NS (1 shared) - ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey} + ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey} Set Suite Variable ${nsi_id} ${id} @@ -101,15 +101,15 @@ Network Slice Second Instance [Documentation] Instantiates the Second NST recently onboarded (nst2_name) and sets the instantiation id as a suite variable (nsi2_id) ... The slice contains 2 NS (1 shared) - ${id}= Create Network Slice ${nst2_name} %{VIM_TARGET} ${slice2_name} ${nst_config} ${publickey} + ${id}= Create Network Slicea ${nst2_name} %{VIM_TARGET} ${slice2_name} ${nst_config} ${publickey} Set Suite Variable ${nsi2_id} ${id} First Network Slice Ns Count [Documentation] Counts the NS in both slice instances and shoul be equal to 4 - ${slice1_count}= Get Slice Ns Count ${slice_name} - ${slice2_count}= Get Slice Ns Count ${slice2_name} + ${slice1_count}= Get Slice Ns Count ${slice_name} + ${slice2_count}= Get Slice Ns Count ${slice2_name} ${together}= Evaluate ${slice1_count} + ${slice2_count} Should Be Equal As Integers ${together} 4 @@ -165,8 +165,8 @@ Delete Slice One Instance Second Network Slice Ns Count [Documentation] Counts the NS in both slice instances and should be equal to 2 - ${slice1_count}= Get Slice Ns Count ${slice_name} - ${slice2_count}= Get Slice Ns Count ${slice2_name} + ${slice1_count}= Get Slice Ns Count ${slice_name} + ${slice2_count}= Get Slice Ns Count ${slice2_name} ${together}= Evaluate ${slice1_count} + ${slice2_count} Should Be Equal As Integers ${together} 2