diff --git a/command_test.go b/command_test.go index b517f64..750afd0 100644 --- a/command_test.go +++ b/command_test.go @@ -1,6 +1,7 @@ package compositeactionlint import ( + "bytes" "testing" "github.com/stretchr/testify/assert" @@ -18,9 +19,12 @@ func TestCommandMain_Ok(t *testing.T) { for _, filepath := range files { t.Run(filepath, func(t *testing.T) { - c := Command{Stdout: t.Output(), Stderr: t.Output()} + // Replace with t.Output() from go 1.25 + var testOut bytes.Buffer + c := Command{Stdout: &testOut, Stderr: &testOut} exitCode := c.Main([]string{argv0, filepath}) + t.Log(testOut.String()) assert.Equal(t, 0, exitCode) }) } @@ -35,9 +39,12 @@ func TestCommandMain_BadActions(t *testing.T) { for _, filepath := range files { t.Run(filepath, func(t *testing.T) { - c := Command{Stdout: t.Output(), Stderr: t.Output()} + // Replace with t.Output() from go 1.25 + var testOut bytes.Buffer + c := Command{Stdout: &testOut, Stderr: &testOut} exitCode := c.Main([]string{argv0, filepath}) + t.Log(testOut.String()) assert.Equal(t, 1, exitCode) }) } diff --git a/go.mod b/go.mod index fa5cf28..5b1f5b5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bettermarks/composite-action-lint -go 1.25.0 +go 1.24.0 require ( github.com/rhysd/actionlint v1.7.7