mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
mumble: Convert functional tests to non-BDD python format
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
953d574692
commit
6c84e50040
@ -1,28 +0,0 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
|
|
||||||
@apps @mumble
|
|
||||||
Feature: Mumble Voice Chat
|
|
||||||
Run Mumble voice chat server.
|
|
||||||
|
|
||||||
Background:
|
|
||||||
Given I'm a logged in user
|
|
||||||
Given the mumble application is installed
|
|
||||||
|
|
||||||
Scenario: Enable mumble application
|
|
||||||
Given the mumble application is disabled
|
|
||||||
When I enable the mumble application
|
|
||||||
Then the mumble service should be running
|
|
||||||
|
|
||||||
# TODO: Improve this to actually check that data such as rooms, identity or
|
|
||||||
# certificates are restored.
|
|
||||||
@backups
|
|
||||||
Scenario: Backup and restore mumble
|
|
||||||
Given the mumble application is enabled
|
|
||||||
When I create a backup of the mumble app data with name test_mumble
|
|
||||||
And I restore the mumble app data backup with name test_mumble
|
|
||||||
Then the mumble service should be running
|
|
||||||
|
|
||||||
Scenario: Disable mumble application
|
|
||||||
Given the mumble application is enabled
|
|
||||||
When I disable the mumble application
|
|
||||||
Then the mumble service should not be running
|
|
||||||
@ -3,6 +3,37 @@
|
|||||||
Functional, browser based tests for mumble app.
|
Functional, browser based tests for mumble app.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pytest_bdd import scenarios
|
import pytest
|
||||||
|
from plinth.tests import functional
|
||||||
|
|
||||||
scenarios('mumble.feature')
|
pytestmark = [pytest.mark.apps, pytest.mark.mumble]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope='module', autouse=True)
|
||||||
|
def fixture_background(session_browser):
|
||||||
|
"""Login and install the app."""
|
||||||
|
functional.login(session_browser)
|
||||||
|
functional.install(session_browser, 'mumble')
|
||||||
|
yield
|
||||||
|
functional.app_disable(session_browser, 'mumble')
|
||||||
|
|
||||||
|
|
||||||
|
def test_enable_disable(session_browser):
|
||||||
|
"""Test enabling the app."""
|
||||||
|
functional.app_disable(session_browser, 'mumble')
|
||||||
|
|
||||||
|
functional.app_enable(session_browser, 'mumble')
|
||||||
|
assert functional.service_is_running(session_browser, 'mumble')
|
||||||
|
|
||||||
|
functional.app_disable(session_browser, 'mumble')
|
||||||
|
assert functional.service_is_not_running(session_browser, 'mumble')
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: Improve this to actually check that data such as rooms, identity or
|
||||||
|
# certificates are restored.
|
||||||
|
def test_backup_restore(session_browser):
|
||||||
|
"""Test backup and restore."""
|
||||||
|
functional.app_enable(session_browser, 'mumble')
|
||||||
|
functional.backup_create(session_browser, 'mumble', 'test_mumble')
|
||||||
|
functional.backup_restore(session_browser, 'mumble', 'test_mumble')
|
||||||
|
assert functional.service_is_running(session_browser, 'mumble')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user