-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path20-verify-superset.sh
executable file
·83 lines (62 loc) · 1.72 KB
/
20-verify-superset.sh
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
set -uo pipefail
shopt -s lastpipe
source "./utils.sh"
# wait for superset resource to appear
for (( i=1; i<=30; i++ ))
do
echo "Waiting for superset StatefulSet to appear ..."
if eval kubectl get statefulset superset-node-default; then
break
fi
sleep 3
done
echo "Waiting for superset StatefulSet to become ready ..."
kubectl rollout status --watch --timeout=5m statefulset/superset-node-default
sleep 5
echo "Stackable services:"
stackablectl svc list
echo "Checking if login is working correctly ..."
username="admin"
password="adminadmin"
if superset_login "db" "$username" "$password"; then
echo "Login successful with $username:$password"
else
echo "Login not successful. Exiting."
exit 1
fi
echo "11111111111111111111111111111111111111111"
sleep 300
if superset_login "db" "$username" "$password"; then
echo "Login successful with $username:$password"
else
echo "Login not successful. Exiting."
exit 1
fi
echo "2222222222222222222222222222222222222222222"
sleep 300
if superset_login "db" "$username" "$password"; then
echo "Login successful with $username:$password"
else
echo "Login not successful. Exiting."
exit 1
fi
echo "33333333333333333333333333333333"
sleep 300
if superset_login "db" "$username" "$password"; then
echo "Login successful with $username:$password"
else
echo "Login not successful. Exiting."
exit 1
fi
echo "FINISHED FINISHED FINISHED FINISHED"
sleep 30000
username="admin"
password="wrongpassword"
if ! superset_login "db" "$username" "$password"; then
echo "Login un-successful with $username:$password as expected"
else
echo "Login with $username:$password successful but should not be! Exiting."
exit 1
fi
echo "Login is working correctly"