Skip to content

Commit 2959e98

Browse files
committed
resolve comment
1 parent b40d7c6 commit 2959e98

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

internal/cmd/beta/vpn/gateway/status/status_test.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ package status
22

33
import (
44
"context"
5-
"os"
65
"testing"
76

87
"github.com/google/go-cmp/cmp"
98
"github.com/google/go-cmp/cmp/cmpopts"
109
"github.com/google/uuid"
1110
vpn "github.com/stackitcloud/stackit-sdk-go/services/vpn/v1api"
1211

12+
"github.com/stackitcloud/stackit-cli/internal/pkg/testparams"
1313
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1414

1515
"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
16-
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
1716
"github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
1817
)
1918

@@ -302,15 +301,11 @@ func TestOutputResult(t *testing.T) {
302301
},
303302
},
304303
}
305-
printer := print.NewPrinter(
306-
os.Stdin,
307-
os.Stdout,
308-
os.Stderr,
309-
)
304+
params := testparams.NewTestParams()
310305

311306
for _, tt := range tests {
312307
t.Run(tt.name, func(t *testing.T) {
313-
if err := outputResult(printer, tt.args.outputFormat, tt.args.projectLabel, tt.args.gatewayId, tt.args.gateway); (err != nil) != tt.wantErr {
308+
if err := outputResult(params.Printer, tt.args.outputFormat, tt.args.projectLabel, tt.args.gatewayId, tt.args.gateway); (err != nil) != tt.wantErr {
314309
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
315310
}
316311
})

0 commit comments

Comments
 (0)