diff options
-rwxr-xr-x | csit/scripts/healthcheck/data/preparePmsData.sh | 29 | ||||
-rw-r--r-- | csit/tests/healthcheck/test1.robot | 11 | ||||
-rw-r--r-- | csit/tests/healthcheck/test2.robot | 13 | ||||
-rw-r--r-- | csit/tests/healthcheck/test3.robot | 13 | ||||
-rw-r--r-- | docs/media/ONAP-A1ControllerArchitecture.png | bin | 75211 -> 85333 bytes |
5 files changed, 51 insertions, 15 deletions
diff --git a/csit/scripts/healthcheck/data/preparePmsData.sh b/csit/scripts/healthcheck/data/preparePmsData.sh index 3891728f..69dc92d2 100755 --- a/csit/scripts/healthcheck/data/preparePmsData.sh +++ b/csit/scripts/healthcheck/data/preparePmsData.sh @@ -32,6 +32,8 @@ a1_sim_OSC_port=${2:-30001} a1_sim_STD_port=${3:-30005} httpx=${4:-"http"} SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +ric1_id="ric1" +ric2_id="ric2" echo "using policy_agent port: "$policy_agent_port echo "using a1-sim-OSC port: "$a1_sim_OSC_port @@ -45,8 +47,25 @@ checkRes (){ exit 1; fi } +checkReturnContains(){ +#arg 1 max time, seconds +#arg 2 command +#arg 3 value (regex) +#arg 4 description + for ((i=0; i<$1; i++)); do + resin=$($2) + exp=$3 + echo "Check \"$4\" Expected to contain: \"$exp\" Received \"$resin\"" + if [[ $resin =~ $exp ]]; then + echo -e "$4 is as expected!\n" + break; + else + sleep 1 + fi + done +} -echo "policy agent status:" +echo "A1 policy management service status:" curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/status" res=$($curlString) echo "$res" @@ -86,6 +105,14 @@ expect="Policy type 2 is OK.201" checkRes echo -e "\n" +echo "check $ric1_id sync status:" +checkReturnContains 90 "curl -skw %{http_code} $httpx://localhost:$policy_agent_port/a1-policy/v2/rics/ric?ric_id=$ric1_id" "\"state\"\s*:\s*\"AVAILABLE\"" "$ric1_id status" +echo -e "\n" + +echo "check $ric2_id sync status:" +checkReturnContains 30 "curl -skw %{http_code} $httpx://localhost:$policy_agent_port/a1-policy/v2/rics/ric?ric_id=$ric2_id" "\"state\"\s*:\s*\"AVAILABLE\"" "$ric2_id status" +echo -e "\n" + 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" diff --git a/csit/tests/healthcheck/test1.robot b/csit/tests/healthcheck/test1.robot index e65928a3..a8eba153 100644 --- a/csit/tests/healthcheck/test1.robot +++ b/csit/tests/healthcheck/test1.robot @@ -5,12 +5,15 @@ Library Process *** Variables *** ${health_check} ${SCRIPTS}/healthcheck/test/health_check.sh - +${test1_stdout} ${OUTPUT_DIR}/test1_healthcheck_STDOUT.log +${test1_stderr} ${OUTPUT_DIR}/test1_healthcheck_STDERR.log *** Test Cases *** Health check test case for NONRTRIC - [Documentation] Health check - ${cli_cmd_output}= Run Process ${health_check} - Log ${cli_cmd_output.stdout} + [Documentation] Health check - Test 1 + Log Variables + ${cli_cmd_output}= Run Process ${health_check} shell=no stdout=${test1_stdout} stderr=${test1_stderr} + Log Many Standard output: ${test1_stdout} ${\n} ${cli_cmd_output.stdout} + Log Many Standard error: ${test1_stderr} ${\n} ${cli_cmd_output.stderr} 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 98151693..ae51982e 100644 --- a/csit/tests/healthcheck/test2.robot +++ b/csit/tests/healthcheck/test2.robot @@ -4,13 +4,16 @@ Library Process *** Variables *** -${pms_a1sim} ${SCRIPTS}/healthcheck/test/pms_a1sim.sh - +${pms_a1sim} ${SCRIPTS}/healthcheck/test/pms_a1sim.sh +${test2_stdout} ${OUTPUT_DIR}/test2_pms_a1sim_STDOUT.log +${test2_stderr} ${OUTPUT_DIR}/test2_pms_a1sim_STDERR.log *** Test Cases *** Health check test case for NONRTRIC - [Documentation] Deploy NONRTRIC without SDNC - ${cli_cmd_output}= Run Process ${pms_a1sim} - Log ${cli_cmd_output.stdout} + [Documentation] Deploy NONRTRIC without SDNC - Test 2 + Log Variables + ${cli_cmd_output}= Run Process ${pms_a1sim} shell=no stdout=${test2_stdout} stderr=${test2_stderr} + Log Many Standard output: ${test2_stdout} ${\n} ${cli_cmd_output.stdout} + Log Many Standard error: ${test2_stderr} ${\n} ${cli_cmd_output.stderr} 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 f735df05..f2687572 100644 --- a/csit/tests/healthcheck/test3.robot +++ b/csit/tests/healthcheck/test3.robot @@ -4,13 +4,16 @@ Library Process *** Variables *** -${pms_a1sim_sdnc} ${SCRIPTS}/healthcheck/test/pms_a1sim_sdnc.sh - +${pms_a1sim_sdnc} ${SCRIPTS}/healthcheck/test/pms_a1sim_sdnc.sh +${test3_stdout} ${OUTPUT_DIR}/test3_pms_a1sim_sdnc_STDOUT.sh.log +${test3_stderr} ${OUTPUT_DIR}/test3_pms_a1sim_sdnc_STDERR.sh.log *** Test Cases *** Health check test case for NONRTRIC - [Documentation] Deploy NONRTRIC with SDNC - ${cli_cmd_output}= Run Process ${pms_a1sim_sdnc} - Log ${cli_cmd_output.stdout} + [Documentation] Deploy NONRTRIC with SDNC - Test 3 + Log Variables + ${cli_cmd_output}= Run Process ${pms_a1sim_sdnc} shell=no stdout=${test3_stdout} stderr=${test3_stderr} + Log Many Standard output: ${test3_stdout} ${\n} ${cli_cmd_output.stdout} + Log Many Standard error: ${test3_stderr} ${\n} ${cli_cmd_output.stderr} Should Be Equal as Integers ${cli_cmd_output.rc} 0 diff --git a/docs/media/ONAP-A1ControllerArchitecture.png b/docs/media/ONAP-A1ControllerArchitecture.png Binary files differindex 2d521ef2..b32d7022 100644 --- a/docs/media/ONAP-A1ControllerArchitecture.png +++ b/docs/media/ONAP-A1ControllerArchitecture.png |