Update build_test.go

This commit is contained in:
Adrien Delorme 2020-05-08 17:50:48 +02:00
parent efcc6af06c
commit e6aac8cd6f
1 changed files with 7 additions and 7 deletions

View File

@ -630,12 +630,12 @@ func TestBuildCommand_ParseArgs(t *testing.T) {
tests := []struct { tests := []struct {
fields fields fields fields
args args args args
wantCfg BuildArgs wantCfg *BuildArgs
wantExitCode int wantExitCode int
}{ }{
{fields{defaultMeta}, {fields{defaultMeta},
args{[]string{"file.json"}}, args{[]string{"file.json"}},
BuildArgs{ &BuildArgs{
MetaArgs: MetaArgs{Path: "file.json"}, MetaArgs: MetaArgs{Path: "file.json"},
ParallelBuilds: math.MaxInt64, ParallelBuilds: math.MaxInt64,
Color: true, Color: true,
@ -644,16 +644,16 @@ func TestBuildCommand_ParseArgs(t *testing.T) {
}, },
{fields{defaultMeta}, {fields{defaultMeta},
args{[]string{"-parallel-builds=10", "file.json"}}, args{[]string{"-parallel-builds=10", "file.json"}},
BuildArgs{ &BuildArgs{
MetaArgs: MetaArgs{Path: "file.json"}, MetaArgs: MetaArgs{Path: "file.json"},
ParallelBuilds: math.MaxInt64, ParallelBuilds: 10,
Color: true, Color: true,
}, },
0, 0,
}, },
{fields{defaultMeta}, {fields{defaultMeta},
args{[]string{"-parallel-builds=1", "file.json"}}, args{[]string{"-parallel-builds=1", "file.json"}},
BuildArgs{ &BuildArgs{
MetaArgs: MetaArgs{Path: "file.json"}, MetaArgs: MetaArgs{Path: "file.json"},
ParallelBuilds: 1, ParallelBuilds: 1,
Color: true, Color: true,
@ -662,7 +662,7 @@ func TestBuildCommand_ParseArgs(t *testing.T) {
}, },
{fields{defaultMeta}, {fields{defaultMeta},
args{[]string{"-parallel-builds=5", "file.json"}}, args{[]string{"-parallel-builds=5", "file.json"}},
BuildArgs{ &BuildArgs{
MetaArgs: MetaArgs{Path: "file.json"}, MetaArgs: MetaArgs{Path: "file.json"},
ParallelBuilds: 5, ParallelBuilds: 5,
Color: true, Color: true,
@ -671,7 +671,7 @@ func TestBuildCommand_ParseArgs(t *testing.T) {
}, },
{fields{defaultMeta}, {fields{defaultMeta},
args{[]string{"-parallel-builds=1", "-parallel-builds=5", "otherfile.json"}}, args{[]string{"-parallel-builds=1", "-parallel-builds=5", "otherfile.json"}},
BuildArgs{ &BuildArgs{
MetaArgs: MetaArgs{Path: "otherfile.json"}, MetaArgs: MetaArgs{Path: "otherfile.json"},
ParallelBuilds: 5, ParallelBuilds: 5,
Color: true, Color: true,