Skip to content

Commit

Permalink
Separated the badssl tests from the integration tests so that the nig…
Browse files Browse the repository at this point in the history
…hly tests on github do not always fail
  • Loading branch information
matteocorti committed Oct 25, 2024
1 parent f35afef commit d779005
Show file tree
Hide file tree
Showing 4 changed files with 570 additions and 367 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-10-25 Matteo Corti <[email protected]>

* test/integration_tests.sh: Separated the badssl.com tests as they are often failing (no connection)

2024-10-16 Matteo Corti <[email protected]>

* check_ssl_cert (DEFAULT_REQUIRED_HTTP_HEADERS): removed X-Frame-Options from the list of required headers (is now deprecated)
Expand Down
23 changes: 21 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DIST_FILES=AUTHORS.md COPYING.md ChangeLog INSTALL.md Makefile GNUmakefile NEWS.
YEAR=`date +"%Y"`

# file to be checked for formatting
FORMATTED_FILES=test/unit_tests.sh test/integration_tests.sh ChangeLog INSTALL.md Makefile VERSION $(PLUGIN) $(PLUGIN).spec COPYRIGHT.md ${PLUGIN}.1 .github/workflows/* utils/*.sh check_ssl_cert.completion
FORMATTED_FILES=test/unit_tests.sh test/integration_tests.sh test/badssl_tests.sh ChangeLog INSTALL.md Makefile VERSION $(PLUGIN) $(PLUGIN).spec COPYRIGHT.md ${PLUGIN}.1 .github/workflows/* utils/*.sh check_ssl_cert.completion

# shell scripts (to be checked with ShellCheck)
SCRIPTS=check_ssl_cert test/*.sh utils/*.sh
Expand Down Expand Up @@ -121,7 +121,7 @@ disttest: dist formatting_check shellcheck codespell
./utils/check_documentation.sh
man ./check_ssl_cert.1 > /dev/null

test: formatting_check shellcheck unit_tests integration_tests unit_tests_with_proxy integration_tests_with_proxy
test: formatting_check shellcheck unit_tests integration_tests badssl_tests badssl_tests_with_proxy unit_tests_with_proxy integration_tests_with_proxy

unit_tests:
ifndef SHUNIT
Expand Down Expand Up @@ -161,6 +161,25 @@ else
sleep 1
endif

badssl_tests:
ifndef SHUNIT
@echo "No shUnit2 installed: see README.md"
exit 1
else
( export SHUNIT2=$(SHUNIT) && export LC_ALL=C && cd test && ./badssl_tests.sh )
endif

badssl_tests_with_proxy:
ifndef SHUNIT
@echo "No shUnit2 installed: see README.md"
exit 1
else
./utils/start_proxy.sh ./test/tinyproxy.conf
( export SHUNIT2=$(SHUNIT) && export http_proxy=127.0.0.1:8888 && export LC_ALL=C && cd test && ./badssl_tests.sh )
killall tinyproxy
sleep 1
endif

shellcheck:
ifndef SHELLCHECK
@echo "No shellcheck installed: skipping check"
Expand Down
Loading

0 comments on commit d779005

Please sign in to comment.