1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +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,11 +192,13 @@ func TestRunPipeWithInvalidOS(t *testing.T) {
func TestRunInvalidNametemplate(t *testing.T) {
var assert = assert.New(t)
for _, format := range []string{"tar.gz", "zip", "binary"} {
var ctx = &context.Context{
Config: config.Project{
ProjectName: "nameeeee",
Builds: []config.Build{
{
Binary: "nametest",
Binary: "namet{{.est}",
Flags: "-v",
Goos: []string{
runtime.GOOS,
@ -207,11 +209,13 @@ func TestRunInvalidNametemplate(t *testing.T) {
},
},
Archive: config.Archive{
NameTemplate: "{{.Binary}_{{.Os}}_{{.Arch}}_{{.Version}}",
Format: format,
NameTemplate: "{{.Binary}",
},
},
}
assert.Error(Pipe{}.Run(ctx))
}
}
func TestRunInvalidLdflags(t *testing.T) {