summaryrefslogtreecommitdiffstats
path: root/tests/ci
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ci')
-rwxr-xr-xtests/ci/prepare_env.sh8
-rw-r--r--tests/ci/scp_storperf_files.sh29
-rwxr-xr-xtests/ci/yardstick-verify15
3 files changed, 37 insertions, 15 deletions
diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh
index 3d9cc298f..c3ee4c76b 100755
--- a/tests/ci/prepare_env.sh
+++ b/tests/ci/prepare_env.sh
@@ -11,7 +11,7 @@
# Perepare the environment to run yardstick ci
: ${DEPLOY_TYPE:='bm'} # Can be any of 'bm' (Bare Metal) or 'virt' (Virtual)
-
+: ${INSTALLER_TYPE:='unknown'}
: ${NODE_NAME:='unknown'}
: ${EXTERNAL_NETWORK:='admin_floating_net'}
@@ -61,9 +61,9 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME
# Prepare a admin-rc file for StorPerf integration
$YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh
-# copy a admin-rc file for StorPerf integration to the deployment location
-if [ "$NODE_NAME" == "huawei-pod1" ]; then
- bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_files.sh
+# copy Storperf related files to the deployment location
+if [ "$INSTALLER_TYPE" == "compass" ]; then
+ source $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_files.sh
fi
# Fetching id_rsa file from jump_server..."
diff --git a/tests/ci/scp_storperf_files.sh b/tests/ci/scp_storperf_files.sh
index 234032cf1..71306eb80 100644
--- a/tests/ci/scp_storperf_files.sh
+++ b/tests/ci/scp_storperf_files.sh
@@ -12,9 +12,26 @@
# Copy storperf_admin-rc to deployment location.
ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
-sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \
- root@192.168.10.6:/root/ &> /dev/null
-sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/docker-compose.yaml \
- root@192.168.10.6:/root/ &> /dev/null
-sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/nginx.conf \
- root@192.168.10.6:/root/ &> /dev/null
+
+scp_files(){
+ export JUMP_HOST_IP
+ sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \
+ root@${JUMP_HOST_IP}:/root/ &> /dev/null
+ sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/docker-compose.yaml \
+ root@${JUMP_HOST_IP}:/root/ &> /dev/null
+}
+
+case "$NODE_NAME" in
+ "huawei-pod1")
+ JUMP_HOST_IP='192.168.10.6'
+ scp_files
+ ;;
+ "huawei-pod2")
+ JUMP_HOST_IP='192.168.11.2'
+ scp_files
+ ;;
+ *)
+ # no node name, exit
+ echo "storperf test case will not run on this pod, skipping scp files..."
+ ;;
+esac
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index 096ea534f..16598df7b 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -99,8 +99,8 @@ set -o pipefail
install_storperf()
{
- # Install Storper on huawei-pod1
- if [ "$NODE_NAME" == "huawei-pod1" ]; then
+ # Install Storper on huawei-pod1 and huawei-pod2
+ if [ "$NODE_NAME" == "huawei-pod1" -o "$NODE_NAME" == "huawei-pod2" ]; then
echo
echo "========== Installing storperf =========="
@@ -114,8 +114,8 @@ install_storperf()
remove_storperf()
{
- # remove Storper from huawei-pod1
- if [ "$NODE_NAME" == "huawei-pod1" ]; then
+ # remove Storper from huawei-pod1 and huawei-pod2
+ if [ "$NODE_NAME" == "huawei-pod1" -o "$NODE_NAME" == "huawei-pod2" ]; then
echo
echo "========== Removing storperf =========="
@@ -293,8 +293,13 @@ main()
echo
# check OpenStack services
+ if [[ $OS_INSECURE ]] && [[ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]]; then
+ SECURE="--insecure"
+ else
+ SECURE=""
+ fi
echo "Checking OpenStack services:"
- for cmd in "openstack image list" "openstack server list" "openstack stack list"; do
+ for cmd in "openstack ${SECURE} image list" "openstack ${SECURE} server list" "openstack ${SECURE} stack list"; do
echo " checking ${cmd} ..."
if ! $cmd >/dev/null; then
echo "error: command \"$cmd\" failed"