Skip to content

Commit

Permalink
replace deprecated ioutil func from render_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
stlaz committed Aug 10, 2023
1 parent bce6bf1 commit c2bf60f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cmd/render/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package render
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -83,7 +82,7 @@ func runRender(args ...string) (*cobra.Command, error) {
}

func setupAssetOutputDir(testName string) (teardown func(), outputDir string, err error) {
outputDir, err = ioutil.TempDir("", testName)
outputDir, err = os.MkdirTemp("", testName)
if err != nil {
return nil, "", err
}
Expand Down Expand Up @@ -418,7 +417,7 @@ func TestRenderCommand(t *testing.T) {
t.Errorf("file %q: %v", f, err)
}
if file, ok := test.expectedContents[f]; ok {
data, err := ioutil.ReadFile(p)
data, err := os.ReadFile(p)
if err != nil {
t.Errorf("error reading file %s: %v", p, err)
continue
Expand Down

0 comments on commit c2bf60f

Please sign in to comment.