Files
pinpox 3d6f88aeb0 nix/tests: cover per-file TTL in the basic NixOS VM test
Adds three TTL-specific test cases to the basic data-mesher VM test,
plus the two new settings options needed to drive them:

  - sweep_interval: how often the background sweeper runs.
  - clock_skew_tolerance: gossip ingress slack for already-expired
    remote sigs.

The settings were already available via the freeform module type, but
declaring them explicitly makes them discoverable and lets the test
read them as ordinary options.

Test nodes are configured with sweep_interval=2s so the sweeper runs
fast enough to make TTL behaviour observable in seconds rather than
minutes. This is harmless for the existing non-TTL tests because their
files are published with valid_for=0 and the sweeper never touches
them.

Test 11 — Local TTL expiry:
  Upload with --expires-in 5s, confirm the file appears in the GET
  /files listing while live, then verify both the read-path filter
  (listing) and the sweeper (on-disk file) drop it after expiry.

Test 12 — Cluster-wide independent expiry:
  Upload with --expires-in 12s, wait for gossip propagation to a2 and
  a3, then verify each node independently expires the file. No
  tombstone gossip is required — expiry is decided locally from
  signed metadata. The log on every node shows
  "swept expired files removed=1" within the sweep interval.

Test 13 — Heartbeat refresh:
  Upload with --expires-in 6s, sleep 3s, re-upload with the same TTL
  (the heartbeat pattern dm-wireguard-star peers will use). Verify
  the file is still alive 5s after the second upload — past when the
  first TTL would have fired (3 + 5 > 6) but inside the refreshed
  window. Then verify it expires and gets swept after the refreshed
  TTL elapses.

Adds pkgs.curl to the test nodes so the test script can hit GET
/files via curl to validate the read-path filter independently of
the sweeper.
2026-04-10 15:26:31 +01:00
..
2026-03-30 15:42:43 +01:00