1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

added more build pipe tests

This commit is contained in:
Carlos Alexandro Becker 2017-04-14 12:38:30 -03:00
parent 054a34c309
commit a25f6c37d5
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -73,6 +73,26 @@ func TestRunFullPipe(t *testing.T) {
assert.True(exists(post), post)
}
func TestRunPipeWithInvalidOS(t *testing.T) {
assert := assert.New(t)
var config = config.Project{
Build: config.Build{
Flags: "-v",
Goos: []string{
"windows",
},
Goarch: []string{
"arm",
},
},
}
var ctx = &context.Context{
Config: config,
Archives: map[string]string{},
}
assert.NoError(Pipe{}.Run(ctx))
}
func exists(file string) bool {
_, err := os.Stat(file)
return !os.IsNotExist(err)