mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
bind: Add functional tests
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
6cfd5774f0
commit
a043063ee2
4 files changed
+115
-1
No files matched your search
@@ -26,7 +26,7 @@ from support import config
|
||||
from .service import wait_for_page_update
|
||||
|
||||
sys_modules = [
|
||||
'avahi', 'backups', 'cockpit', 'config', 'datetime', 'diagnostics',
|
||||
'avahi', 'backups', 'bind', 'cockpit', 'config', 'datetime', 'diagnostics',
|
||||
'dynamicdns', 'firewall', 'letsencrypt', 'monkeysphere', 'names',
|
||||
'networks', 'pagekite', 'power', 'snapshot', 'upgrades', 'users'
|
||||
]
|
||||
|
||||
@@ -228,3 +228,33 @@ def pagekite_get_configuration(browser):
|
||||
int(browser.find_by_name('pagekite-server_port').value),
|
||||
browser.find_by_name('pagekite-kite_name').value,
|
||||
browser.find_by_name('pagekite-kite_secret').value)
|
||||
|
||||
|
||||
def bind_set_forwarders(browser, forwarders):
|
||||
"""Set the forwarders list (space separated) in bind configuration."""
|
||||
nav_to_module(browser, 'bind')
|
||||
browser.fill('forwarders', forwarders)
|
||||
submit(browser, form_class='form-configuration')
|
||||
|
||||
|
||||
def bind_get_forwarders(browser):
|
||||
"""Return the forwarders list (space separated) in bind configuration."""
|
||||
nav_to_module(browser, 'bind')
|
||||
return browser.find_by_name('forwarders').first.value
|
||||
|
||||
|
||||
def bind_enable_dnssec(browser, enable):
|
||||
"""Enable/disable DNSSEC in bind configuration."""
|
||||
nav_to_module(browser, 'bind')
|
||||
if enable:
|
||||
browser.check('enable_dnssec')
|
||||
else:
|
||||
browser.uncheck('enable_dnssec')
|
||||
|
||||
submit(browser, form_class='form-configuration')
|
||||
|
||||
|
||||
def bind_get_dnssec(browser):
|
||||
"""Return whether DNSSEC is enabled/disabled in bind configuration."""
|
||||
nav_to_module(browser, 'bind')
|
||||
return browser.find_by_name('enable_dnssec').first.checked
|
||||
Reference in new issue
Block a user