mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
help: tests: Fix functional test to check for status logs
Fixes: #2171. Since systemd version 250, journalctl does not print the header line '-- Journal begins... --'. To accommodate those changes, read the status log lines accurately and check that they are not empty. Tests: - Run help functional tests on stable, testing and unstable. - Modify code to not print status logs and notice that the functional test fails. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
ec3236d89c
commit
2e2a9db195
@ -28,7 +28,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>{{ data }}</pre>
|
||||
<pre class="status-log">{{ data }}</pre>
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -4,6 +4,7 @@ Functional, browser based tests for help app.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from plinth.tests import functional
|
||||
|
||||
pytestmark = [pytest.mark.system, pytest.mark.essential, pytest.mark.help]
|
||||
@ -32,5 +33,6 @@ def _go_to_status_logs(browser):
|
||||
|
||||
|
||||
def _are_status_logs_shown(browser):
|
||||
return (browser.is_text_present('Logs begin')
|
||||
or browser.is_text_present('Journal begins'))
|
||||
status_log = browser.find_by_css('.status-log').first.text
|
||||
return ('-- No entries --' in status_log
|
||||
or status_log.strip().splitlines())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user