Skip to content

Commit

Permalink
chore(ci): make the tests skippable
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic committed Nov 15, 2022
1 parent 7d765f4 commit 8922cae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TEST_PROXY_PROTOCOL?=http://
TEST_PROXY_PORT?=8000
TEST_PROXY_URI?=$(TEST_PROXY_PROTOCOL)$(TEST_HOST):$(TEST_PROXY_PORT)
TEST_COMPOSE_PATH="$(PWD)/test/kong-tests-compose.yaml"
SKIP_TESTS?=false

KONG_SOURCE_LOCATION?="$$PWD/../kong/"
EDITION?=`grep EDITION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
Expand Down Expand Up @@ -443,6 +444,7 @@ ifneq ($(RESTY_IMAGE_BASE),src)
TEST_SHA=$(TEST_SHA) \
UPDATE_CACHE_COMMAND="$(UPDATE_CACHE_COMMAND)" \
VERBOSE=$(VERBOSE) \
SKIP_TESTS=$(SKIP_TESTS) \
./test/run_tests.sh && make update-cache-images
endif

Expand Down
4 changes: 4 additions & 0 deletions test/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ if [[ "$RESTY_IMAGE_BASE" == "src" ]]; then
exit 0
fi

if [[ "$SKIP_TEST" == "true" ]]; then
exit 0
fi

# used to skip systemd-based tests that require a /sys/fs/cgroup mount in
# 01-package/run.sh which doesn't exists on Mac OS
if uname -a | grep -qs -i darwin; then
Expand Down

0 comments on commit 8922cae

Please sign in to comment.