mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
ssh: tests: functional: Keep service enabled after tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
2dfa8abeca
commit
b140a8104f
@ -14,6 +14,15 @@ class TestSshApp(BaseAppTests):
|
|||||||
app_name = 'ssh'
|
app_name = 'ssh'
|
||||||
has_service = True
|
has_service = True
|
||||||
has_web = False
|
has_web = False
|
||||||
|
disable_after_tests = False
|
||||||
|
|
||||||
# TODO: Improve test_backup_restore to actually check that earlier
|
# TODO: Improve test_backup_restore to actually check that earlier
|
||||||
# ssh certificate has been restored.
|
# ssh certificate has been restored.
|
||||||
|
|
||||||
|
def test_enable_disable(self, session_browser):
|
||||||
|
"""Skip test for enabling and disabling the app."""
|
||||||
|
pytest.skip('Avoid restarting SSH server')
|
||||||
|
|
||||||
|
def test_backup_restore(self, session_browser):
|
||||||
|
"""Skip test for backup and restore operations."""
|
||||||
|
pytest.skip('Avoid restarting SSH server')
|
||||||
|
|||||||
@ -609,6 +609,7 @@ class BaseAppTests:
|
|||||||
has_web = True
|
has_web = True
|
||||||
check_diagnostics = True
|
check_diagnostics = True
|
||||||
diagnostics_delay = 0
|
diagnostics_delay = 0
|
||||||
|
disable_after_tests = True
|
||||||
|
|
||||||
def assert_app_running(self, session_browser):
|
def assert_app_running(self, session_browser):
|
||||||
"""Assert that the app is running."""
|
"""Assert that the app is running."""
|
||||||
@ -634,7 +635,8 @@ class BaseAppTests:
|
|||||||
app_enable(session_browser, self.app_name)
|
app_enable(session_browser, self.app_name)
|
||||||
yield
|
yield
|
||||||
login(session_browser)
|
login(session_browser)
|
||||||
app_disable(session_browser, self.app_name)
|
if self.disable_after_tests:
|
||||||
|
app_disable(session_browser, self.app_name)
|
||||||
|
|
||||||
def test_enable_disable(self, session_browser):
|
def test_enable_disable(self, session_browser):
|
||||||
"""Test enabling and disabling the app."""
|
"""Test enabling and disabling the app."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user