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

test: add error handling (#1111)

closes #1047
This commit is contained in:
Grachev Mikhail 2019-08-13 16:28:03 +03:00 committed by Carlos Alexandro Becker
parent 7a2b332554
commit 4100f65d71
2 changed files with 5 additions and 3 deletions

View File

@ -399,8 +399,9 @@ func TestHookEnvs(t *testing.T) {
t.Skip("this fails on travis for some reason")
var shell = `#!/bin/sh -e
touch "$BAR"`
ioutil.WriteFile(filepath.Join(tmp, "test.sh"), []byte(shell), 0750)
var err = runHook(context.New(config.Project{
err := ioutil.WriteFile(filepath.Join(tmp, "test.sh"), []byte(shell), 0750)
assert.NoError(t, err)
err = runHook(context.New(config.Project{
Builds: []config.Build{
build,
},

View File

@ -165,7 +165,8 @@ func testSign(t *testing.T, ctx *context.Context, signaturePaths []string, signa
// create some fake artifacts
var artifacts = []string{"artifact1", "artifact2", "artifact3", "checksum"}
os.Mkdir(filepath.Join(tmpdir, "linux_amd64"), os.ModePerm)
err = os.Mkdir(filepath.Join(tmpdir, "linux_amd64"), os.ModePerm)
assert.NoError(t, err)
for _, f := range artifacts {
file := filepath.Join(tmpdir, f)
assert.NoError(t, ioutil.WriteFile(file, []byte("foo"), 0644))