Skip to content

Commit 1edb1e2

Browse files
committed
fix(sfs): remove hardcoded async in outputResult tests
1 parent ec0972e commit 1edb1e2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

internal/cmd/beta/sfs/resource-pool/create/create_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ func TestBuildRequest(t *testing.T) {
252252
func TestOutputResult(t *testing.T) {
253253
type args struct {
254254
outputFormat string
255+
async bool
255256
projectLabel string
256257
resp *sfs.CreateResourcePoolResponse
257258
}
@@ -287,7 +288,7 @@ func TestOutputResult(t *testing.T) {
287288
p.Cmd = NewCmd(&types.CmdParams{Printer: p})
288289
for _, tt := range tests {
289290
t.Run(tt.name, func(t *testing.T) {
290-
if err := outputResult(p, tt.args.outputFormat, false, tt.args.projectLabel, tt.args.resp); (err != nil) != tt.wantErr {
291+
if err := outputResult(p, tt.args.outputFormat, tt.args.async, tt.args.projectLabel, tt.args.resp); (err != nil) != tt.wantErr {
291292
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
292293
}
293294
})

internal/cmd/beta/sfs/resource-pool/delete/delete_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ func TestBuildRequest(t *testing.T) {
175175
func TestOutputResult(t *testing.T) {
176176
type args struct {
177177
outputFormat string
178+
async bool
178179
resourcePoolName string
179180
response map[string]interface{}
180181
}
@@ -201,7 +202,7 @@ func TestOutputResult(t *testing.T) {
201202
p.Cmd = NewCmd(&types.CmdParams{Printer: p})
202203
for _, tt := range tests {
203204
t.Run(tt.name, func(t *testing.T) {
204-
if err := outputResult(p, tt.args.outputFormat, false, tt.args.resourcePoolName, tt.args.response); (err != nil) != tt.wantErr {
205+
if err := outputResult(p, tt.args.outputFormat, tt.args.async, tt.args.resourcePoolName, tt.args.response); (err != nil) != tt.wantErr {
205206
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
206207
}
207208
})

internal/cmd/beta/sfs/resource-pool/update/update_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ func TestBuildRequest(t *testing.T) {
308308
func TestOutputResult(t *testing.T) {
309309
type args struct {
310310
outputFormat string
311+
async bool
311312
resp *sfs.UpdateResourcePoolResponse
312313
}
313314
tests := []struct {
@@ -353,7 +354,7 @@ func TestOutputResult(t *testing.T) {
353354
p.Cmd = NewCmd(&types.CmdParams{Printer: p})
354355
for _, tt := range tests {
355356
t.Run(tt.name, func(t *testing.T) {
356-
if err := outputResult(p, tt.args.outputFormat, false, tt.args.resp); (err != nil) != tt.wantErr {
357+
if err := outputResult(p, tt.args.outputFormat, tt.args.async, tt.args.resp); (err != nil) != tt.wantErr {
357358
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
358359
}
359360
})

0 commit comments

Comments
 (0)