From 16bc55f67e4329cecf9850609aaca04a92740dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Tue, 23 Jun 2026 18:45:12 +0200 Subject: [PATCH] test: remove redundant primary/standby picking logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If pod-1 is not the primary we'd fail anyway because a timeline bump would make all assertions about the walLogDir fail. Also there's no reason why there should have been a switchover, so we should not hide a failure if that happens. Signed-off-by: Niccolò Fei --- test/e2e/internal/tests/walrestore/walrestore.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/e2e/internal/tests/walrestore/walrestore.go b/test/e2e/internal/tests/walrestore/walrestore.go index 10968c4..c20df66 100644 --- a/test/e2e/internal/tests/walrestore/walrestore.go +++ b/test/e2e/internal/tests/walrestore/walrestore.go @@ -59,7 +59,7 @@ const ( managerExecutable = "/controller/manager" // postgresContainer is the container we exec into on instance pods. postgresContainer = "postgres" - // walLogDir is the wals sub-directory (timeline + log id) the forged segments + // walLogDir is the WALs subdirectory (timeline + log id) the forged segments // live under; a freshly bootstrapped, idle cluster stays within it. walLogDir = "0000000100000000" // bucket is the destination bucket of the minio ObjectStore. @@ -105,7 +105,7 @@ func execInPod( // This test drives the plugin's parallel WAL restore directly: it invokes the // instance-manager wal-restore command on the standby (which delegates to the // plugin) and asserts the prefetch/spool/end-of-wal-stream state machine with -// maxParallel = 3. To control the archive deterministically it forges WAL +// maxParallel = 3. To control the archive deterministically, it forges WAL // segments on the object store by copying a real archived segment under new // names. var _ = Describe("Parallel WAL restore", func() { @@ -166,9 +166,6 @@ var _ = Describe("Parallel WAL restore", func() { primary := cluster.Status.CurrentPrimary Expect(primary).NotTo(BeEmpty()) standby := clusterName + "-2" - if primary == standby { - standby = clusterName + "-1" - } var s3ClientPods corev1.PodList Expect(cl.List(ctx, &s3ClientPods,