From 760acd1eb48aea476c7ef0266c068b28080d164d Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Mon, 18 May 2026 23:01:00 +1000 Subject: [PATCH] test(e2e-lb): resolve peer availability before shared fixture setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setupSharedFixture builds a VPC + 2 app VMs + probe client (minutes on capacity-tight dev hosts) and previously ran BEFORE the peer pickup + ssh.Ping. On single-node, the InternetFacing_* subtests would correctly t.Skip on peer == "" — but only after the fixture work and once subtests started, so the wait appeared to be attached to the first subtest name gotestsum printed. Reorder: pickPeer + ssh.Ping first, log "internet-facing will skip" immediately, then build the fixture for the internal subtests. No behavior change for multi-node + peer-reachable; on single-node the skip rationale surfaces before the fixture wait. --- tests/e2e/lb/lb_test.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/e2e/lb/lb_test.go b/tests/e2e/lb/lb_test.go index 656ff05b9..b99f74f21 100644 --- a/tests/e2e/lb/lb_test.go +++ b/tests/e2e/lb/lb_test.go @@ -55,11 +55,12 @@ const ( func TestLoadBalancer(t *testing.T) { env := harness.LoadEnv(t) skipIfDevNetworking(t, env) - artifacts := harness.ArtifactDir(t, env) - - client := harness.NewAWSClient(t, env) - fixture := setupSharedFixture(t, client, artifacts) + // Resolve peer availability BEFORE the shared fixture build (VPC + 2 + // app VMs + probe client = minutes). Single-node mode has no peer, so + // the user sees the "internet-facing will skip" message immediately + // instead of attributing the fixture-setup wait to the first subtest + // name that gotestsum prints once subtests start. peer := pickPeer(env) var ssh *harness.PeerSSH if peer != "" { @@ -72,6 +73,13 @@ func TestLoadBalancer(t *testing.T) { ssh = nil } } + if peer == "" { + t.Logf("no peer node available — internet-facing subtests will skip; building shared fixture for internal subtests") + } + + artifacts := harness.ArtifactDir(t, env) + client := harness.NewAWSClient(t, env) + fixture := setupSharedFixture(t, client, artifacts) t.Run("InternetFacing_ALB", func(t *testing.T) { if peer == "" {