aboutsummaryrefslogtreecommitdiffstats
path: root/csit/resources/tests
diff options
context:
space:
mode:
Diffstat (limited to 'csit/resources/tests')
-rw-r--r--csit/resources/tests/api-slas.robot10
-rw-r--r--csit/resources/tests/data/AcDocker.json (renamed from csit/resources/tests/data/AutomationComposition.json)0
-rw-r--r--csit/resources/tests/data/AcK8s.json211
-rw-r--r--csit/resources/tests/pap-slas.robot4
-rw-r--r--csit/resources/tests/policy-clamp-test.robot6
5 files changed, 223 insertions, 8 deletions
diff --git a/csit/resources/tests/api-slas.robot b/csit/resources/tests/api-slas.robot
index 717ac3d7..7fd8ff98 100644
--- a/csit/resources/tests/api-slas.robot
+++ b/csit/resources/tests/api-slas.robot
@@ -8,8 +8,8 @@ Resource ${CURDIR}/common-library.robot
*** Keywords ***
ValidateResponseTimeForApi
[Arguments] ${uri} ${method}
- [Documentation] Check if uri response is under the 500ms required time for api metrics
- ValidateResponseTime api-metrics ${uri} ${method} 500
+ [Documentation] Check if uri response is under the 1500ms required time for api metrics
+ ValidateResponseTime api-metrics ${uri} ${method} 1500
*** Test Cases ***
WaitForPrometheusServer
@@ -30,12 +30,12 @@ ValidateResponseTimeQueryPolicies
ValidateResponseTimeQueryPolicyTypeListVersions
[Documentation] Validate query policyType versions response time
- ValidateResponseTime api-metrics /policytypes/{policyTypeId} GET 400
+ ValidateResponseTime api-metrics /policytypes/{policyTypeId} GET 1500
-#Time increased from 200 to 250 due to slow ONAP machines
+#Time increased from 200 to 1500 due to slow ONAP machines
ValidateResponseTimeQueryPolicyVersion
[Documentation] Validate query policy by version response time
- ValidateResponseTime api-metrics /policies/{policyId}/versions/{policyVersion} GET 250
+ ValidateResponseTime api-metrics /policies/{policyId}/versions/{policyVersion} GET 1500
ValidateResponseTimeCreatePolicy
[Documentation] Validate response time for creating a policy
diff --git a/csit/resources/tests/data/AutomationComposition.json b/csit/resources/tests/data/AcDocker.json
index 57148256..57148256 100644
--- a/csit/resources/tests/data/AutomationComposition.json
+++ b/csit/resources/tests/data/AcDocker.json
diff --git a/csit/resources/tests/data/AcK8s.json b/csit/resources/tests/data/AcK8s.json
new file mode 100644
index 00000000..f9ef5b0c
--- /dev/null
+++ b/csit/resources/tests/data/AcK8s.json
@@ -0,0 +1,211 @@
+{
+ "name": "DemoInstance0",
+ "version": "1.0.1",
+ "compositionId": "COMPOSITIONIDPLACEHOLDER",
+ "description": "Demo automation composition instance 0",
+ "elements": {
+ "709c62b3-8918-41b9-a747-d21eb79c6c20": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c20",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Policy_AutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for the Demo",
+ "properties": {
+ "policy_type_id": {
+ "name": "onap.policies.operational.pm-subscription-handler",
+ "version": "1.0.0"
+ },
+ "policy_id": {
+ "get_input": "acm_element_policy"
+ }
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c21": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c21",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.K8S_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for the Demo",
+ "properties": {
+ "chart": {
+ "chartId": {
+ "name": "acelement",
+ "version": "0.1.0"
+ },
+ "namespace": "default",
+ "releaseName": "acm-starter",
+ "podName": "acm-starter",
+ "repository": {
+ "repoName": "policy-chartmuseum",
+ "address": "http://policy-chartmuseum:8080"
+ },
+ "overrideParams": {
+ "acelement.elementId.name": "onap.policy.clamp.ac.starter",
+ "service.nodeport": 30800
+ }
+ }
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c22": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c22",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.K8S_BridgeAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Bridge Automation Composition Element for the Demo",
+ "properties": {
+ "chart": {
+ "chartId": {
+ "name": "acelement",
+ "version": "0.1.0"
+ },
+ "namespace": "default",
+ "releaseName": "acm-bridge",
+ "podName": "acm-bridge",
+ "repository": {
+ "repoName": "policy-chartmuseum",
+ "address": "http://policy-chartmuseum:8080"
+ },
+ "overrideParams": {
+ "acelement.elementId.name": "onap.policy.clamp.ac.bridge",
+ "service.nodeport": 30801
+ }
+ }
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c23": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c23",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.K8S_SinkAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Sink Automation Composition Element for the Demo",
+ "properties": {
+ "chart": {
+ "chartId": {
+ "name": "acelement",
+ "version": "0.1.0"
+ },
+ "namespace": "default",
+ "releaseName": "acm-sink",
+ "podName": "acm-sink",
+ "repository": {
+ "repoName": "policy-chartmuseum",
+ "address": "http://policy-chartmuseum:8080"
+ },
+ "overrideParams": {
+ "acelement.elementId.name": "onap.policy.clamp.ac.sink",
+ "service.nodeport": 30802
+ }
+ }
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c24": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c24",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Starter Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://acm-starter-ac-element-impl:8084",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.starter",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request1",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/onap/policy/clamp/acelement/v2/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c25": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c25",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_BridgeAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Bridge Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://acm-bridge-ac-element-impl:8084",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.bridge",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request2",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/onap/policy/clamp/acelement/v2/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "709c62b3-8918-41b9-a747-d21eb79c6c26": {
+ "id": "709c62b3-8918-41b9-a747-d21eb79c6c26",
+ "definition": {
+ "name": "onap.policy.clamp.ac.element.Http_SinkAutomationCompositionElement",
+ "version": "1.2.3"
+ },
+ "description": "Sink Automation Composition Element for the Demo",
+ "properties": {
+ "baseUrl": "http://acm-sink-ac-element-impl:8084",
+ "httpHeaders": {
+ "Content-Type": "application/json",
+ "Authorization": "Basic YWNtVXNlcjp6YiFYenRHMzQ="
+ },
+ "configurationEntities": [
+ {
+ "configurationEntityId": {
+ "name": "onap.policy.clamp.ac.sink",
+ "version": "1.0.0"
+ },
+ "restSequence": [
+ {
+ "restRequestId": {
+ "name": "request3",
+ "version": "1.0.1"
+ },
+ "httpMethod": "POST",
+ "path": "/onap/policy/clamp/acelement/v2/activate",
+ "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"message-router\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+ "expectedResponse": 201
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/csit/resources/tests/pap-slas.robot b/csit/resources/tests/pap-slas.robot
index 1fa19627..4b240047 100644
--- a/csit/resources/tests/pap-slas.robot
+++ b/csit/resources/tests/pap-slas.robot
@@ -8,8 +8,8 @@ Resource ${CURDIR}/common-library.robot
*** Keywords ***
ValidateResponseTimeForPap
[Arguments] ${uri} ${method}
- [Documentation] Check if uri response is under the 500ms required time for pap metrics
- ValidateResponseTime pap-metrics ${uri} ${method} 500
+ [Documentation] Check if uri response is under the 1500ms required time for pap metrics
+ ValidateResponseTime pap-metrics ${uri} ${method} 1500
*** Test Cases ***
WaitForPrometheusServer
diff --git a/csit/resources/tests/policy-clamp-test.robot b/csit/resources/tests/policy-clamp-test.robot
index 3fc41550..29a99ebb 100644
--- a/csit/resources/tests/policy-clamp-test.robot
+++ b/csit/resources/tests/policy-clamp-test.robot
@@ -55,7 +55,11 @@ InstantiateAutomationComposition
[Documentation] Instantiate automation composition.
${auth}= Create List runtimeUser zb!XztG34
Log Creating session http://${POLICY_RUNTIME_ACM_IP}
- ${postjson}= Get file ${CURDIR}/data/AutomationComposition.json
+ ${K8sEnabled}= Convert To Boolean ${CLAMP_K8S_TEST}
+ Run Keyword If '${K8sEnabled}'=='True' set Suite variable ${instantiationfile} AcK8s.json
+
+ ... ELSE set Suite variable ${instantiationfile} AcDocker.json
+ ${postjson}= Get file ${CURDIR}/data/${instantiationfile}
${updatedpostjson}= Replace String ${postjson} COMPOSITIONIDPLACEHOLDER ${compositionId}
${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json