mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Remove ioutil from auth plugin
Signed-off-by: inosato <si17_21@yahoo.co.jp>
This commit is contained in:
parent
3902a53419
commit
1a1ad16a5a
@ -17,7 +17,6 @@ limitations under the License.
|
||||
package bootstrappolicy_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@ -225,7 +224,7 @@ func TestBootstrapControllerRoleBindings(t *testing.T) {
|
||||
|
||||
func testObjects(t *testing.T, list *api.List, fixtureFilename string) {
|
||||
filename := filepath.Join("testdata", fixtureFilename)
|
||||
expectedYAML, err := ioutil.ReadFile(filename)
|
||||
expectedYAML, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -247,7 +246,7 @@ func testObjects(t *testing.T, list *api.List, fixtureFilename string) {
|
||||
|
||||
const updateEnvVar = "UPDATE_BOOTSTRAP_POLICY_FIXTURE_DATA"
|
||||
if os.Getenv(updateEnvVar) == "true" {
|
||||
if err := ioutil.WriteFile(filename, []byte(yamlData), os.FileMode(0755)); err == nil {
|
||||
if err := os.WriteFile(filename, []byte(yamlData), os.FileMode(0755)); err == nil {
|
||||
t.Logf("Updated data in %s", filename)
|
||||
t.Logf("Verify the diff, commit changes, and rerun the tests")
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user