Compare commits
No commits in common. "0babff823a9f25d1ca89d17a6abf69ee37a141cb" and "463385399094aebdbd89a8de46ff8279d49abb34" have entirely different histories.
0babff823a
...
4633853990
8 changed files with 38 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,4 +6,3 @@ __pycache__/
|
||||||
logs/
|
logs/
|
||||||
.idea/
|
.idea/
|
||||||
.coverage
|
.coverage
|
||||||
docker/mock-clients/
|
|
||||||
6
Makefile
6
Makefile
|
|
@ -67,9 +67,9 @@ test-e2e:
|
||||||
uv run pytest tests/e2e/ -v --tb=short
|
uv run pytest tests/e2e/ -v --tb=short
|
||||||
|
|
||||||
test-e2e-headed:
|
test-e2e-headed:
|
||||||
uv run pytest tests/e2e/ --headed --slowmo 100 -v --tb=short
|
uv run pytest tests/e2e/ --headed --slowmo 300 -v --tb=short
|
||||||
|
|
||||||
test: test-stack-up test-unit test-e2e
|
test: test-unit test-e2e
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Integration test stack (real WireGuard + mock clients + VictoriaMetrics)
|
# Integration test stack (real WireGuard + mock clients + VictoriaMetrics)
|
||||||
|
|
@ -85,7 +85,7 @@ test-stack-up: test-stack-seed
|
||||||
|
|
||||||
test-stack-seed:
|
test-stack-seed:
|
||||||
@echo "[*] Starting infrastructure..."
|
@echo "[*] Starting infrastructure..."
|
||||||
docker compose up -d postgres valkey victoriametrics mock-oidc mock-saml
|
docker compose up -d postgres valkey victoriametrics
|
||||||
@echo "[*] Waiting for Postgres..."
|
@echo "[*] Waiting for Postgres..."
|
||||||
@until docker compose exec -T postgres pg_isready -U wiregui > /dev/null 2>&1; do sleep 1; done
|
@until docker compose exec -T postgres pg_isready -U wiregui > /dev/null 2>&1; do sleep 1; done
|
||||||
@echo "[*] Running migrations..."
|
@echo "[*] Running migrations..."
|
||||||
|
|
|
||||||
9
docker/mock-clients/configs/client1.conf
Normal file
9
docker/mock-clients/configs/client1.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[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
|
||||||
9
docker/mock-clients/configs/client2.conf
Normal file
9
docker/mock-clients/configs/client2.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[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
|
||||||
9
docker/mock-clients/configs/client3.conf
Normal file
9
docker/mock-clients/configs/client3.conf
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Interface]
|
||||||
|
PrivateKey = EIvEgJvaZYF9g4iIyYaevV3GaEKoB4AXa6Z1M1b5qXQ=
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
PublicKey = HdbPtoka8YH5EO0AE/c7qgpn+C+KJ3jb4PeKGwn38QU=
|
||||||
|
PresharedKey = 0QBrDLFpiqXZWYMeQ1uXm5pujSKrwmqx5VC2D0ETTAo=
|
||||||
|
Endpoint = wiregui:51820
|
||||||
|
AllowedIPs = 10.3.2.0/24
|
||||||
|
PersistentKeepalive = 5
|
||||||
6
docker/mock-clients/configs/clients.env
Normal file
6
docker/mock-clients/configs/clients.env
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
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
|
||||||
|
|
@ -50,7 +50,7 @@ class Settings(BaseSettings):
|
||||||
idp_config_file: str | None = None # path to YAML file with IdP definitions
|
idp_config_file: str | None = None # path to YAML file with IdP definitions
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_to_file: bool = False # write timestamped log file to logs/ directory
|
log_to_file: bool = True # write timestamped log file to logs/ directory
|
||||||
|
|
||||||
# App
|
# App
|
||||||
host: str = "0.0.0.0"
|
host: str = "0.0.0.0"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ def setup_logging(log_to_file: bool = False) -> None:
|
||||||
)
|
)
|
||||||
|
|
||||||
if log_to_file:
|
if log_to_file:
|
||||||
timestamp = datetime.now().strftime("%Y%m%d")
|
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||||
logger.add(
|
logger.add(
|
||||||
f"logs/wiregui_{timestamp}.log",
|
f"logs/wiregui_{timestamp}.log",
|
||||||
format="{time:YYYY-MM-DD HH:mm:ss.SSS} | {level:<7} | {name}:{function}:{line} - {message}",
|
format="{time:YYYY-MM-DD HH:mm:ss.SSS} | {level:<7} | {name}:{function}:{line} - {message}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue