1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

more build pipe tests

This commit is contained in:
Carlos Alexandro Becker 2017-07-03 01:31:57 -03:00
parent 2ed2a81854
commit 02cf45cb7e
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -192,26 +192,30 @@ func TestRunPipeWithInvalidOS(t *testing.T) {
func TestRunInvalidNametemplate(t *testing.T) {
var assert = assert.New(t)
var ctx = &context.Context{
Config: config.Project{
Builds: []config.Build{
{
Binary: "nametest",
Flags: "-v",
Goos: []string{
runtime.GOOS,
},
Goarch: []string{
runtime.GOARCH,
for _, format := range []string{"tar.gz", "zip", "binary"} {
var ctx = &context.Context{
Config: config.Project{
ProjectName: "nameeeee",
Builds: []config.Build{
{
Binary: "namet{{.est}",
Flags: "-v",
Goos: []string{
runtime.GOOS,
},
Goarch: []string{
runtime.GOARCH,
},
},
},
Archive: config.Archive{
Format: format,
NameTemplate: "{{.Binary}",
},
},
Archive: config.Archive{
NameTemplate: "{{.Binary}_{{.Os}}_{{.Arch}}_{{.Version}}",
},
},
}
assert.Error(Pipe{}.Run(ctx))
}
assert.Error(Pipe{}.Run(ctx))
}
func TestRunInvalidLdflags(t *testing.T) {