Fix CLAMP CSIT APIs as model changed 12/82012/1
authoreh552t <eh552t@intl.att.com>
Tue, 12 Mar 2019 09:51:43 +0000 (10:51 +0100)
committereh552t <eh552t@intl.att.com>
Tue, 12 Mar 2019 09:54:05 +0000 (10:54 +0100)
Change-Id: I79378dc7fd3129e94ada00eaf5411a65e1d25fda
Signed-off-by: eh552t <eh552t@intl.att.com>
Issue-ID: CLAMP-233

scripts/clamp/start_clamp_containers.sh
tests/clamp/APIs/01__Create_CL_Holmes.robot
tests/clamp/APIs/02__Create_CL_TCA.robot [deleted file]
tests/clamp/APIs/03__VariousApis.robot [deleted file]
tests/clamp/APIs/04__Verify_API_Models.robot [deleted file]

index 8a176fb..8da8340 100755 (executable)
@@ -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
index ce4c8df..be63f22 100644 (file)
@@ -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 (file)
index 15ab4b1..0000000
+++ /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 (file)
index f327283..0000000
+++ /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 (file)
index 9a29a91..0000000
+++ /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*
-