mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
config, names: Move setting hostname from config to names
Tests: - Config app description is as expected. - Config form does not show hostname anymore. - Submitting the form with changes works. - Names app has correct link for configuring Local Domain Name. Clicking it takes to page for setting hostname. - Avahi shows the current .local domain correctly in Names app. - Change hostname form shows correct value for current hostname. - Change hostname form sets the value for hostname properly. - Page title is correct. - Validations works. - Pre/post hostname change signals are sent properly - Success message as shown expected - hostnamectl shows the set domain - If domain name is not set, downloaded OpenVPN profile shows hostname. - Unit tests work. - Functional tests on names/config/avahi apps work. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
1 parent
dceee56684
commit
8c69858d43
16 files changed
+173
-120
No files matched your search
@@ -512,15 +512,18 @@ def running_inside_container():
|
||||
return result.stdout.decode('utf-8').strip().lower() != 'none'
|
||||
|
||||
|
||||
#############################
|
||||
# System -> Names utilities #
|
||||
#############################
|
||||
def set_hostname(browser, hostname):
|
||||
visit(browser, '/plinth/sys/names/hostname/')
|
||||
browser.find_by_id('id_hostname-hostname').fill(hostname)
|
||||
submit(browser, form_class='form-hostname')
|
||||
|
||||
|
||||
##############################
|
||||
# System -> Config utilities #
|
||||
##############################
|
||||
def set_hostname(browser, hostname):
|
||||
nav_to_module(browser, 'config')
|
||||
browser.find_by_id('id_hostname').fill(hostname)
|
||||
submit(browser, form_class='form-configuration')
|
||||
|
||||
|
||||
def set_advanced_mode(browser, mode):
|
||||
nav_to_module(browser, 'config')
|
||||
advanced_mode = browser.find_by_id('id_advanced_mode')
|
||||
|
||||
Reference in new issue
Block a user