diff --git a/internal/gojunitreport/go-junit-report_test.go b/internal/gojunitreport/go-junit-report_test.go index 97db5171..a44d67f4 100644 --- a/internal/gojunitreport/go-junit-report_test.go +++ b/internal/gojunitreport/go-junit-report_test.go @@ -4,6 +4,7 @@ import ( "bytes" "flag" "fmt" + "io/ioutil" "os" "path/filepath" "regexp" @@ -57,7 +58,7 @@ func testRun(inputFile, reportFile string, config Config, t *testing.T) { } defer input.Close() - wantReport, err := os.ReadFile(reportFile) + wantReport, err := ioutil.ReadFile(reportFile) if os.IsNotExist(err) { t.Skipf("Skipping test with missing report file: %s", reportFile) } else if err != nil { diff --git a/parser/gotest/json_test.go b/parser/gotest/json_test.go index abe1af8c..85b41773 100644 --- a/parser/gotest/json_test.go +++ b/parser/gotest/json_test.go @@ -2,6 +2,7 @@ package gotest import ( "io" + "io/ioutil" "strings" "testing" @@ -15,7 +16,7 @@ var input = `some other output func TestJSONReaderReadAll(t *testing.T) { r := newJSONReader(strings.NewReader(input)) - got, err := io.ReadAll(r) + got, err := ioutil.ReadAll(r) if err != nil { t.Fatal(err) }