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

fix: fixing test to use the right import

VSCode used alecthomas/template instead of text/template
automatically, tests begin to fail when I fixed it
This commit is contained in:
Carlos Alexandro Becker 2017-12-05 11:35:30 -02:00 committed by Carlos Alexandro Becker
parent 3be7299047
commit 0074b79819

View File

@ -78,7 +78,7 @@ func TestRunPipe(t *testing.T) {
Latest: true, Latest: true,
TagTemplate: "{{.Tag}", TagTemplate: "{{.Tag}",
}, },
err: `template: tag:1: unexpected "}" in operand; missing space?`, err: `template: tag:1: unexpected "}" in operand`,
}, },
} }
var images = []string{ var images = []string{
@ -109,10 +109,10 @@ func TestRunPipe(t *testing.T) {
for _, plat := range []string{"linuxamd64", "linux386", "darwinamd64"} { for _, plat := range []string{"linuxamd64", "linux386", "darwinamd64"} {
ctx.AddBinary(plat, "mybin", "mybin", binPath) ctx.AddBinary(plat, "mybin", "mybin", binPath)
} }
if docker.err != "" { if docker.err == "" {
assert.EqualError(t, Pipe{}.Run(ctx), docker.err)
} else {
assert.NoError(t, Pipe{}.Run(ctx)) assert.NoError(t, Pipe{}.Run(ctx))
} else {
assert.EqualError(t, Pipe{}.Run(ctx), docker.err)
} }
}) })
} }