diff options
author | BjornMagnussonXA <bjorn.magnusson@est.tech> | 2022-05-19 19:46:41 +0200 |
---|---|---|
committer | BjornMagnussonXA <bjorn.magnusson@est.tech> | 2022-05-20 14:44:35 +0200 |
commit | ca9a543e882c0fa891230d72311d5f7631d099bc (patch) | |
tree | d1725b3e5ee8eefc464acaf5c04408f886ab95ba | |
parent | 2a4cae64ac1452da49b4af60ba1fa5e8fe28400b (diff) |
Changed process execution in CSIT test
Issue-ID: CCSDK-3675
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: Idcd76e78930bdcec0981cf443a2ede404cd31643
-rwxr-xr-x | csit/scripts/healthcheck/data/preparePmsData.sh | 8 | ||||
-rwxr-xr-x | csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh | 23 | ||||
-rw-r--r-- | csit/tests/healthcheck/test1.robot | 3 | ||||
-rw-r--r-- | csit/tests/healthcheck/test2.robot | 3 | ||||
-rw-r--r-- | csit/tests/healthcheck/test3.robot | 3 |
5 files changed, 22 insertions, 18 deletions
diff --git a/csit/scripts/healthcheck/data/preparePmsData.sh b/csit/scripts/healthcheck/data/preparePmsData.sh index 383ceeb1..3891728f 100755 --- a/csit/scripts/healthcheck/data/preparePmsData.sh +++ b/csit/scripts/healthcheck/data/preparePmsData.sh @@ -86,7 +86,7 @@ expect="Policy type 2 is OK.201" checkRes echo -e "\n" -for i in {1..60}; do +for i in {1..300}; do echo "policy types from policy agent:" curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/a1-policy/v2/policy-types" res=$($curlString) @@ -96,10 +96,14 @@ for i in {1..60}; do echo -e "\n" break; else - sleep $i + sleep 1 fi done +docker images +docker ps -a +docker logs policy-agent + echo "create service ric-registration to policy agent:" curlString="curl -k -X PUT -sw %{http_code} -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/a1-policy/v2/services" --data-binary @${SHELL_FOLDER}/testdata/v2/service.json" res=$($curlString) diff --git a/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh b/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh index c80e68a9..29feb88a 100755 --- a/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh +++ b/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh @@ -32,15 +32,15 @@ chmod +x docker-compose ./docker-compose --env-file .env -f docker-compose.yml -f sdnc/docker-compose.yml up -d checkStatus(){ - for i in {1..60}; do - res=$($1) + for ((i=0; i<$1; i++)); do + res=$($2) echo "$res" - expect=$2 + expect=$3 if [ "$res" == "$expect" ]; then - echo -e "$3 is alive!\n" + echo -e "$4 is alive!\n" break; else - sleep $i + sleep 1 fi done } @@ -48,23 +48,26 @@ checkStatus(){ # check SIM1 status echo "check SIM1 status:" -checkStatus "curl -skw %{http_code} http://localhost:30001/" "OK200" "SIM1" +checkStatus 60 "curl -skw %{http_code} http://localhost:30001/" "OK200" "SIM1" # check SIM2 status echo "check SIM2 status:" -checkStatus "curl -skw %{http_code} http://localhost:30003/" "OK200" "SIM2" +checkStatus 60 "curl -skw %{http_code} http://localhost:30003/" "OK200" "SIM2" # check SIM3 status echo "check SIM3 status:" -checkStatus "curl -skw %{http_code} http://localhost:30005/" "OK200" "SIM3" +checkStatus 60 "curl -skw %{http_code} http://localhost:30005/" "OK200" "SIM3" # check PMS status echo "check PMS status:" -checkStatus "curl -skw %{http_code} http://localhost:8081/status" "hunky dory200" "PMS" +checkStatus 60 "curl -skw %{http_code} http://localhost:8081/status" "hunky dory200" "PMS" + +curl -skw %{http_code} http://localhost:8081/actuator/loggers/org.onap.ccsdk.oran.a1policymanagementservice -X POST -H Content-Type:application/json -d '{"configuredLevel":"debug"}' +curl -skw %{http_code} http://localhost:8081/actuator/loggers/org.onap.ccsdk.oran.a1policymanagementservice.tasks -X POST -H Content-Type:application/json -d '{"configuredLevel":"trace"}' # check SDNC status echo "check SDNC status:" -checkStatus "curl -s -o /dev/null -I -w %{http_code} http://localhost:8282/apidoc/explorer/" "200" "SDNC" +checkStatus 300 "curl -s -o /dev/null -I -w %{http_code} http://localhost:8282/apidoc/explorer/" "200" "SDNC" cd ${SHELL_FOLDER}/../data ./preparePmsData.sh diff --git a/csit/tests/healthcheck/test1.robot b/csit/tests/healthcheck/test1.robot index bc9ec597..e65928a3 100644 --- a/csit/tests/healthcheck/test1.robot +++ b/csit/tests/healthcheck/test1.robot @@ -11,7 +11,6 @@ ${health_check} ${SCRIPTS}/healthcheck/test/health_check.sh Health check test case for NONRTRIC [Documentation] Health check - Start Process ${health_check} shell=yes - ${cli_cmd_output}= Wait For Process timeout=600 + ${cli_cmd_output}= Run Process ${health_check} Log ${cli_cmd_output.stdout} Should Be Equal as Integers ${cli_cmd_output.rc} 0 diff --git a/csit/tests/healthcheck/test2.robot b/csit/tests/healthcheck/test2.robot index 4e3e6c0e..98151693 100644 --- a/csit/tests/healthcheck/test2.robot +++ b/csit/tests/healthcheck/test2.robot @@ -11,7 +11,6 @@ ${pms_a1sim} ${SCRIPTS}/healthcheck/test/pms_a1sim.sh Health check test case for NONRTRIC [Documentation] Deploy NONRTRIC without SDNC - Start Process ${pms_a1sim} shell=yes - ${cli_cmd_output}= Wait For Process timeout=600 + ${cli_cmd_output}= Run Process ${pms_a1sim} Log ${cli_cmd_output.stdout} Should Be Equal as Integers ${cli_cmd_output.rc} 0 diff --git a/csit/tests/healthcheck/test3.robot b/csit/tests/healthcheck/test3.robot index 05b58afd..f735df05 100644 --- a/csit/tests/healthcheck/test3.robot +++ b/csit/tests/healthcheck/test3.robot @@ -11,7 +11,6 @@ ${pms_a1sim_sdnc} ${SCRIPTS}/healthcheck/test/pms_a1sim_sdnc.sh Health check test case for NONRTRIC [Documentation] Deploy NONRTRIC with SDNC - Start Process ${pms_a1sim_sdnc} shell=yes - ${cli_cmd_output}= Wait For Process timeout=600 + ${cli_cmd_output}= Run Process ${pms_a1sim_sdnc} Log ${cli_cmd_output.stdout} Should Be Equal as Integers ${cli_cmd_output.rc} 0 |