| 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 | 
| Ievgeniia Zadorozhna | bbd211a | 2024-01-25 00:59:58 +0100 | [diff] [blame] | 11 |  | 
 | 12 | echo "# Copying mos-kubeconfig.yaml and node.key from /artifacts/envs/" | 
 | 13 | kubectl cp /artifacts/envs/mos-kubeconfig.yaml qa-space/toolset:/opt/mos-spt/mos-kubeconfig.yaml | 
 | 14 | kubectl cp /artifacts/envs/node.key qa-space/toolset:/opt/mos-spt/node.key | 
 | 15 |  | 
| Alex | 2c8b880 | 2022-10-20 14:07:15 -0500 | [diff] [blame] | 16 | admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value") | 
 | 17 | if [ ! -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 | 
| Alex | c85212b | 2022-11-08 12:27:01 -0600 | [diff] [blame] | 20 |     echo " " | 
 | 21 |     echo "# Running spt checks" | 
| Alex | 2c8b880 | 2022-10-20 14:07:15 -0500 | [diff] [blame] | 22 | 	echo " " | 
| Alex | c85212b | 2022-11-08 12:27:01 -0600 | [diff] [blame] | 23 | 	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/" | 
| Alex | 2c8b880 | 2022-10-20 14:07:15 -0500 | [diff] [blame] | 24 | else | 
 | 25 |         echo "# Public network not set: TEMPEST_CUSTOM_PUBLIC_NET=${TEMPEST_CUSTOM_PUBLIC_NET}" | 
 | 26 | 	exit 1 | 
 | 27 | fi |