You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-15 01:34:21 +02:00
refactor(test): use testing.TB Cleanup and Tempdir (#1945)
* refactor: use t.Cleanup instead of defer Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * refactor: use t.Cleanup instead of defer Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * refactor: use t.Cleanup instead of defer Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * refactor: use t.Cleanup instead of defer Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: filepath Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4c3e3933a8
commit
92f52ac406
@ -122,8 +122,7 @@ func TestPipe_PublishExtraFiles(t *testing.T) {
|
||||
func pipePublish(t *testing.T, extra []config.ExtraFile) {
|
||||
gcloudCredentials, _ := filepath.Abs("./testdata/credentials.json")
|
||||
|
||||
folder, err := ioutil.TempDir("", "goreleasertest")
|
||||
require.NoError(t, err)
|
||||
var folder = t.TempDir()
|
||||
tgzpath := filepath.Join(folder, "bin.tar.gz")
|
||||
debpath := filepath.Join(folder, "bin.deb")
|
||||
require.NoError(t, ioutil.WriteFile(tgzpath, []byte("fake\ntargz"), 0744))
|
||||
|
Reference in New Issue
Block a user