Stop using deprecated ioutil functions

This commit is contained in:
Katrina Verey
2022-08-10 16:59:18 -04:00
parent 416eed97c4
commit f6b72077c8
70 changed files with 322 additions and 362 deletions

View File

@@ -5,7 +5,7 @@ package krmfunction
import (
"bytes"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"testing"
@@ -116,7 +116,7 @@ func TestTransformerConverter(t *testing.T) {
t.Skip("TODO: fix this test, which was not running in CI and does not pass")
dir := t.TempDir()
err := ioutil.WriteFile(filepath.Join(dir, "Plugin.go"),
err := os.WriteFile(filepath.Join(dir, "Plugin.go"),
getTransformerCode(), 0644)
require.NoError(t, err)
@@ -214,7 +214,7 @@ func TestGeneratorConverter(t *testing.T) {
t.Skip("TODO: fix this test, which was not running in CI and does not pass")
dir := t.TempDir()
err := ioutil.WriteFile(filepath.Join(dir, "Plugin.go"),
err := os.WriteFile(filepath.Join(dir, "Plugin.go"),
getGeneratorCode(), 0644)
require.NoError(t, err)