Skip to content
Snippets Groups Projects
Commit 45526108 authored by WONG, Wing Kam's avatar WONG, Wing Kam
Browse files

Remove use of deprecated io/ioutil

parent 414c0bbb
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,6 @@ package test ...@@ -19,7 +19,6 @@ package test
import ( import (
"context" "context"
"fmt" "fmt"
"io/ioutil"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
...@@ -49,7 +48,7 @@ const defaultBranch = "main" ...@@ -49,7 +48,7 @@ const defaultBranch = "main"
// getKubernetesCredentials returns a path to a kubeconfig file and a kube client instance. // 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) { 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 { if err != nil {
return "", nil, err return "", nil, err
} }
...@@ -309,7 +308,7 @@ func getRepository(url, branchName string, overrideBranch bool, password string) ...@@ -309,7 +308,7 @@ func getRepository(url, branchName string, overrideBranch bool, password string)
checkoutBranch = branchName checkoutBranch = branchName
} }
tmpDir, err := ioutil.TempDir("", "*-repository") tmpDir, err := os.MkdirTemp("", "*-repository")
if err != nil { if err != nil {
return nil, "", err return nil, "", err
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment