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

maybe fixing test

This commit is contained in:
Carlos Alexandro Becker 2017-08-02 09:22:51 -03:00
parent a3a7542f41
commit 2cb3808b82
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -42,9 +42,6 @@ func TestRunPipe(t *testing.T) {
assert.NoError(err)
var dist = filepath.Join(folder, "dist")
assert.NoError(os.Mkdir(dist, 0755))
assert.NoError(os.Mkdir(filepath.Join(dist, "mybin"), 0755))
var binPath = filepath.Join(dist, "mybin", "mybin")
_, err = os.Create(binPath)
assert.NoError(err)
var ctx = &context.Context{
Version: "testversion",
@ -58,7 +55,11 @@ func TestRunPipe(t *testing.T) {
},
}
for _, plat := range []string{"linuxamd64", "linux386", "darwinamd64"} {
ctx.AddBinary(plat, "mybin", "mybin", binPath)
var folder = "mybin_" + plat
assert.NoError(os.Mkdir(filepath.Join(dist, folder), 0755))
var binPath = filepath.Join(dist, folder, "mybin")
_, err = os.Create(binPath)
ctx.AddBinary(plat, folder, "mybin", binPath)
}
assert.NoError(Pipe{}.Run(ctx))
}