diff options
author | aravind.est <aravindhan.a@est.tech> | 2022-12-02 12:57:22 +0000 |
---|---|---|
committer | aravind.est <aravindhan.a@est.tech> | 2022-12-02 12:58:17 +0000 |
commit | be26be5ce95977ce1471bcdd10862619c953faf6 (patch) | |
tree | e1cfc5d77d9fc6e95e84ea9b8ac8975c26a297de /csit/clamp | |
parent | cd8ff567c33de3456ed872e0bd95a89be5f3f34a (diff) |
Fix clamp CSIT failures
Issue-ID: CCSDK-3816
Change-Id: I56360db410cf3daa6ba5acae43fee9be580b6f88
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Diffstat (limited to 'csit/clamp')
-rw-r--r-- | csit/clamp/tests/data/InstantiateAC.json | 5 | ||||
-rw-r--r-- | csit/clamp/tests/policy-clamp-test.robot | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/csit/clamp/tests/data/InstantiateAC.json b/csit/clamp/tests/data/InstantiateAC.json index 5de6c95c..4e93c032 100644 --- a/csit/clamp/tests/data/InstantiateAC.json +++ b/csit/clamp/tests/data/InstantiateAC.json @@ -3,10 +3,7 @@ { "name": "PMSHInstance0", "version": "1.0.1", - "definition": { - "name": "org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition", - "version": "1.2.3" - }, + "compositionId": "COMPOSITIONIDPLACEHOLDER", "state": "UNINITIALISED", "orderedState": "UNINITIALISED", "description": "PMSH automation composition instance 0", diff --git a/csit/clamp/tests/policy-clamp-test.robot b/csit/clamp/tests/policy-clamp-test.robot index 8cb292e4..7fb73753 100644 --- a/csit/clamp/tests/policy-clamp-test.robot +++ b/csit/clamp/tests/policy-clamp-test.robot @@ -2,7 +2,9 @@ Library Collections Library RequestsLibrary Library OperatingSystem +Library String Library json +Library yaml *** Test Cases *** @@ -15,6 +17,8 @@ CommissionAutomationCompositionV1 ${headers}= Create Dictionary Accept=application/yaml Content-Type=application/yaml ${resp}= POST On Session policy /onap/policy/clamp/acm/v2/commission data=${postyaml} headers=${headers} Log Received response from runtime acm ${resp.text} + ${respyaml}= yaml.Safe Load ${resp.text} + set Suite variable ${compositionId} ${respyaml["compositionId"]} Should Be Equal As Strings ${resp.status_code} 201 InstantiateAutomationCompositionV1 @@ -22,9 +26,10 @@ InstantiateAutomationCompositionV1 ${auth}= Create List runtimeUser zb!XztG34 Log Creating session http://${POLICY_RUNTIME_ACM_IP}:6969 ${postjson}= Get file ${CURDIR}/data/InstantiateAC.json + ${updatedpostjson}= Replace String ${postjson} COMPOSITIONIDPLACEHOLDER ${compositionId} ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP}:6969 auth=${auth} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= POST On Session policy /onap/policy/clamp/acm/v2/instantiation data=${postjson} headers=${headers} + ${resp}= POST On Session policy /onap/policy/clamp/acm/v2/instantiation data=${updatedpostjson} headers=${headers} Log Received response from runtime acm ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 |