summaryrefslogtreecommitdiffstats
path: root/test/csit/plans
diff options
context:
space:
mode:
authorkishore <kk707x@att.com>2017-09-08 17:15:42 -0500
committerkishore <kk707x@att.com>2017-09-08 17:20:20 -0500
commit328996fc52eee471498f8edd21b074c8ed241602 (patch)
treef7e66cafcfc086f0be99b4d05e2de8b44072f22a /test/csit/plans
parent7d914fc5bb4665a433701796e42cbe8af021a547 (diff)
Portal scripts for CSIT
Issue-ID: PORTAL-53 Change-Id: I23126fa0d407a8ed11e365c446caed9c3c57ff85 Signed-off-by: kishore <kk707x@att.com>
Diffstat (limited to 'test/csit/plans')
-rw-r--r--test/csit/plans/portal/testsuite/.env17
m---------test/csit/plans/portal/testsuite/portal0
-rw-r--r--test/csit/plans/portal/testsuite/setup.sh40
-rw-r--r--test/csit/plans/portal/testsuite/teardown.sh20
-rw-r--r--test/csit/plans/portal/testsuite/testplan.txt3
5 files changed, 80 insertions, 0 deletions
diff --git a/test/csit/plans/portal/testsuite/.env b/test/csit/plans/portal/testsuite/.env
new file mode 100644
index 000000000..fa3076859
--- /dev/null
+++ b/test/csit/plans/portal/testsuite/.env
@@ -0,0 +1,17 @@
+# Environment settings
+# used by docker-compose AND by other shell scripts
+
+# Host directory with config files
+PROJECT_DIR=/PROJECT/OpenSource/UbuntuEP
+
+# Directory within containers
+WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps
+
+# Following are ALSO used in demo/boot/portal_vm_init.sh
+EP_IMG_NAME=portal-apps
+DB_IMG_NAME=portal-db
+WMS_IMG_NAME=portal-wms
+# Tag all images with this
+PORTAL_TAG=1.1.0
+
+NEXUS_REPO=nexus3.onap.org:10003
diff --git a/test/csit/plans/portal/testsuite/portal b/test/csit/plans/portal/testsuite/portal
new file mode 160000
+Subproject e65a5d4a4852cbd0056fb3b881613f0a4dba4ec
diff --git a/test/csit/plans/portal/testsuite/setup.sh b/test/csit/plans/portal/testsuite/setup.sh
new file mode 100644
index 000000000..a6c1ba483
--- /dev/null
+++ b/test/csit/plans/portal/testsuite/setup.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+# Starts docker containers for ONAP Portal in Rackspace.
+# Version for Amsterdam/R1 uses docker-compose.
+
+# be verbose
+set -x
+
+# Establish environment variables
+NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
+NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
+NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
+
+# Refresh configuration and scripts
+cd /opt/portal
+git pull
+cd deliveries
+
+# Get image names used below from docker-compose environment file
+source .env
+
+# Copy property files
+ETC=/PROJECT/OpenSource/UbuntuEP/etc
+mkdir -p $ETC
+cp -r properties_rackspace/* $ETC
+
+# Refresh images
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+docker pull $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION
+docker pull $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION
+
+# Tag them as expected by docker-compose file
+docker tag $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG
+docker tag $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG
+docker tag $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG
+
+# docker-compose is not in /usr/bin
+/opt/docker/docker-compose down
+/opt/docker/docker-compose up -d
diff --git a/test/csit/plans/portal/testsuite/teardown.sh b/test/csit/plans/portal/testsuite/teardown.sh
new file mode 100644
index 000000000..4214c8279
--- /dev/null
+++ b/test/csit/plans/portal/testsuite/teardown.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Copyright 2017 AT&T Intellectual Property. 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.
+#
+
+kill-instance.sh i-mock
+
+
diff --git a/test/csit/plans/portal/testsuite/testplan.txt b/test/csit/plans/portal/testsuite/testplan.txt
new file mode 100644
index 000000000..5aba3164c
--- /dev/null
+++ b/test/csit/plans/portal/testsuite/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+portal/Healthcheck