mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
report and enforce coverage on integration tests (#4854)
This commit is contained in:
parent
1e6ea09dbd
commit
3cb92d33eb
2 changed files with 28 additions and 15 deletions
|
|
@ -74,6 +74,9 @@ CheckHooks() {
|
|||
rm "$HOOK_TEST"
|
||||
}
|
||||
|
||||
# Cleanup coverage data
|
||||
coverage erase
|
||||
|
||||
# test for regressions of #4719
|
||||
get_num_tmp_files() {
|
||||
ls -1 /tmp | wc -l
|
||||
|
|
@ -244,3 +247,5 @@ if ${CI:-false} || type nginx;
|
|||
then
|
||||
. ./certbot-nginx/tests/boulder-integration.sh
|
||||
fi
|
||||
|
||||
coverage report --fail-under 52 -m
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ store_flags="--config-dir $root/conf --work-dir $root/work"
|
|||
store_flags="$store_flags --logs-dir $root/logs"
|
||||
tls_sni_01_port=5001
|
||||
http_01_port=5002
|
||||
export root store_flags tls_sni_01_port http_01_port
|
||||
sources="acme/,$(ls -dm certbot*/ | tr -d ' \n')"
|
||||
export root store_flags tls_sni_01_port http_01_port sources
|
||||
|
||||
certbot_test () {
|
||||
certbot_test_no_force_renew \
|
||||
|
|
@ -15,18 +16,25 @@ certbot_test () {
|
|||
}
|
||||
|
||||
certbot_test_no_force_renew () {
|
||||
certbot \
|
||||
--server "${SERVER:-http://localhost:4000/directory}" \
|
||||
--no-verify-ssl \
|
||||
--tls-sni-01-port $tls_sni_01_port \
|
||||
--http-01-port $http_01_port \
|
||||
--manual-public-ip-logging-ok \
|
||||
$store_flags \
|
||||
--non-interactive \
|
||||
--no-redirect \
|
||||
--agree-tos \
|
||||
--register-unsafely-without-email \
|
||||
--debug \
|
||||
-vv \
|
||||
"$@"
|
||||
omit_patterns="*/*.egg-info/*,*/dns_common*,*/setup.py,*/test_*,*/tests/*"
|
||||
omit_patterns="$omit_patterns,*_test.py,*_test_*,"
|
||||
omit_patterns="$omit_patterns,certbot-compatibility-test/*,certbot-dns*/"
|
||||
coverage run \
|
||||
--append \
|
||||
--source $sources \
|
||||
--omit $omit_patterns \
|
||||
$(command -v certbot) \
|
||||
--server "${SERVER:-http://localhost:4000/directory}" \
|
||||
--no-verify-ssl \
|
||||
--tls-sni-01-port $tls_sni_01_port \
|
||||
--http-01-port $http_01_port \
|
||||
--manual-public-ip-logging-ok \
|
||||
$store_flags \
|
||||
--non-interactive \
|
||||
--no-redirect \
|
||||
--agree-tos \
|
||||
--register-unsafely-without-email \
|
||||
--debug \
|
||||
-vv \
|
||||
"$@"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue