Comment 4 for bug 1875471

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

> In the current state in Focal/Groovy, the tests we include in our packages are broken
> for at least python-certbot, python-certbot-apache, and python-certbot-nginx.
> The python-certbot-dns-* packages themselves are working, but I didn't verify whether
> or not the tests are. I can if people think that's important.

I just saw that, when I fixed the tests to actually run at package build time (a problem still present in the 1.3.0-2 packages):
diff --git a/debian/rules b/debian/rules
index c057a16..154080a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,6 +21,6 @@ override_dh_installdocs:
        dh_installdocs -p python3-certbot-nginx

 override_dh_auto_test:
-ifdef (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        python3 setup.py test
 endif

The 0.40.0 tests fail with:

============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /home/ubuntu/git/packages/python-certbot-nginx/python-certbot-nginx
collected 167 items / 1 errors / 166 selected

==================================== ERRORS ====================================
_____________ ERROR collecting certbot_nginx/tests/http_01_test.py _____________
certbot_nginx/tests/http_01_test.py:11: in <module>
    from certbot.plugins import common_test
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:655: in _load_unlocked
    ???
<frozen importlib._bootstrap>:618: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:304: in load_module
    exec(co, mod.__dict__)
/usr/lib/python3/dist-packages/certbot/plugins/common_test.py:26: in <module>
    challenges.TLSSNI01(token=b'token1'), "pending"),
E AttributeError: module 'acme.challenges' has no attribute 'TLSSNI01'

I'll check latest upstream, maybe the diff to fix this test is simple enough to incorporate. I'd like to re-enable the tests at build time if possible.