From c714833d7e04d371a76ba68e5af06962970730d6 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sun, 31 Jan 2021 09:36:49 -0500 Subject: [PATCH] tests: Update functional tests default config - Set default SSH and Samba port for testing a container. - Set default URL for running functional tests from within container. - Update instructions. Closes: #2015. Signed-off-by: James Valleroy Reviewed-by: Fioddor Superconcentrado --- HACKING.md | 6 +++--- plinth/tests/functional/config.ini | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HACKING.md b/HACKING.md index f88579681..4ad6b9301 100644 --- a/HACKING.md +++ b/HACKING.md @@ -425,10 +425,10 @@ tests will create the required user using FreedomBox's first boot process. #### Running Functional Tests -**When inside a container/VM you will need to target the guest** - +If you are testing a VM using NAT, and running the tests on the host, +then you need to specify the URL and ports: ```bash -guest$ export FREEDOMBOX_URL=https://localhost FREEDOMBOX_SSH_PORT=22 FREEDOMBOX_SAMBA_PORT=445 +host$ export FREEDOMBOX_URL=https://localhost:4430 FREEDOMBOX_SSH_PORT=2222 FREEDOMBOX_SAMBA_PORT=4450 ``` You will be running `py.test-3`. diff --git a/plinth/tests/functional/config.ini b/plinth/tests/functional/config.ini index 8f87c8ae3..f5916fe75 100644 --- a/plinth/tests/functional/config.ini +++ b/plinth/tests/functional/config.ini @@ -1,6 +1,6 @@ [DEFAULT] -url = https://localhost:4430 +url = https://localhost username = tester password = testingtesting -ssh_port = 2222 -samba_port = 4450 +ssh_port = 22 +samba_port = 445