Skip to content

Commit 6f713b7

Browse files
authored
Allow to pass a target test (#9542)
1 parent 60d9716 commit 6f713b7

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

test/test-lua.sh

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,23 @@ set -o pipefail
2525

2626
BUSTED_ARGS="-v --pattern=_test"
2727

28-
resty \
29-
-I ./rootfs/etc/nginx/lua \
30-
--shdict "configuration_data 5M" \
31-
--shdict "certificate_data 16M" \
32-
--shdict "certificate_servers 1M" \
33-
--shdict "ocsp_response_cache 1M" \
34-
--shdict "balancer_ewma 1M" \
35-
--shdict "balancer_ewma_last_touched_at 1M" \
36-
--shdict "balancer_ewma_locks 512k" \
37-
--shdict "global_throttle_cache 5M" \
38-
./rootfs/etc/nginx/lua/test/run.lua ${BUSTED_ARGS} ./rootfs/etc/nginx/lua/test/ ./rootfs/etc/nginx/lua/plugins/**/test
28+
SHDICT_ARGS=(
29+
"-I" "./rootfs/etc/nginx/lua"
30+
"--shdict" "configuration_data 5M"
31+
"--shdict" "certificate_data 16M"
32+
"--shdict" "certificate_servers 1M"
33+
"--shdict" "ocsp_response_cache 1M"
34+
"--shdict" "balancer_ewma 1M"
35+
"--shdict" "quota_tracker 1M"
36+
"--shdict" "high_throughput_tracker 1M"
37+
"--shdict" "balancer_ewma_last_touched_at 1M"
38+
"--shdict" "balancer_ewma_locks 512k"
39+
"--shdict" "global_throttle_cache 5M"
40+
"./rootfs/etc/nginx/lua/test/run.lua"
41+
)
42+
43+
if [ $# -eq 0 ]; then
44+
resty "${SHDICT_ARGS[@]}" ./rootfs/etc/nginx/lua/test/ ./rootfs/etc/nginx/lua/plugins/**/test
45+
else
46+
resty "${SHDICT_ARGS[@]}" $@
47+
fi

0 commit comments

Comments
 (0)