From bdf2f9fbd01df30e1f7ee8b5c5dc5f75b93d5ab6 Mon Sep 17 00:00:00 2001 From: ecaiyanlinux Date: Wed, 3 Mar 2021 11:33:31 +0000 Subject: Add CSIT to project repo Signed-off-by: ecaiyanlinux Change-Id: I860ffd4365923aba5e735c2ffe4a06909dc4283c Issue-ID: CCSDK-3140 --- csit/.gitignore | 3 + csit/plans/healthcheck/setup.sh | 21 +++ csit/plans/healthcheck/teardown.sh | 21 +++ csit/plans/healthcheck/testplan.txt | 24 +++ csit/prepare-csit.sh | 52 ++++++ csit/run-csit.sh | 198 +++++++++++++++++++++ csit/run-project-csit.sh | 33 ++++ .../config/application_configuration.json.nosdnc | 38 ++++ .../config/application_configuration.json.sdnc | 48 +++++ csit/scripts/healthcheck/data/preparePmsData.sh | 149 ++++++++++++++++ .../healthcheck/data/testdata/OSC/policy_type.json | 45 +++++ .../healthcheck/data/testdata/policy-osc.json | 9 + csit/scripts/healthcheck/data/testdata/policy.json | 9 + .../scripts/healthcheck/data/testdata/service.json | 5 + .../healthcheck/data/testdata/v2/policy_osc.json | 16 ++ .../data/testdata/v2/policy_std_v2.json | 16 ++ .../healthcheck/data/testdata/v2/policy_type.json | 56 ++++++ .../healthcheck/data/testdata/v2/service.json | 5 + csit/scripts/healthcheck/docker-compose.yml | 78 ++++++++ .../config/https-props-a1controller.properties | 24 +++ csit/scripts/healthcheck/sdnc/docker-compose.yml | 69 +++++++ csit/scripts/healthcheck/test/health_check.sh | 63 +++++++ csit/scripts/healthcheck/test/pms_a1sim.sh | 62 +++++++ csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh | 66 +++++++ csit/scripts/healthcheck/test/setup.sh | 32 ++++ csit/tests/healthcheck/__init__.robot | 2 + csit/tests/healthcheck/test1.robot | 16 ++ csit/tests/healthcheck/test2.robot | 16 ++ 28 files changed, 1176 insertions(+) create mode 100644 csit/.gitignore create mode 100755 csit/plans/healthcheck/setup.sh create mode 100755 csit/plans/healthcheck/teardown.sh create mode 100644 csit/plans/healthcheck/testplan.txt create mode 100755 csit/prepare-csit.sh create mode 100755 csit/run-csit.sh create mode 100755 csit/run-project-csit.sh create mode 100644 csit/scripts/healthcheck/config/application_configuration.json.nosdnc create mode 100644 csit/scripts/healthcheck/config/application_configuration.json.sdnc create mode 100755 csit/scripts/healthcheck/data/preparePmsData.sh create mode 100644 csit/scripts/healthcheck/data/testdata/OSC/policy_type.json create mode 100644 csit/scripts/healthcheck/data/testdata/policy-osc.json create mode 100644 csit/scripts/healthcheck/data/testdata/policy.json create mode 100644 csit/scripts/healthcheck/data/testdata/service.json create mode 100644 csit/scripts/healthcheck/data/testdata/v2/policy_osc.json create mode 100644 csit/scripts/healthcheck/data/testdata/v2/policy_std_v2.json create mode 100644 csit/scripts/healthcheck/data/testdata/v2/policy_type.json create mode 100644 csit/scripts/healthcheck/data/testdata/v2/service.json create mode 100644 csit/scripts/healthcheck/docker-compose.yml create mode 100644 csit/scripts/healthcheck/sdnc/config/https-props-a1controller.properties create mode 100644 csit/scripts/healthcheck/sdnc/docker-compose.yml create mode 100755 csit/scripts/healthcheck/test/health_check.sh create mode 100755 csit/scripts/healthcheck/test/pms_a1sim.sh create mode 100755 csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh create mode 100755 csit/scripts/healthcheck/test/setup.sh create mode 100644 csit/tests/healthcheck/__init__.robot create mode 100644 csit/tests/healthcheck/test1.robot create mode 100644 csit/tests/healthcheck/test2.robot diff --git a/csit/.gitignore b/csit/.gitignore new file mode 100644 index 00000000..d8925195 --- /dev/null +++ b/csit/.gitignore @@ -0,0 +1,3 @@ +env.properties +archives/ +plans/healthcheck/docker-compose diff --git a/csit/plans/healthcheck/setup.sh b/csit/plans/healthcheck/setup.sh new file mode 100755 index 00000000..46265d91 --- /dev/null +++ b/csit/plans/healthcheck/setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= + +#Make the env vars availble to the robot scripts +ROBOT_VARIABLES="-b debug.log -v ARCHIVES:${ARCHIVES} -v SCRIPTS:${SCRIPTS}" + diff --git a/csit/plans/healthcheck/teardown.sh b/csit/plans/healthcheck/teardown.sh new file mode 100755 index 00000000..c619d0c9 --- /dev/null +++ b/csit/plans/healthcheck/teardown.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= + +# All started containers stopped and removed by the test case +docker stop $(docker ps -aq) +docker system prune -f diff --git a/csit/plans/healthcheck/testplan.txt b/csit/plans/healthcheck/testplan.txt new file mode 100644 index 00000000..5659e278 --- /dev/null +++ b/csit/plans/healthcheck/testplan.txt @@ -0,0 +1,24 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= + + +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +# Temporary change to trigger verify job. +healthcheck + diff --git a/csit/prepare-csit.sh b/csit/prepare-csit.sh new file mode 100755 index 00000000..163698d6 --- /dev/null +++ b/csit/prepare-csit.sh @@ -0,0 +1,52 @@ +#!/bin/bash -x +# +# Copyright 2019-2021 © Samsung Electronics Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This script installs common libraries required by CSIT tests +# + +# Branched from integration/csit to this repository 18.2.2021 +# + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=`git rev-parse --show-toplevel` +fi + +TESTPLANDIR=${WORKSPACE}/${TESTPLAN} + +# Assume that if ROBOT_VENV is set and virtualenv with system site packages can be activated, +# ci-management/jjb/integration/include-raw-integration-install-robotframework.sh has already +# been executed + +if [ -f ${WORKSPACE}/env.properties ]; then + source ${WORKSPACE}/env.properties +fi +if [ -f ${ROBOT_VENV}/bin/activate ]; then + source ${ROBOT_VENV}/bin/activate +else + rm -rf /tmp/ci-management + rm -f ${WORKSPACE}/env.properties + cd /tmp + git clone "https://gerrit.onap.org/r/ci-management" + source /tmp/ci-management/jjb/integration/include-raw-integration-install-robotframework.sh +fi + +# install eteutils +mkdir -p ${ROBOT_VENV}/src/onap +rm -rf ${ROBOT_VENV}/src/onap/testsuite +pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre + +pip freeze + diff --git a/csit/run-csit.sh b/csit/run-csit.sh new file mode 100755 index 00000000..5bc546ba --- /dev/null +++ b/csit/run-csit.sh @@ -0,0 +1,198 @@ +#!/bin/bash -x +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# Modification Copyright 2021 Nordix Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# $1 project/functionality +# $2 robot options + +# Branched from integration/csit to this repository 18.2.2021 +# + +# +# functions +# + +function on_exit(){ + rc=$? + if [[ ${WORKSPACE} ]]; then + if [[ ${WORKDIR} ]]; then + rsync -av "$WORKDIR/" "$WORKSPACE/archives/$TESTPLAN" + fi + # Record list of active docker containers + docker ps --format "{{.Image}}" > "$WORKSPACE/archives/$TESTPLAN/_docker-images.log" + + # show memory consumption after all docker instances initialized + docker_stats | tee "$WORKSPACE/archives/$TESTPLAN/_sysinfo-2-after-robot.txt" + fi + # Run teardown script plan if it exists + cd "${TESTPLANDIR}" + TEARDOWN="${TESTPLANDIR}/teardown.sh" + if [ -f "${TEARDOWN}" ]; then + echo "Running teardown script ${TEARDOWN}" + source_safely "${TEARDOWN}" + fi + # TODO: do something with the output + exit $rc +} +# ensure that teardown and other finalizing steps are always executed +trap on_exit EXIT + +function docker_stats(){ + #General memory details + echo "> top -bn1 | head -3" + top -bn1 | head -3 + echo + + echo "> free -h" + free -h + echo + + #Memory details per Docker + echo "> docker ps" + docker ps + echo + + echo "> docker stats --no-stream" + docker stats --no-stream + echo +} + +# save current set options +function save_set() { + RUN_CSIT_SAVE_SET="$-" + RUN_CSIT_SHELLOPTS="$SHELLOPTS" +} + +# load the saved set options +function load_set() { + _setopts="$-" + + # bash shellopts + for i in $(echo "$SHELLOPTS" | tr ':' ' ') ; do + set +o ${i} + done + for i in $(echo "$RUN_CSIT_SHELLOPTS" | tr ':' ' ') ; do + set -o ${i} + done + + # other options + for i in $(echo "$_setopts" | sed 's/./& /g') ; do + set +${i} + done + set -${RUN_CSIT_SAVE_SET} +} + +# set options for quick bailout when error +function harden_set() { + set -xeo pipefail + set +u # enabled it would probably fail too many often +} + +# relax set options so the sourced file will not fail +# the responsibility is shifted to the sourced file... +function relax_set() { + set +e + set +o pipefail +} + +# wrapper for sourcing a file +function source_safely() { + [ -z "$1" ] && return 1 + relax_set + . "$1" + load_set +} + +# +# main +# + +# set and save options for quick failure +harden_set && save_set + +if [ $# -eq 0 ] +then + echo + echo "Usage: $0 plans// []" + echo + echo " , , : " + echo " The same values as for the '{project}-csit-{functionality}' JJB job template." + echo + exit 1 +fi + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=$(git rev-parse --show-toplevel) +fi + +if [ -f "${WORKSPACE}/${1}/testplan.txt" ]; then + export TESTPLAN="${1}" +else + echo "testplan not found: ${WORKSPACE}/${TESTPLAN}/testplan.txt" + exit 2 +fi + +export TESTOPTIONS="${2}" + +rm -rf "$WORKSPACE/archives/$TESTPLAN" +mkdir -p "$WORKSPACE/archives/$TESTPLAN" + +TESTPLANDIR="${WORKSPACE}/${TESTPLAN}" + +# Run installation of prerequired libraries +source_safely "${WORKSPACE}/prepare-csit.sh" + +# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh +source_safely "${ROBOT_VENV}/bin/activate" + +WORKDIR=$(mktemp -d --suffix=-robot-workdir) +cd "${WORKDIR}" + +# Add csit scripts to PATH +export PATH="${PATH}:${WORKSPACE}/docker/scripts:${WORKSPACE}/scripts:${ROBOT_VENV}/bin" +export SCRIPTS="${WORKSPACE}/scripts" +export ROBOT_VARIABLES= + +# Sign in to nexus3 docker repo +docker login -u docker -p docker nexus3.onap.org:10001 + +# Run setup script plan if it exists +cd "${TESTPLANDIR}" +SETUP="${TESTPLANDIR}/setup.sh" +if [ -f "${SETUP}" ]; then + echo "Running setup script ${SETUP}" + source_safely "${SETUP}" +fi + +# show memory consumption after all docker instances initialized +docker_stats | tee "$WORKSPACE/archives/$TESTPLAN/_sysinfo-1-after-setup.txt" + +# Run test plan +cd "$WORKDIR" +echo "Reading the testplan:" +cat "${TESTPLANDIR}/testplan.txt" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${WORKSPACE}/tests/|" > testplan.txt +cat testplan.txt +SUITES=$( xargs -a testplan.txt ) + +echo ROBOT_VARIABLES="${ROBOT_VARIABLES}" +echo "Starting Robot test suites ${SUITES} ..." +relax_set +python -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES} +RESULT=$? +load_set +echo "RESULT: $RESULT" +# Note that the final steps are done in on_exit function after this exit! +exit $RESULT diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh new file mode 100755 index 00000000..12eb349f --- /dev/null +++ b/csit/run-project-csit.sh @@ -0,0 +1,33 @@ +#!/bin/bash -x +# +# Copyright 2020-2021 © Samsung Electronics Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# $1 test options (passed on to run-csit.sh as such) +# + +export TESTOPTIONS=${1} +export WORKSPACE=$(git rev-parse --show-toplevel)/csit + +rm -rf ${WORKSPACE}/archives +mkdir -p ${WORKSPACE}/archives +cd ${WORKSPACE} + +# Execute all testsuites defined under plans subdirectory +for dir in plans/*/ +do + dir=${dir%*/} # remove the trailing / + ./run-csit.sh ${dir} ${TESTOPTIONS} +done diff --git a/csit/scripts/healthcheck/config/application_configuration.json.nosdnc b/csit/scripts/healthcheck/config/application_configuration.json.nosdnc new file mode 100644 index 00000000..da8a2866 --- /dev/null +++ b/csit/scripts/healthcheck/config/application_configuration.json.nosdnc @@ -0,0 +1,38 @@ +{ + "config":{ + "ric":[ + { + "name":"ric1", + "baseUrl":"https://a1-sim-OSC:8185/", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric2", + "baseUrl":"https://a1-sim-STD:8185/", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + } + ], + "streams_publishes":{ + "dmaap_publisher":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-WRITE" + } + } + }, + "streams_subscribes":{ + "dmaap_subscriber":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" + } + } + } + } + } diff --git a/csit/scripts/healthcheck/config/application_configuration.json.sdnc b/csit/scripts/healthcheck/config/application_configuration.json.sdnc new file mode 100644 index 00000000..c2a54f3d --- /dev/null +++ b/csit/scripts/healthcheck/config/application_configuration.json.sdnc @@ -0,0 +1,48 @@ +{ + "config":{ + "controller": [ + { + "name": "controller1", + "baseUrl": "https://a1-controller:8443", + "userName": "admin", + "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + } + ], + "ric":[ + { + "name":"ric1", + "controller": "controller1", + "baseUrl":"https://a1-sim-OSC:8185/", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric2", + "controller": "controller1", + "baseUrl":"https://a1-sim-STD:8185/", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + } + ], + "streams_publishes":{ + "dmaap_publisher":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-WRITE" + } + } + }, + "streams_subscribes":{ + "dmaap_subscriber":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" + } + } + } + } + } diff --git a/csit/scripts/healthcheck/data/preparePmsData.sh b/csit/scripts/healthcheck/data/preparePmsData.sh new file mode 100755 index 00000000..6e1a5755 --- /dev/null +++ b/csit/scripts/healthcheck/data/preparePmsData.sh @@ -0,0 +1,149 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= +# + +# The scripts in data/ will generate some dummy data in the running system. +# It will create: +# one policy type in a1-sim-OSC +# one service in policy agent +# one policy in a1-sim-OSC +# one policy in a1-sim-STD + +# Run command: +# ./preparePmsData.sh [policy-agent port] [a1-sim-OSC port] [a1-sim-STD port] [http/https] + +policy_agent_port=${1:-8081} +a1_sim_OSC_port=${2:-30001} +a1_sim_STD_port=${3:-30003} +httpx=${4:-"http"} +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) + +echo "using policy_agent port: "$policy_agent_port +echo "using a1-sim-OSC port: "$a1_sim_OSC_port +echo "using a1-sim-STD port: "$a1_sim_STD_port +echo "using protocol: "$httpx +echo -e "\n" + +checkRes (){ + if [ "$res" != "$expect" ]; then + echo "$res is not expected! exit!" + exit 1; + fi +} + +echo "policy agent status:" +curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/status" +res=$($curlString) +echo "$res" +expect="hunky dory200" +checkRes +echo -e "\n" + +echo "ric1 version:" +curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_OSC_port/counter/interface" +res=$($curlString) +echo "$res" +expect="OSC_2.1.0200" +checkRes +echo -e "\n" + +echo "ric2 version:" +curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_STD_port/counter/interface" +res=$($curlString) +echo "$res" +expect="STD_1.1.3200" +checkRes +echo -e "\n" + +echo "create policy type 1 to ric1:" +curlString="curl -X PUT -skw %{http_code} $httpx://localhost:$a1_sim_OSC_port/policytype?id=1 -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/OSC/policy_type.json" +res=$($curlString) +echo "$res" +expect="Policy type 1 is OK.201" +checkRes +echo -e "\n" + +for i in {1..30}; do + echo "policy types from policy agent:" + curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/v2/policy-types" + res=$($curlString) + echo "$res" + expect="{\"policy_type_ids\":[\"\",\"1\"]}200" + if [ "$res" == "$expect" ]; then + echo -e "\n" + break; + else + sleep $i + fi +done + +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/v2/services" --data-binary @${SHELL_FOLDER}/testdata/v2/service.json" +res=$($curlString) +echo "$res" +expect="201" +checkRes +echo -e "\n" + +echo "create policy aa8feaa88d944d919ef0e83f2172a5000 to ric1 with type 1 and service controlpanel via policy agent:" +curlString="curl -k -X PUT -sw %{http_code} -H accept:application/json -H Content-Type:application/json $httpx://localhost:$policy_agent_port/v2/policy?policy_id=aa8feaa88d944d919ef0e83f2172a5000&policytype_id=1&ric_id=ric1&service_id=controlpanel&transient=false --data-binary @${SHELL_FOLDER}/testdata/policy-osc.json" +res=$($curlString) +echo "$res" +expect="201" +checkRes +echo -e "\n" + +echo "policy numbers from ric1:" +curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_OSC_port/counter/num_instances" +res=$($curlString) +echo "$res" +expect="1200" +checkRes +echo -e "\n" + +echo "create policy aa8feaa88d944d919ef0e83f2172a5100 to ric2 with no-type and service ric-registration via policy agent:" +curlString="curl -k -X PUT -sw %{http_code} -H accept:application/json -H Content-Type:application/json $httpx://localhost:$policy_agent_port/v2/policy?policy_id=aa8feaa88d944d919ef0e83f2172a5100&ric_id=ric2&service_id=controlpanel&transient=false --data-binary @${SHELL_FOLDER}/testdata/policy.json" +res=$($curlString) +echo "$res" +expect="201" +checkRes +echo -e "\n" + +echo "policy numbers from ric2:" +curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_STD_port/counter/num_instances" +res=$($curlString) +echo "$res" +expect="1200" +checkRes +echo -e "\n" + +echo "policy id aa8feaa88d944d919ef0e83f2172a5000 from policy agent:" +curlString="curl -s -o /dev/null -I -w %{http_code} $httpx://localhost:$policy_agent_port/v2/policy?policy_id=aa8feaa88d944d919ef0e83f2172a5000" +res=$($curlString) +echo "$res" +expect="200" +checkRes +echo -e "\n" + +echo "policy id aa8feaa88d944d919ef0e83f2172a5100 from policy agent:" +curlString="curl -s -o /dev/null -I -w %{http_code} $httpx://localhost:$policy_agent_port/v2/policy?policy_id=aa8feaa88d944d919ef0e83f2172a5100" +res=$($curlString) +echo "$res" +expect="200" +checkRes +echo -e "\n" diff --git a/csit/scripts/healthcheck/data/testdata/OSC/policy_type.json b/csit/scripts/healthcheck/data/testdata/OSC/policy_type.json new file mode 100644 index 00000000..aeea7733 --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/OSC/policy_type.json @@ -0,0 +1,45 @@ +{ + "name": "pt1", + "description": "pt1 policy type", + "policy_type_id": 1, + "create_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSC_Type1_1.0.0", + "description": "Type 1 policy type", + "type": "object", + "properties": { + "scope": { + "type": "object", + "properties": { + "ueId": { + "type": "string" + }, + "qosId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ueId", + "qosId" + ] + }, + "qosObjectives": { + "type": "object", + "properties": { + "priorityLevel": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "priorityLevel" + ] + } + }, + "additionalProperties": false, + "required": [ + "scope", "qosObjectives" + ] + } +} diff --git a/csit/scripts/healthcheck/data/testdata/policy-osc.json b/csit/scripts/healthcheck/data/testdata/policy-osc.json new file mode 100644 index 00000000..745eab60 --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/policy-osc.json @@ -0,0 +1,9 @@ +{ + "scope": { + "ueId": "ue5100", + "qosId": "qos5100" + }, + "qosObjectives": { + "priorityLevel": 5100 + } +} diff --git a/csit/scripts/healthcheck/data/testdata/policy.json b/csit/scripts/healthcheck/data/testdata/policy.json new file mode 100644 index 00000000..ac1b538b --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/policy.json @@ -0,0 +1,9 @@ +{ + "scope": { + "ueId": "ue3100", + "qosId": "qos3100" + }, + "qosObjectives": { + "priorityLevel": 3100 + } +} diff --git a/csit/scripts/healthcheck/data/testdata/service.json b/csit/scripts/healthcheck/data/testdata/service.json new file mode 100644 index 00000000..7bb66514 --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/service.json @@ -0,0 +1,5 @@ +{ + "callbackUrl": "https://callback-receiver:8091/callbacks/1", + "keepAliveIntervalSeconds": "3600", + "serviceName": "service1" +} diff --git a/csit/scripts/healthcheck/data/testdata/v2/policy_osc.json b/csit/scripts/healthcheck/data/testdata/v2/policy_osc.json new file mode 100644 index 00000000..902f9111 --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/v2/policy_osc.json @@ -0,0 +1,16 @@ +{ + "ric_id": "ric1", + "policy_id": "aa8feaa88d944d919ef0e83f2172a5100", + "service_id": "controlpanel", + "policytype_id": "1", + "status_notification_uri": "http://callback-receiver:8090/callbacks/test", + "policy_data": { + "scope": { + "ueId": "ue5100", + "qosId": "qos5100" + }, + "qosObjectives": { + "priorityLevel": 5100 + } + } +} \ No newline at end of file diff --git a/csit/scripts/healthcheck/data/testdata/v2/policy_std_v2.json b/csit/scripts/healthcheck/data/testdata/v2/policy_std_v2.json new file mode 100644 index 00000000..dcb7e38f --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/v2/policy_std_v2.json @@ -0,0 +1,16 @@ +{ + "ric_id": "ric2", + "policy_id": "aa8feaa88d944d919ef0e83f2172a5000", + "service_id": "controlpanel", + "policytype_id": "2", + "status_notification_uri": "http://callback-receiver:8090/callbacks/test", + "policy_data": { + "scope": { + "ueId": "ue5000", + "qosId": "qos5000" + }, + "qosObjectives": { + "priorityLevel": 5000 + } + } +} \ No newline at end of file diff --git a/csit/scripts/healthcheck/data/testdata/v2/policy_type.json b/csit/scripts/healthcheck/data/testdata/v2/policy_type.json new file mode 100644 index 00000000..931498c4 --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/v2/policy_type.json @@ -0,0 +1,56 @@ +{ + "policySchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "STD_QOS_0_2_0", + "description": "STD QOS policy type", + "type": "object", + "properties": { + "scope": { + "type": "object", + "properties": { + "ueId": { + "type": "string" + }, + "qosId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ueId", + "qosId" + ] + }, + "qosObjectives": { + "type": "object", + "properties": { + "priorityLevel": { + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "priorityLevel" + ] + } + } + }, + "statusSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "STD_QOS_0.2.0", + "description": "STD QOS policy type status", + "type": "object", + "properties": { + "enforceStatus": { + "type": "string" + }, + "enforceReason": { + "type": "string" + }, + "additionalProperties": false, + "required": [ + "enforceStatus" + ] + } + } + } \ No newline at end of file diff --git a/csit/scripts/healthcheck/data/testdata/v2/service.json b/csit/scripts/healthcheck/data/testdata/v2/service.json new file mode 100644 index 00000000..d984cbab --- /dev/null +++ b/csit/scripts/healthcheck/data/testdata/v2/service.json @@ -0,0 +1,5 @@ +{ + "callback_url": "http://callback-receiver:8090/callbacks/ric-registration", + "keep_alive_interval_seconds": "0", + "service_id": "ric-registration" +} \ No newline at end of file diff --git a/csit/scripts/healthcheck/docker-compose.yml b/csit/scripts/healthcheck/docker-compose.yml new file mode 100644 index 00000000..9cd89506 --- /dev/null +++ b/csit/scripts/healthcheck/docker-compose.yml @@ -0,0 +1,78 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= +# +version: '3' + +networks: + default: + driver: bridge + +services: + policy-agent: + image: onap/ccsdk-oran-a1policymanagementservice:1.0.3-STAGING-latest + container_name: policy-agent + networks: + default: + aliases: + - policy-agent-container + ports: + - 8081:8081 + - 8433:8433 + volumes: + - ./config/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:ro + # For using own certs instead of the default ones (built into the container), + # place them in config/ directory, update the application-policyagent.yaml file, and uncomment the following lines + # - ./config/keystore-policyagent.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro + # - ./config/truststore-policyagent.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro + # - ./config/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro + + a1-sim-OSC: + image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.1.0 + container_name: a1-sim-OSC + networks: + - default + ports: + - 30001:8085 + - 30002:8185 + environment: + - A1_VERSION=OSC_2.1.0 + - REMOTE_HOSTS_LOGGING=1 + - ALLOW_HTTP=true + + a1-sim-STD: + image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.1.0 + container_name: a1-sim-STD + networks: + - default + ports: + - 30003:8085 + - 30004:8185 + environment: + - A1_VERSION=STD_1.1.3 + - REMOTE_HOSTS_LOGGING=1 + - ALLOW_HTTP=true + + a1-sim-STD-v2: + image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.1.0 + container_name: a1-sim-STD-v2 + networks: + - default + ports: + - 30005:8085 + - 30006:8185 + environment: + - A1_VERSION=STD_2.0.0 + - REMOTE_HOSTS_LOGGING=1 + - ALLOW_HTTP=true diff --git a/csit/scripts/healthcheck/sdnc/config/https-props-a1controller.properties b/csit/scripts/healthcheck/sdnc/config/https-props-a1controller.properties new file mode 100644 index 00000000..7c4b1c17 --- /dev/null +++ b/csit/scripts/healthcheck/sdnc/config/https-props-a1controller.properties @@ -0,0 +1,24 @@ +# ========================LICENSE_START================================= +# O-RAN-SC +# %% +# Copyright (C) 2021 Nordix Foundation +# %% +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ========================LICENSE_END=================================== + +key-store=/etc/ssl/certs/java/keystore.jks +key-password=sdnc-a1-controller +keystore-password=sdnc-a1-controller +isTrustStoreUsed=true +trust-store=/etc/ssl/certs/java/truststore.jks +truststore-password=sdnc-a1-controller diff --git a/csit/scripts/healthcheck/sdnc/docker-compose.yml b/csit/scripts/healthcheck/sdnc/docker-compose.yml new file mode 100644 index 00000000..86dd3a54 --- /dev/null +++ b/csit/scripts/healthcheck/sdnc/docker-compose.yml @@ -0,0 +1,69 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= +# +version: '3' + +networks: + default: + driver: bridge + +services: + db: + image: mysql/mysql-server:5.6 + container_name: sdnc-db + networks: + - default + ports: + - "3306" + environment: + - MYSQL_ROOT_PASSWORD=openECOMP1.0 + - MYSQL_ROOT_HOST=% + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + + a1-controller: + image: onap/sdnc-image:2.1.0 + depends_on : + - db + container_name: a1-controller + networks: + - default + entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"] + ports: + - 8282:8181 + - 8443:8443 + links: + - db:dbhost + - db:sdnctldb01 + - db:sdnctldb02 + environment: + - MYSQL_ROOT_PASSWORD=openECOMP1.0 + - SDNC_DB_INIT=true + - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties + - A1_TRUSTSTORE_PASSWORD=a1adapter + # For using own certs instead of the default ones (built into the container), + # place them in config/ directory, update the https-props-a1controller.properties file, and uncomment the following lines + #volumes: + # - ./sdnc/config/keystore-a1controller.jks:/etc/ssl/certs/java/keystore.jks:ro + # - ./sdnc/config/truststore-a1controller.jks:/etc/ssl/certs/java/truststore.jks:ro + # - ./sdnc/config/https-props-a1controller.properties:/opt/onap/sdnc/data/properties/https-props.properties:ro + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" diff --git a/csit/scripts/healthcheck/test/health_check.sh b/csit/scripts/healthcheck/test/health_check.sh new file mode 100755 index 00000000..e0d62390 --- /dev/null +++ b/csit/scripts/healthcheck/test/health_check.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +############################################################################### +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Modifications copyright (c) 2021 Nordix Foundation +# +############################################################################### + +unset http_proxy https_proxy +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +docker stop $(docker ps -aq) +docker system prune -f + +cd ${SHELL_FOLDER}/../config +cp application_configuration.json.nosdnc application_configuration.json + +cd ${SHELL_FOLDER}/../ +docker-compose up -d + +checkStatus(){ + for i in {1..60}; do + res=$($1) + echo "$res" + expect=$2 + if [ "$res" == "$expect" ]; then + echo -e "$3 is alive!\n" + break; + else + sleep $i + fi + done +} +# Healthcheck docker containers + +# check SIM1 status +echo "check SIM1 status:" +checkStatus "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" + +# check SIM3 status +echo "check SIM3 status:" +checkStatus "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" + +echo "NONRTRIC health check passed." diff --git a/csit/scripts/healthcheck/test/pms_a1sim.sh b/csit/scripts/healthcheck/test/pms_a1sim.sh new file mode 100755 index 00000000..f3344cf1 --- /dev/null +++ b/csit/scripts/healthcheck/test/pms_a1sim.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= + +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +docker stop $(docker ps -aq) +docker system prune -f + +cd ${SHELL_FOLDER}/../config +cp application_configuration.json.nosdnc application_configuration.json + +cd ${SHELL_FOLDER}/../ +docker-compose up -d + +checkStatus(){ + for i in {1..20}; do + res=$($1) + echo "$res" + expect=$2 + if [ "$res" == "$expect" ]; then + echo -e "$3 is alive!\n" + break; + else + sleep $i + fi + done +} +# Healthcheck docker containers + +# check SIM1 status +echo "check SIM1 status:" +checkStatus "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" + +# check SIM3 status +echo "check SIM3 status:" +checkStatus "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" + +cd ${SHELL_FOLDER}/../data +./preparePmsData.sh + diff --git a/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh b/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh new file mode 100755 index 00000000..5bf81b3f --- /dev/null +++ b/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# ============LICENSE_START=============================================== +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END================================================= + +SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) +docker stop $(docker ps -aq) +docker system prune -f + +cd ${SHELL_FOLDER}/../config +cp application_configuration.json.sdnc application_configuration.json + +cd ${SHELL_FOLDER}/../ +docker-compose -f docker-compose.yml -f sdnc/docker-compose.yml up -d + +checkStatus(){ + for i in {1..20}; do + res=$($1) + echo "$res" + expect=$2 + if [ "$res" == "$expect" ]; then + echo -e "$3 is alive!\n" + break; + else + sleep $i + fi + done +} +# Healthcheck docker containers + +# check SIM1 status +echo "check SIM1 status:" +checkStatus "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" + +# check SIM3 status +echo "check SIM3 status:" +checkStatus "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" + +# check SDNC status +echo "check SDNC status:" +checkStatus "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/scripts/healthcheck/test/setup.sh b/csit/scripts/healthcheck/test/setup.sh new file mode 100755 index 00000000..c751e6d2 --- /dev/null +++ b/csit/scripts/healthcheck/test/setup.sh @@ -0,0 +1,32 @@ +# Set credentials +export MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-mySecretPassword} +export MYSQL_USER=${MYSQL_USER:-sdnc} +export MYSQL_PASSWORD=${MYSQL_PASSWORD:-test123} +export MYSQL_DATABASE=${MYSQL_DATABASE:-sdncdb} +export ODL_USER=${ODL_USER:-admin} +export ODL_PASSWORD=${ODL_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} +export ODL_ADMIN_USER=${ODL_ADMIN_USER:-${ODL_USER}} +export ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-${ODL_PASSWORD}} +export DMAAP_USER=${DMAAP_USER:-admin} +export DMAAP_PASSWORD=${DMAAP_PASSWORD:-admin} +export DMAAP_AUTHKEY=${DMAAP_AUTHKEY:-""} +export AAI_TRUSTSTORE_PASSWORD=${AAI_TRUSTSTORE_PASSWORD:-changeit} +export AAI_CLIENT_NAME=${AAI_CLIENT_NAME:-sdnc@sdnc.onap.org} +export AAI_CLIENT_PASSWORD=${AAI_CLIENT_PASSWORD:-demo123456!} +export ANSIBLE_TRUSTSTORE_PASSWORD=${ANSIBLE_TRUSTSTURE_PASSWORD:-changeit} +export HONEYCOMB_USER=${HONEYCOMB_USER:-admin} +export HONEYCOMB_PASSWORD=${HONEYCOMB_PASSWORD:-admin} +export TRUSTSTORE_PASSWORD=${TRUSTSTORE_PASSWORD:-changeit} +export KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD:-adminadmin} +export NENG_USER=${NENG_USER:-ccsdkapps} +export NENG_PASSWORD=${NENG_PASSWORD:-ccsdkapps} +export SO_USER=${SO_USER:-sdncaBpmn} +export SO_PASSWORD=${SO_PASSWORD:-password1$} +export CDS_USER=${CDS_USER:-ccsdkapps} +export CDS_PASSWORD=${CDS_PASSWORD:-ccsdkapps} +export ANSIBLE_USER=${ANSIBLE_USER:-sdnc} +export ANSIBLE_PASSWORD=${ANSIBLE_PASSWORD:-sdnc} +export SQL_CRYPTKEY=${SQL_CRYPTKEY:-fakECryptKey} +export ASDC_USER=${ASDC_USER:-sdnc} +export ASDC_PASSWORD=${ASDC_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} + diff --git a/csit/tests/healthcheck/__init__.robot b/csit/tests/healthcheck/__init__.robot new file mode 100644 index 00000000..9f5c8d18 --- /dev/null +++ b/csit/tests/healthcheck/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation NONRTRIC - healthcheck diff --git a/csit/tests/healthcheck/test1.robot b/csit/tests/healthcheck/test1.robot new file mode 100644 index 00000000..2aae2291 --- /dev/null +++ b/csit/tests/healthcheck/test1.robot @@ -0,0 +1,16 @@ +*** Settings *** +Library OperatingSystem +Library Process + +*** Variables *** + +${health_check} ${SCRIPTS}/healthcheck/test/health_check.sh + + +*** Test Cases *** + +Health check test case for NONRTRIC + [Documentation] Health check + Start Process ${health_check} >> log_hc.txt shell=yes + ${cli_cmd_output}= Wait For Process timeout=600 + Should Be Equal as Integers ${cli_cmd_output.rc} 0 diff --git a/csit/tests/healthcheck/test2.robot b/csit/tests/healthcheck/test2.robot new file mode 100644 index 00000000..02334593 --- /dev/null +++ b/csit/tests/healthcheck/test2.robot @@ -0,0 +1,16 @@ +*** Settings *** +Library OperatingSystem +Library Process + +*** Variables *** + +${pms_a1sim} ${SCRIPTS}/healthcheck/test/pms_a1sim.sh + + +*** Test Cases *** + +Health check test case for NONRTRIC + [Documentation] Deploy NONRTRIC without SDNC + Start Process ${pms_a1sim} >> log_hc.txt shell=yes + ${cli_cmd_output}= Wait For Process timeout=600 + Should Be Equal as Integers ${cli_cmd_output.rc} 0 -- cgit 1.2.3-korg