Skip to content

Commit

Permalink
Add config tests for os-arch-bin dist type (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmiyake committed May 2, 2017
1 parent 736995b commit 038ace1
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions apps/distgo/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,52 @@ echo "main.year=$YEAR"
}
},
},
{
yml: `
products:
test:
build:
main-pkg: ./cmd/test
dist:
dist-type:
type: os-arch-bin
info:
os-archs:
- os: "darwin"
arch: "amd64"
- os: "linux"
arch: "amd64"
`,
want: func() config.Project {
return config.Project{
Products: map[string]config.Product{
"test": {
Build: config.Build{
MainPkg: "./cmd/test",
},
Dist: []config.Dist{{
DistType: config.DistInfo{
Type: string(params.OSArchBinDistType),
Info: config.OSArchBinDist{
OSArchs: []osarch.OSArch{
{
OS: "darwin",
Arch: "amd64",
},
{
OS: "linux",
Arch: "amd64",
},
},
},
},
}},
},
},
Exclude: matcher.NamesPathsCfg{},
}
},
},
{
yml: `
products:
Expand Down

0 comments on commit 038ace1

Please sign in to comment.