Skip to content

Commit 6819cc5

Browse files
committed
adjust tests
1 parent f8ef44e commit 6819cc5

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

internal/cmd/mongodbflex/backup/list/list_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,10 @@ func TestBuildRequest(t *testing.T) {
215215

216216
func TestOutputResult(t *testing.T) {
217217
type args struct {
218-
outputFormat string
219-
backups []mongodbflex.Backup
220-
restoreJobs *mongodbflex.ListRestoreJobsResponse
218+
outputFormat string
219+
instanceLabel string
220+
backups []mongodbflex.Backup
221+
restoreJobs *mongodbflex.ListRestoreJobsResponse
221222
}
222223
tests := []struct {
223224
name string
@@ -256,7 +257,7 @@ func TestOutputResult(t *testing.T) {
256257
p.Cmd = NewCmd(&params.CmdParams{Printer: p})
257258
for _, tt := range tests {
258259
t.Run(tt.name, func(t *testing.T) {
259-
if err := outputResult(p, tt.args.outputFormat, tt.args.backups, tt.args.restoreJobs); (err != nil) != tt.wantErr {
260+
if err := outputResult(p, tt.args.outputFormat, tt.args.instanceLabel, tt.args.backups, tt.args.restoreJobs); (err != nil) != tt.wantErr {
260261
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
261262
}
262263
})

internal/cmd/mongodbflex/instance/list/list_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func TestBuildRequest(t *testing.T) {
195195
func TestOutputResult(t *testing.T) {
196196
type args struct {
197197
outputFormat string
198+
projectLabel string
198199
instanceList []mongodbflex.InstanceListInstance
199200
}
200201
tests := []struct {
@@ -226,7 +227,7 @@ func TestOutputResult(t *testing.T) {
226227
p.Cmd = NewCmd(&params.CmdParams{Printer: p})
227228
for _, tt := range tests {
228229
t.Run(tt.name, func(t *testing.T) {
229-
if err := outputResult(p, tt.args.outputFormat, tt.args.instanceList); (err != nil) != tt.wantErr {
230+
if err := outputResult(p, tt.args.outputFormat, tt.args.projectLabel, tt.args.instanceList); (err != nil) != tt.wantErr {
230231
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
231232
}
232233
})

internal/cmd/mongodbflex/user/list/list_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ func TestBuildRequest(t *testing.T) {
211211

212212
func TestOutputResult(t *testing.T) {
213213
type args struct {
214-
outputFormat string
215-
users []mongodbflex.ListUser
214+
outputFormat string
215+
instanceLabel string
216+
users []mongodbflex.ListUser
216217
}
217218
tests := []struct {
218219
name string
@@ -243,7 +244,7 @@ func TestOutputResult(t *testing.T) {
243244
p.Cmd = NewCmd(&params.CmdParams{Printer: p})
244245
for _, tt := range tests {
245246
t.Run(tt.name, func(t *testing.T) {
246-
if err := outputResult(p, tt.args.outputFormat, tt.args.users); (err != nil) != tt.wantErr {
247+
if err := outputResult(p, tt.args.outputFormat, tt.args.instanceLabel, tt.args.users); (err != nil) != tt.wantErr {
247248
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
248249
}
249250
})

0 commit comments

Comments
 (0)