forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-gui
executable file
·48 lines (38 loc) · 997 Bytes
/
test-gui
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
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
set -euo pipefail
source ./contrib/environment.sh
if [ -z "$BRIDGE_K8S_AUTH_BEARER_TOKEN" ];
then
echo "no BRIDGE_K8S_AUTH_BEARER_TOKEN!?"
exit 1
fi
if [ -z "$BRIDGE_K8S_MODE_OFF_CLUSTER_ENDPOINT" ];
then
echo "no BRIDGE_K8S_MODE_OFF_CLUSTER_ENDPOINT!?"
exit 1
fi
if [ -z "$TECTONIC_LICENSE" ];
then
echo "no TECTONIC_LICENSE!?"
exit 1
fi
echo "$TECTONIC_LICENSE" > license.txt
# TODO: eventually test auth
./bin/bridge \
--k8s-mode="off-cluster" \
--user-auth="disabled" \
--k8s-mode-off-cluster-skip-verify-tls=true \
--k8s-auth="bearer-token" \
--k8s-mode-off-cluster-endpoint="$BRIDGE_K8S_MODE_OFF_CLUSTER_ENDPOINT" \
--k8s-auth-bearer-token="$BRIDGE_K8S_AUTH_BEARER_TOKEN" \
--license-file=license.txt &
echo $! > bridge.pid
cd frontend
./node_modules/.bin/webdriver-manager update --quiet > /dev/null 2>&1
if [ $# -gt 0 ] && [ -n "$1" ];
then
yarn run test-suite --suite "$1"
else
yarn run test-gui
fi
kill "$(cat ../bridge.pid)"