Commit Graph
12 Commits
Author SHA1 Message Date
evangelostsak c2eb54c39c refactor(wireguard): reduce test.sh to the flow and its expectations 2026-10-18 20:36:26 +02:00
evangelostsak fc4a2da70e test(wireguard): start and remove the test hosts through compose 2026-10-18 13:56:07 +02:00
evangelostsak 24a07325f8 test(wireguard): run the mesh playbook from playbooks/ 2026-10-18 01:01:09 +02:00
evangelostsak fb24984ade refactor: drop rationale and narration from roles/svc-net-wireguard/files/test/test.sh 2026-10-16 19:10:00 +02:00
evangelostsak a709d237c5 test(wireguard): probe the meshes with SSH, bulk data and the cryptokey table
A ping proved the tunnels answer, not that a session lands on the right host
or that full-size TCP segments cross them. Each pair sharing a mesh now also
opens an SSH session to the peer's mesh address and must land on that peer,
then pulls 8 MiB through it and compares the checksum with the one taken at
the source. Each pair that shares no mesh must fail the SSH connection itself,
never on authentication, since every host trusts every other host's key.
WireGuard must refuse a packet forced into a mesh that holds no peer for it
(Required key not available), so the isolation is shown to come from the
cryptokey table rather than from a missing route. The two hosts must still
reach each other on the underlay, so the isolation is the mesh's doing.

The SSH options are the platform's own, mesh_ssh_args over the repository's
ssh_args, the ones the swarm transport switches Ansible onto; the addresses
come from mesh_address. Every probe runs through one check helper, so a probe
is a predicate rather than another copy of the pass and fail bookkeeping.

Verified in the dev stack: all 20 checks passed, and a mutant that inverted
every expectation (unreachable pairs, a wrong identity, a different file, a
denied key, the peer's own address forced through the cryptokey check) failed
all 9 of its checks.
2026-10-16 13:55:11 +02:00
evangelostsak a9e7271b9e test(wireguard): three throwaway hosts in two full meshes
Starts three bare Debian hosts from one inventory, puts host II into both
meshes through a role's networks.meshes, writes the mesh with the CLI, deploys
playbook-mesh.yml onto them, which installs WireGuard there, and asserts that
I and II reach each other, that II and III reach each other, and that I and
III do not.

Verified in a local compose deploy of svc-db-redis with svc-net-wireguard:
all six reachability assertions passed and every throwaway host ended with
failed=0.
2026-10-16 03:40:16 +02:00
evangelostsak c40d7aa6da chore(wireguard): remove the role and its references to start fresh
The consolidated svc-net-wireguard role, its requirement document and the three
references that only existed to support it go away together: the lint ignore for
a load failure inside its tasks, the requirements index entry, and the tunnel
subnet variable nothing else consumed.

Left in place deliberately: the WireGuard mention in the svc-net category
description, which is upstream prose about networking roles in general rather
than anything this role owned.
2026-09-18 00:30:39 +02:00
evangelostsak 6524afc62a chore(svc-net-wireguard): trim comments, drop dead harness vars
Tighten verbose comments to one line each (no-long-comments) and remove
leftovers from the old mesh design: unused NODE_OCTET / WG_PORT and the
dead WIREGUARD_IMAGE/VERSION env asserts.
2026-07-09 13:47:46 +02:00
evangelostsak 2f4ea68d14 test(svc-net-wireguard): rewrite e2e as deploy-driven full mesh
Replaces the linuxserver-image harness with a deploy-driven one: 01_bootstrap (6 empty containers + make install + DinD), 02_registration (per-host dedicated inventory via 'inventory provision' + full-mesh wg0.conf), 03_handshake ('deploy dedicated --id svc-net-wireguard' per host + all-pairs check). Adds the role's inventory-driven config path (mounts a per-host wg0.conf). NAT-flavor coverage follows once the mesh is green.
2026-07-09 13:47:46 +02:00
evangelostsak f830424d19 test(svc-net-wireguard): add client-mode + NAT masquerade e2e stage
nat.sh brings up a WireGuard client (MTU 1400) behind a masquerading gateway and verifies it reaches an upstream host only via the masquerade, plus rule present/absent assertions. Wired into test.sh after mesh.sh.
2026-07-09 13:47:46 +02:00
evangelostsak f99a0f87d9 style(svc-net-wireguard): trim verbose comments from harness and vars 2026-07-09 13:47:45 +02:00
evangelostsak c6b20352dc refactor(svc-net-wireguard): move e2e harness to the test-e2e-cli contract
tests/ -> files/test/ (test.sh/local.sh/external.sh/mesh.sh) + templates/test.env.j2 (the test-e2e-cli discovery marker). README and requirement 026 updated to the adopted contract.
2026-07-09 13:47:45 +02:00