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:
Sunil Mohan Adapa authored and Veiko Aasa committed 2024-09-19 13:42:47 +03:00
1 parent dceee56684
commit 8c69858d43
16 files changed
+173 -120

No files matched your search

+9 -6
View File
@@ -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')