From b39ce53e7a1deb0a8f35155ec460fc415e26c249 Mon Sep 17 00:00:00 2001 From: Ruslan Shaydullin Date: Tue, 7 Jul 2026 10:31:38 +0500 Subject: [PATCH] test(env): pin BurstLimit so the bare-value assertion is hermetic TestEnvOutputDefault asserted the literal default '100', so an ambient HELM_BURST_LIMIT in the test process environment would fail the run and the assertion was coupled to the current default value. Pin settings.BurstLimit for the single-variable check instead. Suggested by the Copilot review on #32282. Signed-off-by: Ruslan Shaydullin --- pkg/cmd/env_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/env_test.go b/pkg/cmd/env_test.go index 572583d09..02e024c99 100644 --- a/pkg/cmd/env_test.go +++ b/pkg/cmd/env_test.go @@ -62,12 +62,18 @@ func TestEnvOutputDefault(t *testing.T) { } // Single-variable mode without --output keeps printing the bare value. + // Pin BurstLimit so the expected value cannot drift with the ambient + // HELM_BURST_LIMIT of the test process. + oldBurstLimit := settings.BurstLimit + settings.BurstLimit = 150 + t.Cleanup(func() { settings.BurstLimit = oldBurstLimit }) + _, out, err = executeActionCommand("env HELM_BURST_LIMIT") if err != nil { t.Fatal(err) } - if out != "100\n" { - t.Errorf("expected %q, got %q", "100\n", out) + if out != "150\n" { + t.Errorf("expected %q, got %q", "150\n", out) } }