mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
deps: Update ioutil deprecated library references to os and io respectively in the client package (#16318)
* Update ioutil deprecated library references to os and io respectively * Deal with the errors produced. Add error handling to filEntry info Add error handling to info
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -46,7 +45,7 @@ func writeTmp(t *testing.T, s string, fm os.FileMode) string {
|
||||
dir := t.TempDir()
|
||||
|
||||
fPath := filepath.Join(dir, sidsTokenFile)
|
||||
err := ioutil.WriteFile(fPath, []byte(s), fm)
|
||||
err := os.WriteFile(fPath, []byte(s), fm)
|
||||
require.NoError(t, err)
|
||||
|
||||
return dir
|
||||
@@ -358,7 +357,7 @@ func TestEnvoyBootstrapHook_with_SI_token(t *testing.T) {
|
||||
// Insert service identity token in the secrets directory
|
||||
token := uuid.Generate()
|
||||
siTokenFile := filepath.Join(req.TaskDir.SecretsDir, sidsTokenFile)
|
||||
err = ioutil.WriteFile(siTokenFile, []byte(token), 0440)
|
||||
err = os.WriteFile(siTokenFile, []byte(token), 0440)
|
||||
require.NoError(t, err)
|
||||
|
||||
resp := &interfaces.TaskPrestartResponse{}
|
||||
|
||||
Reference in New Issue
Block a user