@@ -6,10 +6,10 @@ import (
66 "time"
77
88 "github.com/google/uuid"
9- "github.com/stackitcloud/stackit-cli/internal/cmd/params"
109 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1110 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
1211 "github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
12+ "github.com/stackitcloud/stackit-cli/internal/pkg/types"
1313 "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1414 "github.com/stackitcloud/stackit-sdk-go/services/iaas"
1515)
@@ -161,8 +161,8 @@ func TestOutputResult(t *testing.T) {
161161 wantErr : true ,
162162 },
163163 {
164- name : "default empty routing table" ,
165- outputFormat : "" ,
164+ name : "pretty empty routing table" ,
165+ outputFormat : print . PrettyOutputFormat ,
166166 routingTable : []iaas.RoutingTable {},
167167 wantErr : false ,
168168 },
@@ -179,8 +179,8 @@ func TestOutputResult(t *testing.T) {
179179 wantErr : false ,
180180 },
181181 {
182- name : "default empty routing table in slice" ,
183- outputFormat : "" ,
182+ name : "pretty empty routing table in slice" ,
183+ outputFormat : print . PrettyOutputFormat ,
184184 routingTable : []iaas.RoutingTable {{}},
185185 wantErr : false ,
186186 },
@@ -190,18 +190,6 @@ func TestOutputResult(t *testing.T) {
190190 routingTable : []iaas.RoutingTable {{}},
191191 wantErr : false ,
192192 },
193- {
194- name : "default output with one route" ,
195- outputFormat : "" ,
196- routingTable : []iaas.RoutingTable {dummyRouteTable },
197- wantErr : false ,
198- },
199- {
200- name : "default output with multiple routes" ,
201- outputFormat : "" ,
202- routingTable : []iaas.RoutingTable {dummyRouteTable , dummyRouteTable , dummyRouteTable },
203- wantErr : false ,
204- },
205193 {
206194 name : "pretty output with one route" ,
207195 outputFormat : print .PrettyOutputFormat ,
@@ -229,7 +217,7 @@ func TestOutputResult(t *testing.T) {
229217 }
230218
231219 p := print .NewPrinter ()
232- p .Cmd = NewCmd (& params .CmdParams {Printer : p })
220+ p .Cmd = NewCmd (& types .CmdParams {Printer : p })
233221 for _ , tt := range tests {
234222 t .Run (tt .name , func (t * testing.T ) {
235223 if err := outputResult (p , tt .outputFormat , tt .routingTable ); (err != nil ) != tt .wantErr {
0 commit comments