blob: 13287aa97acd0f8b9ed571e5a7bc7a5364232798 [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
Ievgeniia Zadorozhnabbd211a2024-01-25 00:59:58 +010011
12echo "# Copying mos-kubeconfig.yaml and node.key from /artifacts/envs/"
13kubectl cp /artifacts/envs/mos-kubeconfig.yaml qa-space/toolset:/opt/mos-spt/mos-kubeconfig.yaml
14kubectl cp /artifacts/envs/node.key qa-space/toolset:/opt/mos-spt/node.key
15
Alex2c8b8802022-10-20 14:07:15 -050016admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value")
17if [ ! -z ${TEMPEST_CUSTOM_PUBLIC_NET+x} ]; then
18 echo "# Copying global_config.yaml"
19 kubectl cp $MY_PROJFOLDER/yamls/global_config.yaml qa-space/toolset:/opt/mos-spt/global_config.yaml
Alexc85212b2022-11-08 12:27:01 -060020 echo " "
21 echo "# Running spt checks"
Alex2c8b8802022-10-20 14:07:15 -050022 echo " "
Alexc85212b2022-11-08 12:27:01 -060023 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 -050024else
25 echo "# Public network not set: TEMPEST_CUSTOM_PUBLIC_NET=${TEMPEST_CUSTOM_PUBLIC_NET}"
26 exit 1
27fi