blob: 156fd1da7aaba5d41afb9e7941cc2f3af6e57c1b [file] [log] [blame]
Alex2c8b8802022-10-20 14:07:15 -05001#!/bin/bash
2tenv=mos
3. $MY_PROJFOLDER/envs/${tenv}rc
4##
5echo "### Checking openstack resources"
6status=$(kubectl -n qa-space get pod | grep toolset | tr -s " " | cut -d' ' -f3)
7if [ ${status} != "Running" ]; then
8 echo "# 'toolset' container is not Running"
9 exit 1
10fi
11admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value")
12if [ ! -z ${TEMPEST_CUSTOM_PUBLIC_NET+x} ]; then
13 echo "# Copying global_config.yaml"
14 kubectl cp $MY_PROJFOLDER/yamls/global_config.yaml qa-space/toolset:/opt/mos-spt/global_config.yaml
15 echo " "
16 echo "# Running spt checks"
17 echo " "
18 kubectl exec toolset --stdin --tty -n qa-space -- bash -c "cd /opt/mos-spt; . .venv/bin/activate; pytest -rs -o log_cli=true --tb=short tests/test_vm2vm.py"
19else
20 echo "# Public network not set: TEMPEST_CUSTOM_PUBLIC_NET=${TEMPEST_CUSTOM_PUBLIC_NET}"
21 exit 1
22fi