aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit')
-rwxr-xr-xtest/csit/plans/aaf/sms-test-plan/setup.sh4
-rw-r--r--test/csit/plans/aaf/sms-test-plan/teardown.sh2
-rw-r--r--test/csit/plans/externalapi-nbi/healthcheck/setup.sh17
-rw-r--r--test/csit/plans/externalapi-nbi/healthcheck/teardown.sh17
-rw-r--r--test/csit/plans/externalapi-nbi/healthcheck/testplan.txt3
-rw-r--r--test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh4
-rw-r--r--test/csit/scripts/externalapi-nbi/delete_nbi_containers.sh33
-rw-r--r--test/csit/scripts/externalapi-nbi/start_nbi_containers.sh38
-rw-r--r--test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot2
-rw-r--r--test/csit/tests/externalapi-nbi/healthcheck/__init__.robot2
-rw-r--r--test/csit/tests/externalapi-nbi/healthcheck/healthcheck.robot29
11 files changed, 145 insertions, 6 deletions
diff --git a/test/csit/plans/aaf/sms-test-plan/setup.sh b/test/csit/plans/aaf/sms-test-plan/setup.sh
index 9f77b698e..9b57d64c4 100755
--- a/test/csit/plans/aaf/sms-test-plan/setup.sh
+++ b/test/csit/plans/aaf/sms-test-plan/setup.sh
@@ -24,7 +24,7 @@ mkdir -p $(pwd)/config
docker login -u docker -p docker nexus3.onap.org:10001
docker pull nexus3.onap.org:10001/onap/aaf/sms
-docker pull docker.io/vault:0.9.5
+docker pull docker.io/vault:0.10.0
#
# Running vault in dev server mode here for CSIT
@@ -32,7 +32,7 @@ docker pull docker.io/vault:0.9.5
#
docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \
-e SKIP_SETCAP=true \
- --name vault -d -p 8200:8200 vault:0.9.5
+ --name vault -d -p 8200:8200 vault:0.10.0
SMSDB_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vault)
cat << EOF > $CONFIG_FILE
diff --git a/test/csit/plans/aaf/sms-test-plan/teardown.sh b/test/csit/plans/aaf/sms-test-plan/teardown.sh
index d6fa32924..2c8b3e894 100644
--- a/test/csit/plans/aaf/sms-test-plan/teardown.sh
+++ b/test/csit/plans/aaf/sms-test-plan/teardown.sh
@@ -22,4 +22,4 @@ rm -rf config
docker stop sms vault
docker rm sms vault
docker rmi nexus3.onap.org:10001/onap/aaf/sms
-docker rmi docker.io/vault:0.9.5
+docker rmi docker.io/vault:0.10.0
diff --git a/test/csit/plans/externalapi-nbi/healthcheck/setup.sh b/test/csit/plans/externalapi-nbi/healthcheck/setup.sh
new file mode 100644
index 000000000..50da7ad6a
--- /dev/null
+++ b/test/csit/plans/externalapi-nbi/healthcheck/setup.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# ========================================================================
+# Copyright (c) 2018 Orange
+# 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.
+# ========================================================================
+
+source ${WORKSPACE}/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh
diff --git a/test/csit/plans/externalapi-nbi/healthcheck/teardown.sh b/test/csit/plans/externalapi-nbi/healthcheck/teardown.sh
new file mode 100644
index 000000000..83929723b
--- /dev/null
+++ b/test/csit/plans/externalapi-nbi/healthcheck/teardown.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# ========================================================================
+# Copyright (c) 2018 Orange
+# 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.
+# ========================================================================
+
+source ${WORKSPACE}/test/csit/scripts/externalapi-nbi/delete_nbi_containers.sh \ No newline at end of file
diff --git a/test/csit/plans/externalapi-nbi/healthcheck/testplan.txt b/test/csit/plans/externalapi-nbi/healthcheck/testplan.txt
new file mode 100644
index 000000000..06622ae7b
--- /dev/null
+++ b/test/csit/plans/externalapi-nbi/healthcheck/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+externalapi-nbi/healthcheck
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
index 1c3e4e83a..d1930cef5 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
@@ -18,12 +18,12 @@
#Start postgres database
-docker run -d -i -t --name=postgres -p 5432:5432 nexus3.onap.org:10001/onap/refrepo/postgres:latest
+docker run -d -i -t --name=postgres -p 5432:5432 nexus3.onap.org:10001/onap/vnfsdk/refrepo/postgres:latest
POSTGRES=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgres`
#Start market place
-docker run -d -i -t --name=refrepo -e POSTGRES_IP=$POSTGRES -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.1-STAGING-latest
+docker run -d -i -t --name=refrepo -e POSTGRES_IP=$POSTGRES -p 8702:8702 nexus3.onap.org:10001/onap/vnfsdk/refrepo:1.1-STAGING-latest
# Wait for Market place initialization
echo Wait for VNF Repository initialization
diff --git a/test/csit/scripts/externalapi-nbi/delete_nbi_containers.sh b/test/csit/scripts/externalapi-nbi/delete_nbi_containers.sh
new file mode 100644
index 000000000..76be3289a
--- /dev/null
+++ b/test/csit/scripts/externalapi-nbi/delete_nbi_containers.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# ========================================================================
+# Copyright (c) 2018 Orange
+# 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.
+# ========================================================================
+
+echo "This is ${WORKSPACE}/test/csit/scripts/externalapi-nbi/delete_nbi_containers.sh"
+
+# Check if docker-compose file exists
+if [ ! -f "$WORKSPACE/externalapi-nbi/docker-compose.yml" ]; then
+ echo 'There is nothing to clean. Exiting...' >&2
+ exit 0
+fi
+
+cd $WORKSPACE/externalapi-nbi
+
+# Remove containers and attached/anonymous volume(s)
+docker-compose down -v
+# Force stop & remove all containers and volumes
+docker-compose rm -f -s -v
+
+# clean up
+rm -rf $WORKSPACE/externalapi-nbi \ No newline at end of file
diff --git a/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh b/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh
new file mode 100644
index 000000000..d1a026a67
--- /dev/null
+++ b/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+# ========================================================================
+# Copyright (c) 2018 Orange
+# 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.
+# ========================================================================
+
+NEXUS_USERNAME=docker
+NEXUS_PASSWD=docker
+NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+DOCKER_IMAGE_VERSION=latest
+
+echo "This is ${WORKSPACE}/test/csit/scripts/externalapi-nbi/start_nbi_containers.sh"
+
+# Create directory
+mkdir -p $WORKSPACE/externalapi-nbi
+cd $WORKSPACE/externalapi-nbi
+
+# Fetch the latest docker-compose.yml
+wget -O docker-compose.yml 'https://git.onap.org/externalapi/nbi/plain/docker-compose.yml?h=master'
+
+# Pull the nbi docker image from nexus
+# MariaDB and mongoDB will be pulled automatically from docker.io during docker-compose
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+docker pull $NEXUS_DOCKER_REPO/onap/externalapi/nbi:$DOCKER_IMAGE_VERSION
+
+# Start nbi, MariaDB and MongoDB containers with docker compose and nbi/docker-compose.yml
+docker-compose up -d mariadb mongo && sleep 5 # to ensure that these services are ready for connections
+docker-compose up -d nbi
diff --git a/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot b/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot
index 1302abc79..dae48a9f5 100644
--- a/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot
+++ b/test/csit/tests/aaf/aaf-sms-suite/aaf-sms-test.robot
@@ -23,7 +23,7 @@ SMS GetStatus
[Documentation] Gets Backend Status
Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT}
&{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Get Request SMS /v1/sms/status headers=${headers}
+ ${resp}= Get Request SMS /v1/sms/quorum/status headers=${headers}
Log To Console *********************
Log To Console response = ${resp}
Log To Console body = ${resp.text}
diff --git a/test/csit/tests/externalapi-nbi/healthcheck/__init__.robot b/test/csit/tests/externalapi-nbi/healthcheck/__init__.robot
new file mode 100644
index 000000000..826350785
--- /dev/null
+++ b/test/csit/tests/externalapi-nbi/healthcheck/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation ExternalAPI-NBI - healthcheck
diff --git a/test/csit/tests/externalapi-nbi/healthcheck/healthcheck.robot b/test/csit/tests/externalapi-nbi/healthcheck/healthcheck.robot
new file mode 100644
index 000000000..eb5a5bb4f
--- /dev/null
+++ b/test/csit/tests/externalapi-nbi/healthcheck/healthcheck.robot
@@ -0,0 +1,29 @@
+*** Settings ***
+Documentation The main interface for interacting with External API/NBI
+Library RequestsLibrary
+
+*** Variables ***
+${GLOBAL_NBI_SERVER_PROTOCOL} http
+${GLOBAL_INJECTED_NBI_IP_ADDR} localhost
+${GLOBAL_NBI_SERVER_PORT} 8080
+${NBI_HEALTH_CHECK_PATH} /nbi/api/v1/status
+${NBI_ENDPOINT} ${GLOBAL_NBI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_NBI_IP_ADDR}:${GLOBAL_NBI_SERVER_PORT}
+
+
+*** Keywords ***
+Run NBI Health Check
+ [Documentation] Runs NBI Health check
+ ${resp}= Run NBI Get Request ${NBI_HEALTH_CHECK_PATH}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Run NBI Get Request
+ [Documentation] Runs NBI Get request
+ [Arguments] ${data_path}
+ ${session}= Create Session session ${NBI_ENDPOINT}
+ ${resp}= Get Request session ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
+ Log Received response from NBI ${resp.text}
+ ${json}= Set Variable ${resp.json()}
+ ${status}= Get From Dictionary ${json} status
+ Should Be Equal ${status} ok
+ [Return] ${resp} \ No newline at end of file