From 7cbcd2f7201771891a351a3bb73a30fbe7f1eb39 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 11 May 2026 17:27:19 +0200 Subject: [PATCH] cli/command/image: rm redundant TestPrintImageTreeNoWarningWhenRedirected This is already covered by various tests using .golden files. Signed-off-by: Sebastiaan van Stijn --- cli/command/image/tree_test.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cli/command/image/tree_test.go b/cli/command/image/tree_test.go index 22a0b7ac3636..4516c08a1bae 100644 --- a/cli/command/image/tree_test.go +++ b/cli/command/image/tree_test.go @@ -157,17 +157,6 @@ func TestPrintImageTreeAnsiTty(t *testing.T) { } } -func TestPrintImageTreeNoWarningWhenRedirected(t *testing.T) { - cli := test.NewFakeCli(nil) - cli.Out().SetIsTerminal(false) - cli.Err().SetIsTerminal(false) - - printImageTree(cli, treeView{images: []topImage{}}) - - errOut := cli.ErrBuffer().String() - assert.Check(t, !strings.Contains(errOut, "WARNING: This output is designed for human readability"), "stderr should not contain warning when output is redirected, got: %s", errOut) -} - func TestPrintImageTreeGolden(t *testing.T) { testCases := []struct { name string