-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·39 lines (28 loc) · 1.35 KB
/
run_tests.sh
File metadata and controls
executable file
·39 lines (28 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/bash
set -euo pipefail
export EXTERNAL_TEST="true"
export PATTERN_NAME="MultiCloudGitops"
export PATTERN_SHORTNAME="mcgitops"
if [ -z "${KUBECONFIG:-}" ]; then
echo "No kubeconfig file set for hub cluster"
exit 1
fi
if [ -z "${KUBECONFIG_EDGE:-}" ]; then
echo "No kubeconfig file set for edge cluster"
exit 1
fi
if [ -z "${INFRA_PROVIDER:-}" ]; then
echo "INFRA_PROVIDER is not defined"
exit 1
fi
if [ -z "${WORKSPACE:-}" ]; then
WORKSPACE=$(mktemp -d)
export WORKSPACE
echo "WORKSPACE not set, using temporary directory: ${WORKSPACE}"
fi
pytest -lv --disable-warnings test_subscription_status_hub.py --kubeconfig "$KUBECONFIG" --junit-xml "$WORKSPACE/test_subscription_status_hub.xml"
pytest -lv --disable-warnings test_subscription_status_edge.py --kubeconfig "$KUBECONFIG_EDGE" --junit-xml "$WORKSPACE/test_subscription_status_edge.xml"
pytest -lv --disable-warnings test_validate_hub_site_components.py --kubeconfig "$KUBECONFIG" --junit-xml "$WORKSPACE/test_validate_hub_site_components.xml"
pytest -lv --disable-warnings test_validate_edge_site_components.py --kubeconfig "$KUBECONFIG_EDGE" --junit-xml "$WORKSPACE/test_validate_edge_site_components.xml"
pytest -lv --disable-warnings test_modify_web_content.py --kubeconfig "$KUBECONFIG" --junit-xml "$WORKSPACE/test_modify_web_content.xml"
python3 create_ci_badge.py