aboutsummaryrefslogtreecommitdiffhomepage
path: root/print_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'print_test.go')
-rw-r--r--print_test.go16
1 files changed, 2 insertions, 14 deletions
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)