1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-25 21:29:14 +02:00

testing failing builds

This commit is contained in:
Carlos Alexandro Becker 2017-04-14 12:50:20 -03:00
parent 93a0fd966e
commit f5ab2de674
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

@ -73,6 +73,26 @@ func TestRunFullPipe(t *testing.T) {
assert.True(exists(post), post)
}
func TestBuildFailed(t *testing.T) {
assert := assert.New(t)
var config = config.Project{
Build: config.Build{
Flags: "-flag-that-dont-exists-to-force-failure",
Goos: []string{
runtime.GOOS,
},
Goarch: []string{
runtime.GOARCH,
},
},
}
var ctx = &context.Context{
Config: config,
Archives: map[string]string{},
}
assert.Error(Pipe{}.Run(ctx))
}
func TestRunPipeWithInvalidOS(t *testing.T) {
assert := assert.New(t)
var config = config.Project{