Skip to content

Commit addfae9

Browse files
authored
Merge branch 'main' into yg/onboard-intake
2 parents 91cf9d1 + 122503b commit addfae9

File tree

21 files changed

+244
-246
lines changed

21 files changed

+244
-246
lines changed

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/google/go-cmp v0.7.0
1010
github.com/google/uuid v1.6.0
1111
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf
12-
github.com/jedib0t/go-pretty/v6 v6.7.1
12+
github.com/jedib0t/go-pretty/v6 v6.7.2
1313
github.com/lmittmann/tint v1.1.2
1414
github.com/mattn/go-colorable v0.1.14
1515
github.com/spf13/cobra v1.10.1
@@ -39,12 +39,12 @@ require (
3939
golang.org/x/oauth2 v0.33.0
4040
golang.org/x/term v0.37.0
4141
golang.org/x/text v0.31.0
42-
k8s.io/apimachinery v0.34.1
43-
k8s.io/client-go v0.34.1
42+
k8s.io/apimachinery v0.34.2
43+
k8s.io/client-go v0.34.2
4444
)
4545

4646
require (
47-
golang.org/x/net v0.46.0 // indirect
47+
golang.org/x/net v0.47.0 // indirect
4848
golang.org/x/time v0.11.0 // indirect
4949
gopkg.in/inf.v0 v0.9.1 // indirect
5050
)
@@ -210,8 +210,8 @@ require (
210210
go.yaml.in/yaml/v3 v3.0.4 // indirect
211211
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
212212
golang.org/x/sync v0.18.0 // indirect
213-
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect
214-
golang.org/x/tools v0.38.0 // indirect
213+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
214+
golang.org/x/tools v0.39.0 // indirect
215215
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
216216
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
217217
google.golang.org/protobuf v1.36.6 // indirect
@@ -255,7 +255,7 @@ require (
255255
go.uber.org/multierr v1.11.0 // indirect
256256
golang.org/x/sys v0.38.0 // indirect
257257
gopkg.in/yaml.v3 v3.0.1 // indirect
258-
k8s.io/api v0.34.1 // indirect
258+
k8s.io/api v0.34.2 // indirect
259259
k8s.io/klog/v2 v2.130.1 // indirect
260260
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
261261
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
339339
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
340340
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s=
341341
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf/go.mod h1:yrqSXGoD/4EKfF26AOGzscPOgTTJcyAwM2rpixWT+t4=
342-
github.com/jedib0t/go-pretty/v6 v6.7.1 h1:bHDSsj93NuJ563hHuM7ohk/wpX7BmRFNIsVv1ssI2/M=
343-
github.com/jedib0t/go-pretty/v6 v6.7.1/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU=
342+
github.com/jedib0t/go-pretty/v6 v6.7.2 h1:EYWgQNIH/+JsyHki7ns9OHyBKuHPkzrBo02uYjran7w=
343+
github.com/jedib0t/go-pretty/v6 v6.7.2/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU=
344344
github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk=
345345
github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4=
346346
github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs=
@@ -801,8 +801,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
801801
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
802802
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
803803
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
804-
golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=
805-
golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210=
804+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
805+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
806806
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
807807
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
808808
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -881,8 +881,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
881881
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
882882
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
883883
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
884-
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 h1:LvzTn0GQhWuvKH/kVRS3R3bVAsdQWI7hvfLHGgh9+lU=
885-
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE=
884+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo=
885+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ=
886886
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
887887
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
888888
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
@@ -970,8 +970,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
970970
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
971971
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
972972
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
973-
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
974-
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
973+
golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ=
974+
golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
975975
golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM=
976976
golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY=
977977
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM=
@@ -1087,12 +1087,12 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
10871087
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
10881088
honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI=
10891089
honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4=
1090-
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
1091-
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
1092-
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
1093-
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
1094-
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
1095-
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
1090+
k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY=
1091+
k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw=
1092+
k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4=
1093+
k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
1094+
k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M=
1095+
k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE=
10961096
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
10971097
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
10981098
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=

internal/cmd/beta/sqlserverflex/database/list/list.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,20 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6666
if err != nil {
6767
return fmt.Errorf("get SQLServer Flex databases: %w", err)
6868
}
69-
if resp.Databases == nil || len(*resp.Databases) == 0 {
70-
projectLabel, err := projectname.GetProjectName(ctx, params.Printer, params.CliVersion, cmd)
71-
if err != nil {
72-
params.Printer.Debug(print.ErrorLevel, "get project name: %v", err)
73-
projectLabel = model.ProjectId
74-
}
75-
params.Printer.Info("No databases found for instance %s on project %s\n", model.InstanceId, projectLabel)
76-
return nil
69+
databases := resp.GetDatabases()
70+
71+
projectLabel, err := projectname.GetProjectName(ctx, params.Printer, params.CliVersion, cmd)
72+
if err != nil {
73+
params.Printer.Debug(print.ErrorLevel, "get project name: %v", err)
74+
projectLabel = model.ProjectId
7775
}
78-
databases := *resp.Databases
7976

8077
// Truncate output
8178
if model.Limit != nil && len(databases) > int(*model.Limit) {
8279
databases = databases[:*model.Limit]
8380
}
8481

85-
return outputResult(params.Printer, model.OutputFormat, databases)
82+
return outputResult(params.Printer, model.OutputFormat, model.InstanceId, projectLabel, databases)
8683
},
8784
}
8885

@@ -127,8 +124,13 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *sqlserverfl
127124
return req
128125
}
129126

130-
func outputResult(p *print.Printer, outputFormat string, databases []sqlserverflex.Database) error {
127+
func outputResult(p *print.Printer, outputFormat, instanceId, projectLabel string, databases []sqlserverflex.Database) error {
131128
return p.OutputResult(outputFormat, databases, func() error {
129+
if len(databases) == 0 {
130+
p.Outputf("No databases found for instance %s on project %s\n", instanceId, projectLabel)
131+
return nil
132+
}
133+
132134
table := tables.NewTable()
133135
table.SetHeader("ID", "NAME")
134136
for i := range databases {

internal/cmd/beta/sqlserverflex/database/list/list_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
2121
var testClient = &sqlserverflex.APIClient{}
2222
var testProjectId = uuid.NewString()
2323
var testInstanceId = uuid.NewString()
24-
var testRegion = "eu01"
24+
25+
const testRegion = "eu01"
2526

2627
func fixtureFlagValues(mods ...func(flagValues map[string]string)) map[string]string {
2728
flagValues := map[string]string{
@@ -175,6 +176,8 @@ func TestBuildRequest(t *testing.T) {
175176
func TestOutputResult(t *testing.T) {
176177
type args struct {
177178
outputFormat string
179+
instanceId string
180+
projectLabel string
178181
databases []sqlserverflex.Database
179182
}
180183
tests := []struct {
@@ -199,7 +202,7 @@ func TestOutputResult(t *testing.T) {
199202
p.Cmd = NewCmd(&params.CmdParams{Printer: p})
200203
for _, tt := range tests {
201204
t.Run(tt.name, func(t *testing.T) {
202-
if err := outputResult(p, tt.args.outputFormat, tt.args.databases); (err != nil) != tt.wantErr {
205+
if err := outputResult(p, tt.args.outputFormat, tt.args.instanceId, tt.args.projectLabel, tt.args.databases); (err != nil) != tt.wantErr {
203206
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
204207
}
205208
})

internal/cmd/beta/sqlserverflex/instance/list/list.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,20 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6464
if err != nil {
6565
return fmt.Errorf("get SQLServer Flex instances: %w", err)
6666
}
67-
if resp.Items == nil || len(*resp.Items) == 0 {
68-
projectLabel, err := projectname.GetProjectName(ctx, params.Printer, params.CliVersion, cmd)
69-
if err != nil {
70-
params.Printer.Debug(print.ErrorLevel, "get project name: %v", err)
71-
projectLabel = model.ProjectId
72-
}
73-
params.Printer.Info("No instances found for project %q\n", projectLabel)
74-
return nil
67+
instances := resp.GetItems()
68+
69+
projectLabel, err := projectname.GetProjectName(ctx, params.Printer, params.CliVersion, cmd)
70+
if err != nil {
71+
params.Printer.Debug(print.ErrorLevel, "get project name: %v", err)
72+
projectLabel = model.ProjectId
7573
}
76-
instances := *resp.Items
7774

7875
// Truncate output
7976
if model.Limit != nil && len(instances) > int(*model.Limit) {
8077
instances = instances[:*model.Limit]
8178
}
8279

83-
return outputResult(params.Printer, model.OutputFormat, instances)
80+
return outputResult(params.Printer, model.OutputFormat, projectLabel, instances)
8481
},
8582
}
8683

@@ -120,8 +117,13 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *sqlserverfl
120117
return req
121118
}
122119

123-
func outputResult(p *print.Printer, outputFormat string, instances []sqlserverflex.InstanceListInstance) error {
120+
func outputResult(p *print.Printer, outputFormat, projectLabel string, instances []sqlserverflex.InstanceListInstance) error {
124121
return p.OutputResult(outputFormat, instances, func() error {
122+
if len(instances) == 0 {
123+
p.Outputf("No instances found for project %q\n", projectLabel)
124+
return nil
125+
}
126+
125127
table := tables.NewTable()
126128
table.SetHeader("ID", "NAME", "STATUS")
127129
for i := range instances {

internal/cmd/beta/sqlserverflex/instance/list/list_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ type testCtxKey struct{}
2020
var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
2121
var testClient = &sqlserverflex.APIClient{}
2222
var testProjectId = uuid.NewString()
23-
var testRegion = "eu01"
23+
24+
const testRegion = "eu01"
2425

2526
func fixtureFlagValues(mods ...func(flagValues map[string]string)) map[string]string {
2627
flagValues := map[string]string{
@@ -151,6 +152,7 @@ func TestBuildRequest(t *testing.T) {
151152
func TestOutputResult(t *testing.T) {
152153
type args struct {
153154
outputFormat string
155+
projectLabel string
154156
instances []sqlserverflex.InstanceListInstance
155157
}
156158
tests := []struct {
@@ -175,7 +177,7 @@ func TestOutputResult(t *testing.T) {
175177
p.Cmd = NewCmd(&params.CmdParams{Printer: p})
176178
for _, tt := range tests {
177179
t.Run(tt.name, func(t *testing.T) {
178-
if err := outputResult(p, tt.args.outputFormat, tt.args.instances); (err != nil) != tt.wantErr {
180+
if err := outputResult(p, tt.args.outputFormat, tt.args.projectLabel, tt.args.instances); (err != nil) != tt.wantErr {
179181
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
180182
}
181183
})

internal/cmd/beta/sqlserverflex/user/list/list.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,20 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
6767
if err != nil {
6868
return fmt.Errorf("get SQLServer Flex users: %w", err)
6969
}
70-
if resp.Items == nil || len(*resp.Items) == 0 {
71-
instanceLabel, err := sqlserverflexUtils.GetInstanceName(ctx, apiClient, model.ProjectId, *model.InstanceId, model.Region)
72-
if err != nil {
73-
params.Printer.Debug(print.ErrorLevel, "get instance name: %v", err)
74-
instanceLabel = *model.InstanceId
75-
}
76-
params.Printer.Info("No users found for instance %q\n", instanceLabel)
77-
return nil
70+
users := resp.GetItems()
71+
72+
instanceLabel, err := sqlserverflexUtils.GetInstanceName(ctx, apiClient, model.ProjectId, *model.InstanceId, model.Region)
73+
if err != nil {
74+
params.Printer.Debug(print.ErrorLevel, "get instance name: %v", err)
75+
instanceLabel = *model.InstanceId
7876
}
79-
users := *resp.Items
8077

8178
// Truncate output
8279
if model.Limit != nil && len(users) > int(*model.Limit) {
8380
users = users[:*model.Limit]
8481
}
8582

86-
return outputResult(params.Printer, model.OutputFormat, users)
83+
return outputResult(params.Printer, model.OutputFormat, instanceLabel, users)
8784
},
8885
}
8986

@@ -128,8 +125,13 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *sqlserverfl
128125
return req
129126
}
130127

131-
func outputResult(p *print.Printer, outputFormat string, users []sqlserverflex.InstanceListUser) error {
128+
func outputResult(p *print.Printer, outputFormat, instanceLabel string, users []sqlserverflex.InstanceListUser) error {
132129
return p.OutputResult(outputFormat, users, func() error {
130+
if len(users) == 0 {
131+
p.Outputf("No users found for instance %q\n", instanceLabel)
132+
return nil
133+
}
134+
133135
table := tables.NewTable()
134136
table.SetHeader("ID", "USERNAME")
135137
for i := range users {

internal/cmd/beta/sqlserverflex/user/list/list_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
2121
var testClient = &sqlserverflex.APIClient{}
2222
var testProjectId = uuid.NewString()
2323
var testInstanceId = uuid.NewString()
24-
var testRegion = "eu01"
24+
25+
const testRegion = "eu01"
2526

2627
func fixtureFlagValues(mods ...func(flagValues map[string]string)) map[string]string {
2728
flagValues := map[string]string{
@@ -167,8 +168,9 @@ func TestBuildRequest(t *testing.T) {
167168

168169
func TestOutputResult(t *testing.T) {
169170
type args struct {
170-
outputFormat string
171-
users []sqlserverflex.InstanceListUser
171+
outputFormat string
172+
instanceLabel string
173+
users []sqlserverflex.InstanceListUser
172174
}
173175
tests := []struct {
174176
name string
@@ -192,7 +194,7 @@ func TestOutputResult(t *testing.T) {
192194
p.Cmd = NewCmd(&params.CmdParams{Printer: p})
193195
for _, tt := range tests {
194196
t.Run(tt.name, func(t *testing.T) {
195-
if err := outputResult(p, tt.args.outputFormat, tt.args.users); (err != nil) != tt.wantErr {
197+
if err := outputResult(p, tt.args.outputFormat, tt.args.instanceLabel, tt.args.users); (err != nil) != tt.wantErr {
196198
t.Errorf("outputResult() error = %v, wantErr %v", err, tt.wantErr)
197199
}
198200
})

0 commit comments

Comments
 (0)