diff options
author | JosephKeenan <joseph.keenan@est.tech> | 2021-11-23 12:18:28 +0000 |
---|---|---|
committer | JosephKeenan <joseph.keenan@est.tech> | 2021-11-25 15:40:10 +0000 |
commit | 20b4f9cf0b662de4a7665b2a82593ef0205f5e06 (patch) | |
tree | ab849ff17b861f246c328e421e8dcfc8ceb9e851 /csit | |
parent | bc742a1dbe39a3269abab9e62a9d489f460144b0 (diff) |
Allow separate registration of DMIDataPlugin and DmiModelPugin
Moved relevant code from NetworkCmProxyDataServiceImp to DmiOperations
Split DmiOperations into DMiData... and DMIModelOperations
Merged update-operation changes
Added tests for error message validation in NetworkCmProxyDataServiceImplSpec
Removede @Service from DMIOperations and added @component to
DmiDataOperations & DmiModelOperations
Verify sync robot test is now hardened
Added exitonfailure so robot tests stop after first encountered failed
test
Issue-ID: CPS-736
Change-Id: I0b40931cc8cd4fc0452328a0a7e0f60e6fc38d0a
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Diffstat (limited to 'csit')
-rwxr-xr-x | csit/plans/cps/setup.sh | 33 | ||||
-rw-r--r-- | csit/tests/cps-model-sync/cps-model-sync.robot | 12 |
2 files changed, 21 insertions, 24 deletions
diff --git a/csit/plans/cps/setup.sh b/csit/plans/cps/setup.sh index e4bdd47a9e..1e27fb9720 100755 --- a/csit/plans/cps/setup.sh +++ b/csit/plans/cps/setup.sh @@ -25,28 +25,27 @@ check_health() { -TIME_OUT=120 -INTERVAL=5 -TICKER=0 + TIME_OUT=120 + INTERVAL=5 + TICKER=0 -while [ "$TICKER" -le "$TIME_OUT" ]; do + while [ "$TICKER" -le "$TIME_OUT" ]; do - RESPONSE=$(curl --location --request GET 'http://'$1'/manage/health/readiness') + RESPONSE=$(curl --location --request GET 'http://'$1'/manage/health/readiness') - if [[ "$RESPONSE" == *"UP"* ]]; then - echo "$2 started in $TICKER" - break; - fi + if [[ "$RESPONSE" == *"UP"* ]]; then + echo "$2 started in $TICKER" + break; + fi - sleep $INTERVAL - TICKER=$((TICKER + INTERVAL)) + sleep $INTERVAL + TICKER=$((TICKER + INTERVAL)) -done - -if [ "$TICKER" -ge "$TIME_OUT" ]; then - echo TIME OUT: $2 session not started in $TIME_OUT seconds... Could cause problems for testing activities... -fi + done + if [ "$TICKER" -ge "$TIME_OUT" ]; then + echo TIME OUT: $2 session not started in $TIME_OUT seconds... Could cause problems for testing activities... + fi } ###################### setup env ############################ @@ -143,4 +142,4 @@ check_health $DMI_HOST:$DMI_MANAGEMENT_PORT 'dmi-plugin' ###################### ROBOT Configurations ########################## # Pass variables required for Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v CPS_CORE_HOST:$CPS_CORE_HOST -v CPS_CORE_PORT:$CPS_CORE_PORT -v DMI_HOST:$LOCAL_IP -v DMI_PORT:$DMI_PORT -v CPS_CORE_MANAGEMENT_PORT:$CPS_CORE_MANAGEMENT_PORT -v DATADIR:$WORKSPACE/data"
\ No newline at end of file +ROBOT_VARIABLES="-v CPS_CORE_HOST:$CPS_CORE_HOST -v CPS_CORE_PORT:$CPS_CORE_PORT -v DMI_HOST:$LOCAL_IP -v DMI_PORT:$DMI_PORT -v CPS_CORE_MANAGEMENT_PORT:$CPS_CORE_MANAGEMENT_PORT -v DATADIR:$WORKSPACE/data --exitonfailure"
\ No newline at end of file diff --git a/csit/tests/cps-model-sync/cps-model-sync.robot b/csit/tests/cps-model-sync/cps-model-sync.robot index 340577e2ce..31931c16bf 100644 --- a/csit/tests/cps-model-sync/cps-model-sync.robot +++ b/csit/tests/cps-model-sync/cps-model-sync.robot @@ -19,7 +19,7 @@ */ *** Settings *** -Documentation NCMP-DMI - Model Sync +Documentation NCMP-DMI - Registration & Model Sync Library Collections Library OperatingSystem @@ -33,7 +33,6 @@ Suite Setup Create Session DMI_URL http://${DMI_HOST}:${DMI_POR ${auth} Basic Y3BzdXNlcjpjcHNyMGNrcyE= ${basePath} /dmi - *** Test Cases *** Register node & sync models ${uri}= Set Variable ${basePath}/v1/inventory/cmHandles @@ -48,11 +47,10 @@ Verify Sync ${jsonData}= Get Binary File ${DATADIR}${/}postModuleRequestBody.json ${response}= POST On Session DMI_URL ${uri} headers=${headers} data=${jsonData} ${responseJson}= Set Variable ${response.json()} - ${moduleCount}= Get length ${responseJson['schemas']} Should Be Equal As Strings ${response.status_code} 200 FOR ${item} IN @{responseJson['schemas']} - IF "${item}.get('moduleName')" == "stores" - Should Be Equal As Strings "${item}.get('revision')" 2020-09-15 - Should Be Equal As Strings "${item}.get('namespace')" org:onap:ccsdk:sample + IF "${item['moduleName']}" == "stores" + Should Be Equal As Strings "${item['revision']}" "2020-09-15" + Should Be Equal As Strings "${item['namespace']}" "org:onap:ccsdk:sample" + END END - END |