1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

fixed brew tests

This commit is contained in:
Carlos Alexandro Becker 2017-07-13 22:46:21 -03:00
parent af7e7142f2
commit d4fc32e895
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 6 additions and 10 deletions

View File

@ -115,10 +115,6 @@ func doRun(ctx *context.Context, client client.Client) error {
if group == nil {
return ErrNoDarwin64Build
}
if len(group) > 1 {
log.Info("skipped because due to unexpected group state")
return nil
}
var folder string
for f := range group {
folder = f

View File

@ -85,7 +85,6 @@ func TestFormulaeSimple(t *testing.T) {
}
func TestRunPipe(t *testing.T) {
t.Skip("fix later")
assert := assert.New(t)
folder, err := ioutil.TempDir("", "goreleasertest")
assert.NoError(err)
@ -104,23 +103,24 @@ func TestRunPipe(t *testing.T) {
},
Publish: true,
}
ctx.AddBinary("darwinamd64", "foo", "bar", "baz")
var path = filepath.Join(folder, "bin.tar.gz")
ctx.AddBinary("darwinamd64", "bin", "bin", path)
client := &DummyClient{}
assert.Error(doRun(ctx, client))
assert.False(client.CreatedFile)
_, err = os.Create(filepath.Join(folder, "bin.tar.gz"))
_, err = os.Create(path)
assert.NoError(err)
assert.NoError(doRun(ctx, client))
assert.True(client.CreatedFile)
}
func TestRunPipeFormatOverride(t *testing.T) {
t.Skip("Fix this test later")
assert := assert.New(t)
folder, err := ioutil.TempDir("", "goreleasertest")
assert.NoError(err)
_, err = os.Create(filepath.Join(folder, "bin.zip"))
var path = filepath.Join(folder, "bin.zip")
_, err = os.Create(path)
assert.NoError(err)
var ctx = &context.Context{
Config: config.Project{
@ -143,7 +143,7 @@ func TestRunPipeFormatOverride(t *testing.T) {
},
Publish: true,
}
ctx.AddBinary("darwinamd64", "foo", "bar", "baz")
ctx.AddBinary("darwinamd64", "bin", "bin", path)
client := &DummyClient{}
assert.NoError(doRun(ctx, client))
assert.True(client.CreatedFile)