From ad9ee61f28097d1a2ff11827bcbfe675f0a0012c Mon Sep 17 00:00:00 2001 From: ehautot Date: Wed, 21 Mar 2018 16:09:49 +0100 Subject: Fix CSIT tests and add some more Change-Id: I550b3c580ac0491b279da5288587b2bb6b053f46 Signed-off-by: ehautot Issue-ID: CLAMP-129 --- test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh | 7 ++----- .../csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh | 2 +- test/csit/tests/clamp/APIs/04__Verify_API_Models.robot | 8 ++++---- test/csit/tests/clamp/APIs/data/createClHolmes2.json | 6 ++++-- test/csit/tests/clamp/APIs/data/createClTCA1.json | 6 ++++-- test/csit/tests/clamp/APIs/data/createClTCA2.json | 6 ++++-- test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot | 2 +- 7 files changed, 20 insertions(+), 17 deletions(-) (limited to 'test/csit') diff --git a/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh b/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh index 14619b9f3..e6e12f2d5 100755 --- a/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh +++ b/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh @@ -33,12 +33,9 @@ cd clamp/extra/docker/clamp/ # Pull the Clamp docker image from nexus instead of local image by default in the docker-compose.yml sed -i '/image: onap\/clamp/c\ image: nexus3.onap.org:10001\/onap\/clamp' docker-compose.yml -# Change config to take localhost:8085 for SDC and Policy simulator -sed -i 's/classpath:\/clds\/clds-reference.properties/file:.\/config\/clds-reference-sdc_proxy.properties/g' clamp.env -sed -i 's/classpath:\/clds\/clds-policy-config.properties/file:.\/config\/clds-policy-config-sdc_proxy.properties/g' clamp.env +# Change config to take third_party_proxy:8085 for SDC, Policy and DCAE simulator +sed -i 's/\"classpath:\/clds\/clds-policy-config.properties\"/\"file:.\/config\/clds-policy-config-third_party_proxy.properties\",\"clamp.config.sdc.catalog.url\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/\",\"clamp.config.sdc.hostUrl\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.sdc.serviceUrl\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/services\",\"clamp.config.dcae.inventory.url\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.dcae.dispatcher.url\":\"http:\/\/third_party_proxy:8085\"/g' clamp.env # Add the sql to create template so it is played by docker-compose later cp ../../../src/test/resources/sql/four_templates_only.sql ../../sql/bulkload/ echo 'mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < four_templates_only.sql' >> ../../sql/load-sql-files-tests-automation.sh - - diff --git a/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh b/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh index d59d19407..c94a40bcc 100755 --- a/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh +++ b/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh @@ -21,6 +21,6 @@ echo "This is ${WORKSPACE}/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_ kill-instance.sh clamp_clamp_1 kill-instance.sh clamp_db_1 -kill-instance.sh clamp_sdc_proxy_1 +kill-instance.sh clamp_third_party_proxy_1 # $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging diff --git a/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot b/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot index f4f762690..e7b2fb66d 100644 --- a/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot +++ b/test/csit/tests/clamp/APIs/04__Verify_API_Models.robot @@ -26,8 +26,8 @@ Verify HolmesModel2 Should Contain Match ${resp} *DC2* Should Contain Match ${resp} *DC3* Should Contain Match ${resp} *Policy2* - Should Contain Match ${resp} *enbRecipe* - Should Contain Match ${resp} *reset* + Should Contain Match ${resp} *vnfRecipe* + Should Contain Match ${resp} *migrate* Should Contain Match ${resp} *360* Should Contain Match ${resp} *345* Should Contain Match ${resp} *Config Policy Name2* @@ -37,7 +37,7 @@ Verify TCAModel1 Create Session clamp http://localhost:8080 auth=${auth} ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClTCA1 Should Contain Match ${resp} *templateTCA1* - Should Contain Match ${resp} *vnfRecipe* + Should Contain Match ${resp} *enbRecipe* Should Contain Match ${resp} *DC1* Should Contain Match ${resp} *DC2* Should Contain Match ${resp} *Policy3* @@ -50,7 +50,7 @@ Verify TCAModel2 Create Session clamp http://localhost:8080 auth=${auth} ${resp}= Get Request clamp /restservices/clds/v1/clds/model/ClTCA2 Should Contain Match ${resp} *templateTCA2* - Should Contain Match ${resp} *vnfRecipe* + Should Contain Match ${resp} *enbRecipe* Should Contain Match ${resp} *DC1* Should Contain Match ${resp} *DC2* Should Contain Match ${resp} *DC3* diff --git a/test/csit/tests/clamp/APIs/data/createClHolmes2.json b/test/csit/tests/clamp/APIs/data/createClHolmes2.json index dc5720809..69055895c 100644 --- a/test/csit/tests/clamp/APIs/data/createClHolmes2.json +++ b/test/csit/tests/clamp/APIs/data/createClHolmes2.json @@ -2,7 +2,9 @@ "name":"ClHolmes2", "controlNamePrefix":"ClosedLoop-", "bpmnText":"", - "propText":"{\"Holmes_0bsv00m\":[{\"name\":\"correlationalLogic\",\"value\":\"correlation logic2\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy Name2\"}],\"global\":[{\"name\":\"service\",\"value\":[\"c95b0e7c-c1f0-4287-9928-7964c5377a46\"]},{\"name\":\"vf\",\"value\":[\"48504e0e-f3d3-411d-a52b-eda1b8fec073\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC2\",\"DC3\"]}],\"Policy_114xo8j\":{\"Policy2\":[{\"name\":\"pname\",\"value\":\"Policy2\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"5\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"360\"]},{\"name\":\"_id\",\"value\":[\"Uw5gftt\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", + "propText":"{\"Holmes_0bsv00m\":[{\"name\":\"correlationalLogic\",\"value\":\"correlation logic2\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy Name2\"}],\"global\":[{\"name\":\"service\",\"value\":[\"c95b0e7c-c1f0-4287-9928-7964c5377a46\"]},{\"name\":\"vf\",\"value\":[\"48504e0e-f3d3-411d-a52b-eda1b8fec073\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC2\",\"DC3\"]}],\"Policy_114xo8j\":{\"Policy2\":[{\"name\":\"pname\",\"value\":\"Policy2\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"360\"]},{\"name\":\"_id\",\"value\":[\"dHQXiOz\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", "imageText":"HHolmesVESVesCollectorPolicy", - "templateName":"templateHolmes2" + "templateName":"templateHolmes2", + "typeId":null, + "deploymentId":null } \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createClTCA1.json b/test/csit/tests/clamp/APIs/data/createClTCA1.json index d72a82ee3..509288b52 100644 --- a/test/csit/tests/clamp/APIs/data/createClTCA1.json +++ b/test/csit/tests/clamp/APIs/data/createClTCA1.json @@ -2,7 +2,9 @@ "name":"ClTCA1", "controlNamePrefix":"ClosedLoop-", "bpmnText":"", - "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"TCA_1d13unw\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"ce57408b-93ba-td02-1622-165abd6c5ff5\"},{\"name\":\"tcaPol\",\"value\":\"Policy3\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VNF\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"5\",\"ONSET\"]]}]},\"Policy_12lup3h\":{\"Policy3\":[{\"name\":\"pname\",\"value\":\"Policy3\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"restart\"]},{\"name\":\"maxRetries\",\"value\":[\"4\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"200\"]},{\"name\":\"_id\",\"value\":[\"42adC3e\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", + "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"TCA_1d13unw\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"ce57408b-93ba-td02-1622-165abd6c5ff5\"},{\"name\":\"tcaPol\",\"value\":\"Policy3\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VNF\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"5\",\"ONSET\"]]}]},\"Policy_12lup3h\":{\"Policy3\":[{\"name\":\"pname\",\"value\":\"Policy3\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"200\"]},{\"name\":\"_id\",\"value\":[\"lecrG3I\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", "imageText":"VESVesCollectorTCAPolicy", - "templateName":"templateTCA1" + "templateName":"templateTCA1", + "typeId":null, + "deploymentId":null } \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createClTCA2.json b/test/csit/tests/clamp/APIs/data/createClTCA2.json index 0e47d21b6..5754a8e2d 100644 --- a/test/csit/tests/clamp/APIs/data/createClTCA2.json +++ b/test/csit/tests/clamp/APIs/data/createClTCA2.json @@ -2,7 +2,9 @@ "name":"ClTCA2", "controlNamePrefix":"ClosedLoop-", "bpmnText":"", - "propText":"{\"Policy_1r0guma\":{\"Policy4\":[{\"name\":\"pname\",\"value\":\"Policy4\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"10\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"300\"]},{\"name\":\"_id\",\"value\":[\"m5YLmst\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\",\"DC3\"]}],\"TCA_09syovq\":{\"TCA2\":[{\"name\":\"tname\",\"value\":\"TCA2\"},{\"name\":\"tuuid\",\"value\":\"3794f32d-8d95-tf61-444b-0b374cc173b2\"},{\"name\":\"tcaPol\",\"value\":\"Policy4\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VM\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"15\",\"ONSET\",\"undefined\"]]}]}}", + "propText":"{\"Policy_1r0guma\":{\"Policy4\":[{\"name\":\"pname\",\"value\":\"Policy4\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"300\"]},{\"name\":\"_id\",\"value\":[\"JoL9ecT\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\",\"DC3\"]}],\"TCA_09syovq\":{\"TCA2\":[{\"name\":\"tname\",\"value\":\"TCA2\"},{\"name\":\"tuuid\",\"value\":\"3794f32d-8d95-tf61-444b-0b374cc173b2\"},{\"name\":\"tcaPol\",\"value\":\"Policy4\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VM\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"15\",\"ONSET\",\"undefined\"]]}]}}", "imageText":"VESVesCollectorTCAPolicy", - "templateName":"templateTCA2" + "templateName":"templateTCA2", + "typeId":null, + "deploymentId":null } \ No newline at end of file diff --git a/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot b/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot index c866174f1..8aa74f420 100644 --- a/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot +++ b/test/csit/tests/clamp/UIs/03__Verify_UI_Models.robot @@ -2,7 +2,7 @@ Library Collections Library RequestsLibrary Library OperatingSystem -Library jsons +Library json *** Test Cases *** Verify HolmesModel1 -- cgit 1.2.3-korg