mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
functional_tests: Test repro config backup and restore
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
dd94cae272
commit
6b91058a77
@ -15,7 +15,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
@apps @sip
|
||||
@apps @sip @backups
|
||||
Feature: Repro SIP Server
|
||||
Make audio and video calls.
|
||||
|
||||
@ -32,3 +32,12 @@ Scenario: Disable repro application
|
||||
Given the repro application is enabled
|
||||
When I disable the repro application
|
||||
Then the repro service should not be running
|
||||
|
||||
Scenario: Backup and restore repro
|
||||
Given the repro application is enabled
|
||||
And repro has been configured
|
||||
When I create a backup of the repro app data
|
||||
And I delete the repro configuration
|
||||
And I export the repro app data backup
|
||||
And I restore the repro app data backup
|
||||
Then the repro configuration should be restored
|
||||
|
||||
@ -96,3 +96,18 @@ def mediawiki_delete_main_page(browser):
|
||||
@then('the mediawiki main page should be restored')
|
||||
def mediawiki_verify_text(browser):
|
||||
assert site.mediawiki_has_main_page(browser)
|
||||
|
||||
|
||||
@given('repro has been configured')
|
||||
def repro_configure(browser):
|
||||
site.repro_configure(browser)
|
||||
|
||||
|
||||
@when('I delete the repro configuration')
|
||||
def repro_delete_config(browser):
|
||||
site.repro_delete_config(browser)
|
||||
|
||||
|
||||
@then('the repro configuration should be restored')
|
||||
def repro_is_configured(browser):
|
||||
assert site.repro_is_configured(browser)
|
||||
|
||||
@ -141,3 +141,24 @@ def mediawiki_has_main_page(browser):
|
||||
browser.visit('{}/mediawiki/Main_Page'.format(interface.default_url))
|
||||
content = browser.find_by_id('mw-content-text').first
|
||||
return 'This page has been deleted.' not in content.text
|
||||
|
||||
|
||||
def repro_configure(browser):
|
||||
"""Configure repro."""
|
||||
browser.visit(
|
||||
'{}/repro/domains.html?domainUri=freedombox.local&domainTlsPort='
|
||||
'&action=Add'.format(interface.default_url))
|
||||
|
||||
|
||||
def repro_delete_config(browser):
|
||||
"""Delete the repro config."""
|
||||
browser.visit('{}/repro/domains.html?domainUri=&domainTlsPort='
|
||||
'&action=Remove&remove.freedombox.local=on'.format(
|
||||
interface.default_url))
|
||||
|
||||
|
||||
def repro_is_configured(browser):
|
||||
"""Check whether repro is configured."""
|
||||
browser.visit('{}/repro/domains.html'.format(interface.default_url))
|
||||
remove = browser.find_by_name('remove.freedombox.local')
|
||||
return bool(remove)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user