Alex | 2c8b880 | 2022-10-20 14:07:15 -0500 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | tenv=mos |
| 3 | . $MY_PROJFOLDER/envs/${tenv}rc |
| 4 | ## |
| 5 | echo "### Checking openstack resources" |
| 6 | status=$(kubectl -n qa-space get pod | grep toolset | tr -s " " | cut -d' ' -f3) |
| 7 | if [ ${status} != "Running" ]; then |
| 8 | echo "# 'toolset' container is not Running" |
| 9 | exit 1 |
| 10 | fi |
| 11 | admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value") |
| 12 | if [ ! -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" |
| 19 | else |
| 20 | echo "# Public network not set: TEMPEST_CUSTOM_PUBLIC_NET=${TEMPEST_CUSTOM_PUBLIC_NET}" |
| 21 | exit 1 |
| 22 | fi |