From 897fac08bc924d8b75e17c2bf5404cc085faf76b Mon Sep 17 00:00:00 2001 From: Stefano Bertelli Date: Wed, 1 Apr 2026 00:33:16 -0500 Subject: [PATCH 1/3] chore: logging defaults not to file chore: small improvements in Makefile --- Makefile | 6 +++--- wiregui/config.py | 2 +- wiregui/log_config.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7872750..0c615d7 100644 --- a/Makefile +++ b/Makefile @@ -67,9 +67,9 @@ test-e2e: uv run pytest tests/e2e/ -v --tb=short test-e2e-headed: - uv run pytest tests/e2e/ --headed --slowmo 300 -v --tb=short + uv run pytest tests/e2e/ --headed --slowmo 100 -v --tb=short -test: test-unit test-e2e +test: test-stack-up test-unit test-e2e # --------------------------------------------------------------------------- # Integration test stack (real WireGuard + mock clients + VictoriaMetrics) @@ -85,7 +85,7 @@ test-stack-up: test-stack-seed test-stack-seed: @echo "[*] Starting infrastructure..." - docker compose up -d postgres valkey victoriametrics + docker compose up -d postgres valkey victoriametrics mock-oidc mock-saml @echo "[*] Waiting for Postgres..." @until docker compose exec -T postgres pg_isready -U wiregui > /dev/null 2>&1; do sleep 1; done @echo "[*] Running migrations..." diff --git a/wiregui/config.py b/wiregui/config.py index ae8220b..498a5c4 100644 --- a/wiregui/config.py +++ b/wiregui/config.py @@ -50,7 +50,7 @@ class Settings(BaseSettings): idp_config_file: str | None = None # path to YAML file with IdP definitions # Logging - log_to_file: bool = True # write timestamped log file to logs/ directory + log_to_file: bool = False # write timestamped log file to logs/ directory # App host: str = "0.0.0.0" diff --git a/wiregui/log_config.py b/wiregui/log_config.py index d0be111..2e0b610 100644 --- a/wiregui/log_config.py +++ b/wiregui/log_config.py @@ -17,7 +17,7 @@ def setup_logging(log_to_file: bool = False) -> None: ) if log_to_file: - timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") + timestamp = datetime.now().strftime("%Y%m%d") logger.add( f"logs/wiregui_{timestamp}.log", format="{time:YYYY-MM-DD HH:mm:ss.SSS} | {level:<7} | {name}:{function}:{line} - {message}", From 1af3773656ed9abb84d46d557ac226882762008d Mon Sep 17 00:00:00 2001 From: Stefano Bertelli Date: Wed, 1 Apr 2026 00:34:02 -0500 Subject: [PATCH 2/3] fix: gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f59019a..5c69778 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ __pycache__/ logs/ .idea/ .coverage +docker/mock-clients/ \ No newline at end of file From 0babff823a9f25d1ca89d17a6abf69ee37a141cb Mon Sep 17 00:00:00 2001 From: Stefano Bertelli Date: Wed, 1 Apr 2026 00:34:12 -0500 Subject: [PATCH 3/3] fix: cleanup --- docker/mock-clients/configs/client1.conf | 9 --------- docker/mock-clients/configs/client2.conf | 9 --------- docker/mock-clients/configs/client3.conf | 9 --------- docker/mock-clients/configs/clients.env | 6 ------ 4 files changed, 33 deletions(-) delete mode 100644 docker/mock-clients/configs/client1.conf delete mode 100644 docker/mock-clients/configs/client2.conf delete mode 100644 docker/mock-clients/configs/client3.conf delete mode 100644 docker/mock-clients/configs/clients.env diff --git a/docker/mock-clients/configs/client1.conf b/docker/mock-clients/configs/client1.conf deleted file mode 100644 index 9e2d4e7..0000000 --- a/docker/mock-clients/configs/client1.conf +++ /dev/null @@ -1,9 +0,0 @@ -[Interface] -PrivateKey = SALYR6RYKISfffOs7+PeQkiI7M5r73qwXYn4fo5Bjl4= - -[Peer] -PublicKey = HdbPtoka8YH5EO0AE/c7qgpn+C+KJ3jb4PeKGwn38QU= -PresharedKey = NhqmMbL8ou6QfBREN8VmS/FX4aaYKwX+yvOESwVetTg= -Endpoint = wiregui:51820 -AllowedIPs = 10.3.2.0/24 -PersistentKeepalive = 5 diff --git a/docker/mock-clients/configs/client2.conf b/docker/mock-clients/configs/client2.conf deleted file mode 100644 index 918b1ff..0000000 --- a/docker/mock-clients/configs/client2.conf +++ /dev/null @@ -1,9 +0,0 @@ -[Interface] -PrivateKey = YLu3dTKCT2yKaRHWAbhkV5iDO3uz9Ay+I8elcU9c6mE= - -[Peer] -PublicKey = HdbPtoka8YH5EO0AE/c7qgpn+C+KJ3jb4PeKGwn38QU= -PresharedKey = OEsRd6g/+b6Z5nhraXoC3cOAVCR0EAloKKKdeW/PKgk= -Endpoint = wiregui:51820 -AllowedIPs = 10.3.2.0/24 -PersistentKeepalive = 5 diff --git a/docker/mock-clients/configs/client3.conf b/docker/mock-clients/configs/client3.conf deleted file mode 100644 index 3f048f1..0000000 --- a/docker/mock-clients/configs/client3.conf +++ /dev/null @@ -1,9 +0,0 @@ -[Interface] -PrivateKey = EIvEgJvaZYF9g4iIyYaevV3GaEKoB4AXa6Z1M1b5qXQ= - -[Peer] -PublicKey = HdbPtoka8YH5EO0AE/c7qgpn+C+KJ3jb4PeKGwn38QU= -PresharedKey = 0QBrDLFpiqXZWYMeQ1uXm5pujSKrwmqx5VC2D0ETTAo= -Endpoint = wiregui:51820 -AllowedIPs = 10.3.2.0/24 -PersistentKeepalive = 5 diff --git a/docker/mock-clients/configs/clients.env b/docker/mock-clients/configs/clients.env deleted file mode 100644 index e2abfd0..0000000 --- a/docker/mock-clients/configs/clients.env +++ /dev/null @@ -1,6 +0,0 @@ -CLIENT1_IP=10.3.2.101 -CLIENT1_PEERS=10.3.2.102 10.3.2.103 -CLIENT2_IP=10.3.2.102 -CLIENT2_PEERS=10.3.2.101 10.3.2.103 -CLIENT3_IP=10.3.2.103 -CLIENT3_PEERS=10.3.2.101 10.3.2.102