Skip to content

Commit

Permalink
Allow to pass a target test (#9542)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirs authored Feb 8, 2023
1 parent 60d9716 commit 6f713b7
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions test/test-lua.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,23 @@ set -o pipefail

BUSTED_ARGS="-v --pattern=_test"

resty \
-I ./rootfs/etc/nginx/lua \
--shdict "configuration_data 5M" \
--shdict "certificate_data 16M" \
--shdict "certificate_servers 1M" \
--shdict "ocsp_response_cache 1M" \
--shdict "balancer_ewma 1M" \
--shdict "balancer_ewma_last_touched_at 1M" \
--shdict "balancer_ewma_locks 512k" \
--shdict "global_throttle_cache 5M" \
./rootfs/etc/nginx/lua/test/run.lua ${BUSTED_ARGS} ./rootfs/etc/nginx/lua/test/ ./rootfs/etc/nginx/lua/plugins/**/test
SHDICT_ARGS=(
"-I" "./rootfs/etc/nginx/lua"
"--shdict" "configuration_data 5M"
"--shdict" "certificate_data 16M"
"--shdict" "certificate_servers 1M"
"--shdict" "ocsp_response_cache 1M"
"--shdict" "balancer_ewma 1M"
"--shdict" "quota_tracker 1M"
"--shdict" "high_throughput_tracker 1M"
"--shdict" "balancer_ewma_last_touched_at 1M"
"--shdict" "balancer_ewma_locks 512k"
"--shdict" "global_throttle_cache 5M"
"./rootfs/etc/nginx/lua/test/run.lua"
)

if [ $# -eq 0 ]; then
resty "${SHDICT_ARGS[@]}" ./rootfs/etc/nginx/lua/test/ ./rootfs/etc/nginx/lua/plugins/**/test
else
resty "${SHDICT_ARGS[@]}" $@
fi

0 comments on commit 6f713b7

Please sign in to comment.