1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00

test: fix

This commit is contained in:
Carlos Alexandro Becker 2023-09-13 17:02:34 +00:00
parent 01a93b4329
commit dbec7054ea
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -59,7 +59,7 @@ func TestRunOutsideGoModule(t *testing.T) {
require.Empty(t, ctx.ModulePath)
}
func TestRunOldGoVersion(t *testing.T) {
func TestRunCommandError(t *testing.T) {
ctx := testctx.NewWithCfg(config.Project{
GoMod: config.GoMod{
GoBinary: "not-a-valid-binary",
@ -73,11 +73,11 @@ func TestRunOldGoVersion(t *testing.T) {
require.Empty(t, ctx.ModulePath)
}
func TestRunCommandError(t *testing.T) {
func TestRunOldGoVersion(t *testing.T) {
bin := filepath.Join(t.TempDir(), "go.bin")
require.NoError(t, os.WriteFile(
bin,
[]byte(`#!/bin/sh\necho "flag provided but not defined: -m"\nexit 1`),
[]byte("#!/bin/sh\necho \"flag provided but not defined: -m\"\nexit 1"),
0o755,
))
ctx := testctx.NewWithCfg(config.Project{