blob: bf86d980ac523ca8af1a07940f1856607ff74cb8 [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
Alexc85212b2022-11-08 12:27:01 -060015 echo " "
16 echo "# Running spt checks"
Alex2c8b8802022-10-20 14:07:15 -050017 echo " "
Alexc85212b2022-11-08 12:27:01 -060018 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/"
Alex2c8b8802022-10-20 14:07:15 -050019else
20 echo "# Public network not set: TEMPEST_CUSTOM_PUBLIC_NET=${TEMPEST_CUSTOM_PUBLIC_NET}"
21 exit 1
22fi