Skip to content

Commit 1b948fd

Browse files
committed
Test to ignore all paths
1 parent fad4c11 commit 1b948fd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,30 @@ else
317317
fi
318318

319319

320+
message " Stop containers "
321+
docker stop http-echo-tests
322+
sleep 5
323+
324+
message " Start container with LOG_IGNORE_PATH (ignore all paths) "
325+
docker run -d --rm -e LOG_IGNORE_PATH=".*" --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:testing
326+
sleep 5
327+
curl -s -k -X POST -d "banana" https://localhost:8443/ > /dev/null
328+
329+
if [ $(docker logs http-echo-tests | wc -l) == 2 ] && \
330+
! [ $(docker logs http-echo-tests | grep banana) ]
331+
then
332+
passed "LOG_IGNORE_PATH ignored all paths"
333+
else
334+
failed "LOG_IGNORE_PATH failed"
335+
docker logs http-echo-tests
336+
exit 1
337+
fi
320338

321339
message " Stop containers "
322340
docker stop http-echo-tests
323341
sleep 5
324342

343+
325344
message " Start container with DISABLE_REQUEST_LOGS "
326345
docker run -d --rm -e DISABLE_REQUEST_LOGS=true --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:testing
327346
sleep 5

0 commit comments

Comments
 (0)