Renamed Test Cleanup to Suite Cleanup; fix teardown to work properly in test suites
[osm/tests.git] / robot-systest / testsuite / basic_15-rbac_configurations.robot
index 56cddc0..e47871e 100644 (file)
@@ -23,7 +23,7 @@ Resource   %{ROBOT_DEVOPS_FOLDER}/lib/role_lib.robot
 
 Variables   %{ROBOT_DEVOPS_FOLDER}/resources/basic_15-rbac_configurations_data.py
 
-Suite Teardown   Run Keyword And Ignore Error   Test Cleanup
+Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
 
 
 *** Variables ***
@@ -82,8 +82,8 @@ Delete Allocated Resources
 
 
 *** Keywords ***
-Test Cleanup
-    Run Keyword If Test Failed  Run Keyword And Ignore Error  Delete User  ${user_name}
-    Run Keyword If Test Failed  Run Keyword And Ignore Error  Delete Role  ${role_name}
-    Run Keyword If Test Failed  Run Keyword And Ignore Error  Delete Project  ${project_name}
-    Run Keyword If Test Failed  Run Keyword And Ignore Error  Delete Project  ${new_project_name}
+Suite Cleanup
+    Run Keyword If Any Tests Failed  Run Keyword And Ignore Error  Delete User  ${user_name}
+    Run Keyword If Any Tests Failed  Run Keyword And Ignore Error  Delete Role  ${role_name}
+    Run Keyword If Any Tests Failed  Run Keyword And Ignore Error  Delete Project  ${project_name}
+    Run Keyword If Any Tests Failed  Run Keyword And Ignore Error  Delete Project  ${new_project_name}