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:
Sunil Mohan Adapa 2022-08-11 12:00:35 -07:00 committed by James Valleroy
parent 2dfa8abeca
commit b140a8104f
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 12 additions and 1 deletions

View File

@ -14,6 +14,15 @@ class TestSshApp(BaseAppTests):
app_name = 'ssh'
has_service = True
has_web = False
disable_after_tests = False
# TODO: Improve test_backup_restore to actually check that earlier
# 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')

View File

@ -609,6 +609,7 @@ class BaseAppTests:
has_web = True
check_diagnostics = True
diagnostics_delay = 0
disable_after_tests = True
def assert_app_running(self, session_browser):
"""Assert that the app is running."""
@ -634,7 +635,8 @@ class BaseAppTests:
app_enable(session_browser, self.app_name)
yield
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):
"""Test enabling and disabling the app."""