Skip to content

Commit

Permalink
test(cmd): Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Sep 3, 2024
1 parent 562a8de commit b985ee1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

func Test_preRun(t *testing.T) {
type args struct {
cmd *cobra.Command
args []string
cmd *cobra.Command
_ []string
}
tests := []struct {
name string
Expand All @@ -29,9 +29,9 @@ func Test_preRun(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
err := tt.args.cmd.PersistentFlags().Set(server.APIFlagPrefix+server.AddressFlag, tt.want)
require.NoError(t, err)
require.NoError(t, tt.args.cmd.ParseFlags(tt.args.args))

err = preRun(tt.args.cmd, tt.args.args)
tt.args.cmd.RunE = func(_ *cobra.Command, _ []string) error { return nil }
err = tt.args.cmd.Execute()
tt.wantErr(t, err)
if err != nil {
return
Expand Down

0 comments on commit b985ee1

Please sign in to comment.