@@ -211,25 +211,26 @@ func TestBuildRequest(t *testing.T) {
211211
212212func Test_outputResult (t * testing.T ) {
213213 type args struct {
214- outputFormat string
215- model inputModel
216- members []authorization.Member
214+ model inputModel
215+ members []authorization.Member
217216 }
218217 tests := []struct {
219218 name string
220219 args args
221220 wantErr bool
222221 }{
223- {"empty" , args {}, false },
224- {"base" , args {"" , inputModel {
225- Subject : utils .Ptr ("subject" ),
226- Limit : nil ,
227- SortBy : "" ,
222+ {"empty" , args {model : inputModel {GlobalFlagModel : & globalflags.GlobalFlagModel {}}}, false },
223+ {"base" , args {inputModel {
224+ GlobalFlagModel : & globalflags.GlobalFlagModel {},
225+ Subject : utils .Ptr ("subject" ),
226+ Limit : nil ,
227+ SortBy : "" ,
228228 }, nil }, false },
229- {"complete" , args {"" , inputModel {
230- Subject : utils .Ptr ("subject" ),
231- Limit : nil ,
232- SortBy : "" ,
229+ {"complete" , args {inputModel {
230+ GlobalFlagModel : & globalflags.GlobalFlagModel {},
231+ Subject : utils .Ptr ("subject" ),
232+ Limit : nil ,
233+ SortBy : "" ,
233234 },
234235 []authorization.Member {
235236 {Role : utils .Ptr ("role1" ), Subject : utils .Ptr ("subject1" )},
@@ -242,7 +243,7 @@ func Test_outputResult(t *testing.T) {
242243 p .Cmd = NewCmd (p )
243244 for _ , tt := range tests {
244245 t .Run (tt .name , func (t * testing.T ) {
245- if err := outputResult (p , tt .args .outputFormat , tt . args . model , tt .args .members ); (err != nil ) != tt .wantErr {
246+ if err := outputResult (p , tt .args .model , tt .args .members ); (err != nil ) != tt .wantErr {
246247 t .Errorf ("outputResult() error = %v, wantErr %v" , err , tt .wantErr )
247248 }
248249 })
0 commit comments