Skip to content

Commit 0f6f61d

Browse files
committed
fix test
1 parent d002cb6 commit 0f6f61d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

pkg/cli/command_test.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestCommand(t *testing.T) {
2121
{
2222
name: "--help",
2323
cmd: func() *Command {
24-
c := &Command{Name: "foo", envPrefix: "Mokapi"}
24+
c := &Command{Name: "foo", EnvPrefix: "Mokapi"}
2525
c.Flags().Bool("help", false, "")
2626
return c
2727
},
@@ -35,7 +35,7 @@ func TestCommand(t *testing.T) {
3535
{
3636
name: "-h",
3737
cmd: func() *Command {
38-
c := &Command{Name: "foo", envPrefix: "Mokapi"}
38+
c := &Command{Name: "foo", EnvPrefix: "Mokapi"}
3939
c.Flags().BoolShort("help", "h", false, "")
4040
return c
4141
},
@@ -49,7 +49,7 @@ func TestCommand(t *testing.T) {
4949
{
5050
name: "bind to config",
5151
cmd: func() *Command {
52-
c := &Command{Config: cfg, envPrefix: "Mokapi"}
52+
c := &Command{Config: cfg, EnvPrefix: "Mokapi"}
5353
c.Flags().Bool("flag", false, "")
5454
return c
5555
},
@@ -63,7 +63,7 @@ func TestCommand(t *testing.T) {
6363
{
6464
name: "--count",
6565
cmd: func() *Command {
66-
c := &Command{Config: cfg, envPrefix: "Mokapi"}
66+
c := &Command{Config: cfg, EnvPrefix: "Mokapi"}
6767
c.Flags().Int("count", 12, "")
6868
return c
6969
},
@@ -76,7 +76,7 @@ func TestCommand(t *testing.T) {
7676
{
7777
name: "--count default",
7878
cmd: func() *Command {
79-
c := &Command{Config: cfg, envPrefix: "Mokapi"}
79+
c := &Command{Config: cfg, EnvPrefix: "Mokapi"}
8080
c.Flags().Int("count", 12, "")
8181
return c
8282
},
@@ -89,7 +89,7 @@ func TestCommand(t *testing.T) {
8989
{
9090
name: "--skip-prefix",
9191
cmd: func() *Command {
92-
c := &Command{Config: cfg, envPrefix: "Mokapi"}
92+
c := &Command{Config: cfg, EnvPrefix: "Mokapi"}
9393
c.Flags().StringSlice("skip-prefix", []string{"_"}, "", false)
9494
return c
9595
},
@@ -103,7 +103,7 @@ func TestCommand(t *testing.T) {
103103
{
104104
name: "--skip-prefix default",
105105
cmd: func() *Command {
106-
c := &Command{Config: cfg, envPrefix: "Mokapi"}
106+
c := &Command{Config: cfg, EnvPrefix: "Mokapi"}
107107
c.Flags().StringSlice("skip-prefix", []string{"_"}, "", false)
108108
return c
109109
},
@@ -116,12 +116,9 @@ func TestCommand(t *testing.T) {
116116
},
117117
}
118118

119-
t.Parallel()
120119
for _, tc := range testcases {
121120
tc := tc
122121
t.Run(tc.name, func(t *testing.T) {
123-
t.Parallel()
124-
125122
var cmd *Command
126123
var args []string
127124
root := tc.cmd()

0 commit comments

Comments
 (0)