forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse-pytest-backend
More file actions
56 lines (50 loc) · 860 Bytes
/
parse-pytest-backend
File metadata and controls
56 lines (50 loc) · 860 Bytes
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
#!/usr/bin/env bash
PARAMS=""
BACKEND="${BACKEND:-postgres}"
die_backends() {
cat <<EOL
Invalid --backend argument. Available backends:
postgres (default)
bigquery
citus
mssql
mysql
EOL
exit 1
}
while (( "$#" )); do
case "$1" in
--backend)
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
BACKEND=$2
shift 2
fi
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done
# validate backend argument
case "$BACKEND" in
postgres)
;;
bigquery)
source "scripts/bigquery.sh"
verify_bigquery_pytest_env
export HASURA_BIGQUERY_SERVICE_ACCOUNT=$(cat "$HASURA_BIGQUERY_SERVICE_ACCOUNT_FILE")
;;
citus)
;;
mssql)
;;
mysql)
;;
*)
die_backends
;;
esac
# set positional arguments in their proper place
eval set -- "$PARAMS"
export BACKEND