From 5562d36265edae3099ac38d47e991cb287a62420 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sun, 5 Jul 2026 19:06:41 +0300 Subject: [PATCH] Point etc/hosts to the host VM instead of each container individually b/c we want to be testing web login as close to production as possible --- testing/admin.robot | 4 ++-- testing/keycloak.robot | 2 +- testing/ldap.robot | 4 ++-- testing/password-reset-confirm.robot | 2 +- testing/password-reset-request.robot | 2 +- testing/start_keycloak.sh | 4 ++-- testing/test_docker.sh | 6 +++--- testing/test_upload_file.robot | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/testing/admin.robot b/testing/admin.robot index df03c064..0a6b44b0 100644 --- a/testing/admin.robot +++ b/testing/admin.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2025 Alexander Todorov +# Copyright (c) 2021-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -9,7 +9,7 @@ Library SeleniumLibrary *** Variables *** # "empty" tenant is created during initial_setup -${SERVER} https://empty.testing.example.bg:8443 +${SERVER} https://empty.testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 ${LOGIN_URL} ${SERVER}/accounts/login/ diff --git a/testing/keycloak.robot b/testing/keycloak.robot index 8c2662d6..0008f1fa 100644 --- a/testing/keycloak.robot +++ b/testing/keycloak.robot @@ -7,7 +7,7 @@ Library SeleniumLibrary *** Variables *** -${SERVER} https://testing.example.bg:8443 +${SERVER} https://testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 ${LOGIN_URL} ${SERVER}/login/keycloak diff --git a/testing/ldap.robot b/testing/ldap.robot index 171854a6..fba63120 100644 --- a/testing/ldap.robot +++ b/testing/ldap.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Alexander Todorov +# Copyright (c) 2020-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -7,7 +7,7 @@ Library SeleniumLibrary *** Variables *** -${SERVER} https://testing.example.bg:8443 +${SERVER} https://testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 ${LOGIN_URL} ${SERVER}/accounts/login/ diff --git a/testing/password-reset-confirm.robot b/testing/password-reset-confirm.robot index c9f096d9..8286a637 100644 --- a/testing/password-reset-confirm.robot +++ b/testing/password-reset-confirm.robot @@ -8,7 +8,7 @@ Library SeleniumLibrary *** Variables *** # "empty" tenant is created during initial_setup -${SERVER} https://testing.example.bg:8443 +${SERVER} https://testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 ${DASHBOARD_URL} ${SERVER}/ diff --git a/testing/password-reset-request.robot b/testing/password-reset-request.robot index 6d932c0e..0860dfb3 100644 --- a/testing/password-reset-request.robot +++ b/testing/password-reset-request.robot @@ -8,7 +8,7 @@ Library SeleniumLibrary *** Variables *** # "empty" tenant is created during initial_setup -${SERVER} https://testing.example.bg:8443 +${SERVER} https://testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 ${PWD_RESET_URL} ${SERVER}/accounts/passwordreset/ diff --git a/testing/start_keycloak.sh b/testing/start_keycloak.sh index a6d3aba9..380ec8cb 100755 --- a/testing/start_keycloak.sh +++ b/testing/start_keycloak.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2021-2022 Alexander Todorov +# Copyright (c) 2021-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -34,7 +34,7 @@ docker exec -i keycloak_server \ /opt/jboss/keycloak/bin/kcadm.sh create clients \ -r kiwi -s clientId=kiwitcms-web-app -s enabled=true -s protocol=openid-connect \ -s attributes='{"user.info.response.signature.alg": "RS256"}' \ - -s publicClient=false -s rootUrl=https://testing.example.bg:8443 -o > kc_client.json + -s publicClient=false -s rootUrl=https://testing.example.bg -o > kc_client.json KC_CLIENT_ID=`cat kc_client.json | jq -r '.id'` docker exec -i keycloak_server \ diff --git a/testing/test_docker.sh b/testing/test_docker.sh index cdc3b7fe..f49a140e 100755 --- a/testing/test_docker.sh +++ b/testing/test_docker.sh @@ -7,7 +7,7 @@ . /usr/share/beakerlib/beakerlib.sh -HTTPS="https://testing.example.bg:8443" +HTTPS="https://testing.example.bg" WRK_DIR=$(mktemp -d ./wrk-logs-XXXX) chmod go+rwx "$WRK_DIR" @@ -15,7 +15,7 @@ chmod go+rwx "$WRK_DIR" assert_up_and_running() { sleep 10 # HTTP redirects; HTTPS displays the login page - rlRun -t -c "curl -o- --referer assert_up_and_running http://testing.example.bg:8080/ | grep '301 Moved Permanently'" + rlRun -t -c "curl -o- --referer assert_up_and_running http://testing.example.bg/ | grep '301 Moved Permanently'" rlRun -t -c "curl -k -L -o- --referer assert_up_and_running $HTTPS/ | grep 'Welcome to Kiwi TCMS'" } @@ -51,7 +51,7 @@ rlJournalStart rlRun -t -c "docker compose -f docker-compose.testing up -d" sleep 5 - IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' web) + IP_ADDRESS="127.0.0.1" rlLogInfo "--- testing.example.bg: $IP_ADDRESS --" rlRun -t -c "sudo sh -c \"echo '$IP_ADDRESS testing.example.bg empty.testing.example.bg' >> /etc/hosts\"" diff --git a/testing/test_upload_file.robot b/testing/test_upload_file.robot index ca6456b3..9ee90604 100644 --- a/testing/test_upload_file.robot +++ b/testing/test_upload_file.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2024-2025 Alexander Todorov +# Copyright (c) 2024-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -8,7 +8,7 @@ Library OperatingSystem Library SeleniumLibrary *** Variables *** -${SERVER} https://testing.example.bg:8443 +${SERVER} https://testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 ${LOGIN_URL} ${SERVER}/accounts/login/