From b15bca2fe4d91356c984c623b5a6a4492098d599 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 6 Jan 2025 13:52:10 -0800 Subject: [PATCH] nextcloud: tests: functional: Set override domain testing on VM Closes: #2437 - The port part of the override domain was not being set properly. Set this properly. Tests: - Running tests on am VM spawned by the container script works (it does not require port). - Running tests on Vagrant VM has not been tested. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/nextcloud/tests/test_functional.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plinth/modules/nextcloud/tests/test_functional.py b/plinth/modules/nextcloud/tests/test_functional.py index b98bd7f64..6c8833162 100644 --- a/plinth/modules/nextcloud/tests/test_functional.py +++ b/plinth/modules/nextcloud/tests/test_functional.py @@ -23,8 +23,10 @@ class TestNextcloudApp(functional.BaseAppTests): super().install_and_setup(session_browser) functional.app_enable(session_browser, self.app_name) default_url = functional.config['DEFAULT']['url'] - hostname = urllib.parse.urlparse(default_url).hostname - session_browser.find_by_id('id_override_domain').fill(hostname) + parse_result = urllib.parse.urlparse(default_url) + override_domain = parse_result.hostname + override_domain += f':{parse_result.port}' if parse_result.port else '' + session_browser.find_by_id('id_override_domain').fill(override_domain) session_browser.find_by_id('id_admin_password').fill(PASSWORD) functional.submit(session_browser, form_class='form-configuration')