aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreh552t <eh552t@intl.att.com>2019-03-12 10:51:43 +0100
committereh552t <eh552t@intl.att.com>2019-03-12 10:54:05 +0100
commit08dc6ff5d9404944ce0588bec1728294a61e73f4 (patch)
tree491cc3004bb19663be9b0800b792878d774304ea
parent60f92958ebdaa6a5d10a9bc47c6f6d93b3bb97f8 (diff)
Fix CLAMP CSIT APIs as model changed
Change-Id: I79378dc7fd3129e94ada00eaf5411a65e1d25fda Signed-off-by: eh552t <eh552t@intl.att.com> Issue-ID: CLAMP-233
-rwxr-xr-xscripts/clamp/start_clamp_containers.sh19
-rw-r--r--tests/clamp/APIs/01__Create_CL_Holmes.robot26
-rw-r--r--tests/clamp/APIs/02__Create_CL_TCA.robot40
-rw-r--r--tests/clamp/APIs/03__VariousApis.robot37
-rw-r--r--tests/clamp/APIs/04__Verify_API_Models.robot67
5 files changed, 1 insertions, 188 deletions
diff --git a/scripts/clamp/start_clamp_containers.sh b/scripts/clamp/start_clamp_containers.sh
index 8a176fbf..8da83405 100755
--- a/scripts/clamp/start_clamp_containers.sh
+++ b/scripts/clamp/start_clamp_containers.sh
@@ -49,22 +49,5 @@ if [ "$TIME" -ge "$TIME_OUT" ]; then
exit 1;
fi
-# To avoid some problem because templates not yet read
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null -u admin:password -vk --key config/org.onap.clamp.keyfile https://localhost:8443/restservices/clds/v1/cldsTempate/template-names); echo $response
+sleep 30
- if [ "$response" == "200" ]; then
- echo Templates well available
- break;
- fi
-
- echo Sleep: $INTERVAL seconds before testing if templates available. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: Templates not available in $TIME_OUT seconds... Could cause problems for tests...
- exit 1;
-fi
diff --git a/tests/clamp/APIs/01__Create_CL_Holmes.robot b/tests/clamp/APIs/01__Create_CL_Holmes.robot
index ce4c8df6..be63f22f 100644
--- a/tests/clamp/APIs/01__Create_CL_Holmes.robot
+++ b/tests/clamp/APIs/01__Create_CL_Holmes.robot
@@ -19,29 +19,3 @@ Get Requests health check ok
Create the sessions
${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
Should Be Equal As Strings ${resp.status_code} 200
-
-Get Requests verify test template found
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/cldsTempate/template-names
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain Match ${resp} *templateHolmes1*
- Should Contain Match ${resp} *templateHolmes2*
- Should Not Contain Match ${resp} *templateHolmes99*
-
-Put Requests to add Close Loop ClHolmes1
- ${data}= Get Binary File ${CURDIR}${/}data${/}createClHolmes1.json
- &{headers}= Create Dictionary Content-Type=application/json
- ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClHolmes1 data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Put Requests to add Close Loop ClHolmes2
- ${data}= Get Binary File ${CURDIR}${/}data${/}createClHolmes2.json
- &{headers}= Create Dictionary Content-Type=application/json
- ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClHolmes2 data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get Requests verify CL1 found
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain Match ${resp} *ClHolmes1*
- Should Contain Match ${resp} *ClHolmes2*
- Should Not Contain Match ${resp} *ClHolmes99*
diff --git a/tests/clamp/APIs/02__Create_CL_TCA.robot b/tests/clamp/APIs/02__Create_CL_TCA.robot
deleted file mode 100644
index 15ab4b16..00000000
--- a/tests/clamp/APIs/02__Create_CL_TCA.robot
+++ /dev/null
@@ -1,40 +0,0 @@
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-
-*** Variables ***
-${login} admin
-${passw} password
-
-*** Test Cases ***
-Get Requests health check ok
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get Requests verify test template found
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/cldsTempate/template-names
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain Match ${resp} *templateTCA1*
- Should Contain Match ${resp} *CA2*
- Should Not Contain Match ${resp} *templateTCA99*
-
-Put Requests to add Close Loop ClHolmes1
- ${data}= Get Binary File ${CURDIR}${/}data${/}createClTCA1.json
- &{headers}= Create Dictionary Content-Type=application/json
- ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClTCA1 data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Put Requests to add Close Loop ClHolmes2
- ${data}= Get Binary File ${CURDIR}${/}data${/}createClTCA2.json
- &{headers}= Create Dictionary Content-Type=application/json
- ${resp}= Put Request ${clamp_session} /restservices/clds/v1/clds/model/ClTCA2 data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Get Requests verify CL1 found
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain Match ${resp} *ClTCA1*
- Should Contain Match ${resp} *ClTCA2*
- Should Not Contain Match ${resp} *ClTCA99*
diff --git a/tests/clamp/APIs/03__VariousApis.robot b/tests/clamp/APIs/03__VariousApis.robot
deleted file mode 100644
index f3272839..00000000
--- a/tests/clamp/APIs/03__VariousApis.robot
+++ /dev/null
@@ -1,37 +0,0 @@
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-
-*** Variables ***
-${login} admin
-${passw} password
-
-*** Test Cases ***
-Get Clamp properties
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/cldsInfo
- Dictionary Should Contain Key ${resp.json()} userName
- Dictionary Should Contain Key ${resp.json()} permissionReadCl
-
-Get Clamp Info
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/cldsInfo
- Dictionary Should Contain Key ${resp.json()} userName
- Dictionary Should Contain Key ${resp.json()} cldsVersion
-
-Get model bpmn by name
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model/bpmn/ClHolmes1
- Should Contain Match ${resp} *StartEvent_*
- Should Contain Match ${resp} *VesCollector_*
- Should Contain Match ${resp} *Holmes_*
- Should Contain Match ${resp} *Policy_*
- Should Contain Match ${resp} *EndEvent_*
-
-Get model names
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
- Should Contain Match ${resp} *ClHolmes1*
- Should Contain Match ${resp} *ClHolmes2*
- Should Contain Match ${resp} *ClTCA1*
- Should Contain Match ${resp} *ClTCA2*
- Should Not Contain Match ${resp} *ClHolmes99*
- Should Not Contain Match ${resp} *ClTCA99*
diff --git a/tests/clamp/APIs/04__Verify_API_Models.robot b/tests/clamp/APIs/04__Verify_API_Models.robot
deleted file mode 100644
index 9a29a918..00000000
--- a/tests/clamp/APIs/04__Verify_API_Models.robot
+++ /dev/null
@@ -1,67 +0,0 @@
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-
-*** Variables ***
-${login} admin
-${passw} password
-
-*** Test Cases ***
-Verify HolmesModel1
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model/ClHolmes1
- Should Contain Match ${resp} *plateHolmes1*
- Should Contain Match ${resp} *DC1*
- Should Contain Match ${resp} *DC2*
- Should Contain Match ${resp} *Policy1*
- Should Contain Match ${resp} *vnfRecipe*
- Should Contain Match ${resp} *180*
- Should Contain Match ${resp} *345*
- Should Contain Match ${resp} *Config Policy name1*
-
-Verify HolmesModel2
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model/ClHolmes2
- Should Contain Match ${resp} *plateHolmes2*
- Should Contain Match ${resp} *DC2*
- Should Contain Match ${resp} *DC3*
- Should Contain Match ${resp} *Policy2*
- 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*
-
-Verify TCAModel1
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model/ClTCA1
- Should Contain Match ${resp} *plateTCA1*
- Should Contain Match ${resp} *enbRecipe*
- Should Contain Match ${resp} *DC1*
- Should Contain Match ${resp} *DC2*
- Should Contain Match ${resp} *Policy3*
- Should Contain Match ${resp} *345*
- Should Contain Match ${resp} *200*
- Should Contain Match ${resp} *ONSET*
-
-Verify TCAModel2
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model/ClTCA2
- Should Contain Match ${resp} *lateTCA2*
- Should Contain Match ${resp} *enbRecipe*
- Should Contain Match ${resp} *DC1*
- Should Contain Match ${resp} *DC2*
- Should Contain Match ${resp} *DC3*
- Should Contain Match ${resp} *Policy4*
- Should Contain Match ${resp} *tcaPol*
- Should Contain Match ${resp} *345*
- Should Contain Match ${resp} *300*
- Should Contain Match ${resp} *VM*
-
-Get model names
- ${resp}= Get Request ${clamp_session} /restservices/clds/v1/clds/model-names
- Should Contain Match ${resp} *ClHolmes1*
- Should Contain Match ${resp} *ClHolmes2*
- Should Contain Match ${resp} *ClTCA1*
- Should Contain Match ${resp} *ClTCA2*
- Should Not Contain Match ${resp} *ClTCA99*
- Should Not Contain Match ${resp} *ClHolmes99*
-