aboutsummaryrefslogtreecommitdiffstats
path: root/csit/resources/tests/common-library.robot
diff options
context:
space:
mode:
Diffstat (limited to 'csit/resources/tests/common-library.robot')
-rw-r--r--csit/resources/tests/common-library.robot12
1 files changed, 9 insertions, 3 deletions
diff --git a/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot
index a585bc97..30fd32a2 100644
--- a/csit/resources/tests/common-library.robot
+++ b/csit/resources/tests/common-library.robot
@@ -50,15 +50,21 @@ CreatePolicy
[Documentation] Create the specific policy
${policyadmin}= PolicyAdminAuth
${resp}= PerformPostRequest ${POLICY_API_IP} ${url} ${expectedstatus} ${postjson} null ${policyadmin}
- Run Keyword If ${expectedstatus}==200 Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} ${policyname}
- Run Keyword If ${expectedstatus}==200 Should Be Equal As Strings ${resp.json()['topology_template']['policies'][0]['${policyname}']['version']} ${policyversion}
+
+CreatePolicySuccessfully
+ [Arguments] ${url} ${postjson} ${policyname} ${policyversion}
+ [Documentation] Create the specific policy
+ ${policyadmin}= PolicyAdminAuth
+ ${resp}= PerformPostRequest ${POLICY_API_IP} ${url} 201 ${postjson} null ${policyadmin}
+ Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} ${policyname}
+ Should Be Equal As Strings ${resp.json()['topology_template']['policies'][0]['${policyname}']['version']} ${policyversion}
CreateNodeTemplate
[Arguments] ${url} ${expectedstatus} ${postjson} ${nodeTemplateListLength}
[Documentation] Create the node templates
${policyadmin}= PolicyAdminAuth
${resp}= PerformPostRequest ${POLICY_API_IP} ${url} ${expectedstatus} ${postjson} \ ${policyadmin}
- Run Keyword If ${expectedstatus}==200 Length Should Be ${resp.json()['topology_template']['node_templates']} ${nodeTemplateListLength}
+ Run Keyword If ${expectedstatus}==201 Length Should Be ${resp.json()['topology_template']['node_templates']} ${nodeTemplateListLength}
QueryPdpGroups