X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric_robot_suite%2Fhelm%2Fnanobot%2Fconfigmap-src%2Fpublic%2Fresources%2Fnegative_appmgr_tests.robot;fp=ric_robot_suite%2Fhelm%2Fnanobot%2Fconfigmap-src%2Fpublic%2Fresources%2Fnegative_appmgr_tests.robot;h=3f697048c2f151e9d7e56a190713fca84fed9941;hb=029cc1f45c4c40e0867104b730495d4d2fe468b8;hp=0000000000000000000000000000000000000000;hpb=0d26f300d5f9da0aa23612b8a4a9e863423d598b;p=it%2Ftest.git diff --git a/ric_robot_suite/helm/nanobot/configmap-src/public/resources/negative_appmgr_tests.robot b/ric_robot_suite/helm/nanobot/configmap-src/public/resources/negative_appmgr_tests.robot new file mode 100644 index 0000000..3f69704 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/configmap-src/public/resources/negative_appmgr_tests.robot @@ -0,0 +1,38 @@ +*** settings *** +Documentation Negative tests for the AppMgr: ensure that AppMgr produces expected errors for a variety of invalid requests + +Library Collections +Library UUID + +Resource /robot/resources/global_properties.robot +Resource appmgr_interface.robot + +*** Keywords *** +Deploy Duplicate XApp And Expect Error + [Documentation] Ensure AppMgr produces an appropriate error when an already-running XApp is deployed + @{d} = Get Deployed XApps + Should Not Be Empty ${d} No XApps currently deployed + @{names} = Pluck name ${d} + ${xapp} = Evaluate random.choice(${names}) random + ${status} ${u} = Run Keyword And Ignore Error Deploy XApp ${xapp} + Should Be Equal As Strings ${status} FAIL + +Undeploy Nondeployed XApp And Expect Error + [Documentation] Ensure AppMgr produces an appropriate error when an existing but non-running XApp is deleted + @{d} = Get Deployed XApps + @{a} = Get Deployable XApps + Should Not Be Empty ${a} No XApps available to deploy + @{dNames} = Pluck name ${d} + @{a} = Subtract From List ${a} ${dNames} + Should Not Be Empty ${a} No undeployed XApps + ${xapp} = Evaluate random.choice(${a}) random + ${status} ${u} = Run Keyword And Ignore Error Undeploy XApp ${xapp} + Should Be Equal As Strings ${status} FAIL + +Request Nonexistent XApp And Expect Error + [Documentation] Ensure AppMgr produces an appropriate error when retrieving a nonexistent XApp + ${xapp} = Generate UUID + ${status} ${u} = Run Keyword And Ignore Error Get XApp By Name {$xapp} + Should Be Equal As Strings ${status} FAIL + +