Comment 20 for bug 2015420

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

To verify there are no regressions in messages, and that the new option in apt-check works as intended, I have executed the unit test suite for all releases, as it covers the message generation for an exhaustive amount of cases.

On Xenial and Bionic I had to add the data/ folder to the pythonpath, so it could import apt_check and run the unit tests.

On those releases, one unit test is failed. But the test also fails for the version without the patch that fixes this bug, so the behavior is kept. This error probably happens because the test misses a mock to is_esm, which is returning True for Xenial and Bionic. This is a bug.
New tests pass for both releases.

On Jammy:
root@jammy-sut:~# python3 update-notifier-3.192.54.6/tests/test_motd.py
.............................
----------------------------------------------------------------------
Ran 29 tests in 0.021s

OK
root@jammy-sut:~# python3 update-notifier-3.192.54.8/tests/test_motd.py
..................................
----------------------------------------------------------------------
Ran 34 tests in 0.023s

OK

On Focal:
root@focal-sut:~# python3 update-notifier-3.192.30.17/tests/test_motd.py
...............................
----------------------------------------------------------------------
Ran 31 tests in 0.051s

OK
root@focal-sut:~# python3 update-notifier-3.192.30.19/tests/test_motd.py
....................................
----------------------------------------------------------------------
Ran 36 tests in 0.029s

OK

On Bionic:
root@bionic-sut:~# python3 update-notifier-3.192.1.19/tests/test_motd.py
....................F..........
======================================================================
FAIL: test_message_for_distro_that_will_not_go_into_esm_mode (__main__.TestMotd)
----------------------------------------------------------------------
(... Traceback details ...)
----------------------------------------------------------------------
Ran 31 tests in 0.020s

FAILED (failures=1)
root@bionic-sut:~# python3 update-notifier-3.192.1.21/tests/test_motd.py
.......................F............
======================================================================
FAIL: test_message_for_distro_that_will_not_go_into_esm_mode (__main__.TestMotd)
----------------------------------------------------------------------
(... Traceback details ...)
----------------------------------------------------------------------
Ran 36 tests in 0.020s

FAILED (failures=1)

on Xenial:
root@xenial-sut:~# python3 update-notifier-3.168.20/tests/test_motd.py
....................F..........
======================================================================
FAIL: test_message_for_distro_that_will_not_go_into_esm_mode (__main__.TestMotd)
----------------------------------------------------------------------
(... Traceback details ...)
----------------------------------------------------------------------
Ran 31 tests in 0.021s

FAILED (failures=1)
root@xenial-sut:~# python3 update-notifier-3.168.22/tests/test_motd.py
.......................F............
======================================================================
FAIL: test_message_for_distro_that_will_not_go_into_esm_mode (__main__.TestMotd)
----------------------------------------------------------------------
(... Traceback details ...)
----------------------------------------------------------------------
Ran 36 tests in 0.023s

FAILED (failures=1)

This concludes the regression testing, and assures funcionality works in apt-check.