aboutsummaryrefslogtreecommitdiffstats
path: root/csit/common-library.robot
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2022-03-16 10:36:33 +0000
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2022-03-24 22:30:38 +0000
commita8be1f7e70ea46dfd82fa74595a43df88c2497e0 (patch)
tree4c4e5adc54219f5bd252c9fe3a17edc7e0d0966e /csit/common-library.robot
parent50d506c9b792cc27fac74a439ebf2a5569b29707 (diff)
Add CSIT for metadataSet handling in api, pap, apex-pdp
Issue-ID: POLICY-3934 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: Ieae62434a3477a7dc1bffccd829385df06592cec
Diffstat (limited to 'csit/common-library.robot')
-rw-r--r--csit/common-library.robot26
1 files changed, 19 insertions, 7 deletions
diff --git a/csit/common-library.robot b/csit/common-library.robot
index c2d1de7f..aa737a02 100644
--- a/csit/common-library.robot
+++ b/csit/common-library.robot
@@ -57,6 +57,14 @@ CreatePolicy
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}
+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}
+
+
QueryPdpGroups
[Documentation] Verify pdp group query - supports upto 2 groups
[Arguments] ${groupsLength} ${group1Name} ${group1State} ${policiesLengthInGroup1} ${group2Name} ${group2State} ${policiesLengthInGroup2}
@@ -73,13 +81,17 @@ QueryPdpGroups
QueryPolicyAudit
[Arguments] ${url} ${expectedstatus} ${pdpGroup} ${pdpType} ${policyName} ${expectedAction}
${policyadmin}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} ${expectedstatus} recordCount=1 ${policyadmin}
- Should Be Equal As Strings ${resp.json()[0]['pdpGroup']} ${pdpGroup}
- Should Be Equal As Strings ${resp.json()[0]['pdpType']} ${pdpType}
- Should Be Equal As Strings ${resp.json()[0]['policy']['name']} ${policyName}
- Should Be Equal As Strings ${resp.json()[0]['policy']['version']} 1.0.0
- Should Be Equal As Strings ${resp.json()[0]['action']} ${expectedAction}
- Should Be Equal As Strings ${resp.json()[0]['user']} policyadmin
+ ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} ${expectedstatus} recordCount=2 ${policyadmin}
+ Log Received response from queryPolicyAudit ${resp.text}
+ FOR ${responseEntry} IN @{resp.json()}
+ Exit For Loop IF '${responseEntry['policy']['name']}'=='${policyName}'
+ END
+ Should Be Equal As Strings ${responseEntry['pdpGroup']} ${pdpGroup}
+ Should Be Equal As Strings ${responseEntry['pdpType']} ${pdpType}
+ Should Be Equal As Strings ${responseEntry['policy']['name']} ${policyName}
+ Should Be Equal As Strings ${responseEntry['policy']['version']} 1.0.0
+ Should Be Equal As Strings ${responseEntry['action']} ${expectedAction}
+ Should Be Equal As Strings ${responseEntry['user']} policyadmin
QueryPolicyStatus
[Documentation] Verify policy deployment status