From 45526108e0330832ab50c7a27a5ed16248d6ad35 Mon Sep 17 00:00:00 2001 From: "WONG, Wing Kam" Date: Sun, 24 Oct 2021 22:17:20 +0800 Subject: [PATCH] Remove use of deprecated io/ioutil Signed-off-by: WONG, Wing Kam --- tests/azure/util_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/azure/util_test.go b/tests/azure/util_test.go index 2eb76188..958b40fd 100644 --- a/tests/azure/util_test.go +++ b/tests/azure/util_test.go @@ -19,7 +19,6 @@ package test import ( "context" "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -49,7 +48,7 @@ const defaultBranch = "main" // getKubernetesCredentials returns a path to a kubeconfig file and a kube client instance. func getKubernetesCredentials(kubeconfig, aksHost, aksCert, aksKey, aksCa string) (string, client.Client, error) { - tmpDir, err := ioutil.TempDir("", "*-azure-e2e") + tmpDir, err := os.MkdirTemp("", "*-azure-e2e") if err != nil { return "", nil, err } @@ -309,7 +308,7 @@ func getRepository(url, branchName string, overrideBranch bool, password string) checkoutBranch = branchName } - tmpDir, err := ioutil.TempDir("", "*-repository") + tmpDir, err := os.MkdirTemp("", "*-repository") if err != nil { return nil, "", err }