mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-19 12:12:26 +02:00
chore: simplify test
This commit is contained in:
parent
74a9317c83
commit
b9cca21b7a
@ -22,22 +22,12 @@ func TestRun(t *testing.T) {
|
|||||||
|
|
||||||
func TestRunGoWork(t *testing.T) {
|
func TestRunGoWork(t *testing.T) {
|
||||||
dir := testlib.Mktmp(t)
|
dir := testlib.Mktmp(t)
|
||||||
require.NoError(t, os.WriteFile(
|
|
||||||
filepath.Join(dir, "main.go"),
|
|
||||||
[]byte("package main\nfunc main() {println(0)}"),
|
|
||||||
0o666,
|
|
||||||
))
|
|
||||||
require.NoError(t, os.WriteFile(
|
require.NoError(t, os.WriteFile(
|
||||||
filepath.Join(dir, "go.mod"),
|
filepath.Join(dir, "go.mod"),
|
||||||
[]byte("module a"),
|
[]byte("module a"),
|
||||||
0o666,
|
0o666,
|
||||||
))
|
))
|
||||||
require.NoError(t, os.Mkdir(filepath.Join(dir, "b"), 0o755))
|
require.NoError(t, os.Mkdir(filepath.Join(dir, "b"), 0o755))
|
||||||
require.NoError(t, os.WriteFile(
|
|
||||||
filepath.Join(dir, "b", "main.go"),
|
|
||||||
[]byte("package main\nfunc main() {println(1)}"),
|
|
||||||
0o666,
|
|
||||||
))
|
|
||||||
require.NoError(t, os.WriteFile(
|
require.NoError(t, os.WriteFile(
|
||||||
filepath.Join(dir, "b", "go.mod"),
|
filepath.Join(dir, "b", "go.mod"),
|
||||||
[]byte("module a/b"),
|
[]byte("module a/b"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user