-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.sh
executable file
·30 lines (27 loc) · 1.02 KB
/
run_tests.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
#!/usr/bin/env bash
set -e
export BUSTED_ARGS="-o gtest -v --exclude-tags=flaky,ipv6"
if [ "$KONG_TEST_DATABASE" == "postgres" ]; then
export TEST_CMD="bin/busted $BUSTED_ARGS,cassandra,off"
elif [ "$KONG_TEST_DATABASE" == "cassandra" ]; then
export KONG_TEST_CASSANDRA_KEYSPACE=kong_tests
export KONG_TEST_DB_UPDATE_PROPAGATION=1
export TEST_CMD="bin/busted $BUSTED_ARGS,postgres,off"
else
export TEST_CMD="bin/busted $BUSTED_ARGS,postgres,cassandra,db"
fi
if [ "$TEST_SUITE" == "integration" ]; then
eval "$TEST_CMD" spec/02-integration/
fi
if [ "$TEST_SUITE" == "dbless" ]; then
eval "$TEST_CMD" spec/02-integration/02-cmd \
spec/02-integration/05-proxy \
spec/02-integration/04-admin_api/02-kong_routes_spec.lua \
spec/02-integration/04-admin_api/15-off_spec.lua
fi
if [ "$TEST_SUITE" == "plugins" ]; then
eval "$TEST_CMD" spec/03-plugins/
fi
if [ "$TEST_SUITE" == "pdk" ]; then
TEST_NGINX_RANDOMIZE=1 prove -I. -j$JOBS -r t/01-pdk
fi