test(template): reset global CLI settings in OCI output test

Add defer resetEnv()() so the test isolates the package-global settings/env,
matching the other cmd tests and avoiding order-dependent flakiness.

Signed-off-by: Seonghyun Hong <s3onghyun.hong@gmail.com>
pull/32234/head
Seonghyun Hong 3 weeks ago
parent dfea32aff5
commit 2bedfc4bee

@ -185,6 +185,8 @@ func TestTemplateCmd(t *testing.T) {
// diagnostic messages (e.g. "Pulled:" / "Digest:") emitted while fetching an OCI
// chart do not leak into the rendered manifest stream on stdout. See helm/helm#32215.
func TestTemplateOCIRegistryOutputNotInManifest(t *testing.T) {
defer resetEnv()()
srv := repotest.NewTempServer(
t,
repotest.WithChartSourceGlob("testdata/testcharts/*.tgz*"),

Loading…
Cancel
Save