From 7e524634452f12cf39af6c5dee9434ed24986a7d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 23 Feb 2025 02:35:02 +0900 Subject: fortify: integrate command handler Signed-off-by: Ophestra --- print_test.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'print_test.go') diff --git a/print_test.go b/print_test.go index 5d5e814b..9e837225 100644 --- a/print_test.go +++ b/print_test.go @@ -448,14 +448,8 @@ App for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - { - v := flagJSON - t.Cleanup(func() { flagJSON = v }) - flagJSON = tc.json - } - output := new(strings.Builder) - printShowInstance(output, testTime, tc.instance, tc.config, tc.short) + printShowInstance(output, testTime, tc.instance, tc.config, tc.short, tc.json) if got := output.String(); got != tc.want { t.Errorf("printShowInstance: got\n%s\nwant\n%s", got, tc.want) @@ -645,14 +639,8 @@ func Test_printPs(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - { - v := flagJSON - t.Cleanup(func() { flagJSON = v }) - flagJSON = tc.json - } - output := new(strings.Builder) - printPs(output, testTime, stubStore(tc.entries), tc.short) + printPs(output, testTime, stubStore(tc.entries), tc.short, tc.json) if got := output.String(); got != tc.want { t.Errorf("printPs: got\n%s\nwant\n%s", got, tc.want) -- cgit v1.3.1