mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +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:
@@ -3,7 +3,6 @@ package allocrunner
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync/atomic"
|
||||
@@ -1680,10 +1679,10 @@ func TestAllocRunner_MoveAllocDir(t *testing.T) {
|
||||
// Step 2. Modify its directory
|
||||
task := alloc.Job.TaskGroups[0].Tasks[0]
|
||||
dataFile := filepath.Join(ar.allocDir.SharedDir, "data", "data_file")
|
||||
ioutil.WriteFile(dataFile, []byte("hello world"), os.ModePerm)
|
||||
os.WriteFile(dataFile, []byte("hello world"), os.ModePerm)
|
||||
taskDir := ar.allocDir.TaskDirs[task.Name]
|
||||
taskLocalFile := filepath.Join(taskDir.LocalDir, "local_file")
|
||||
ioutil.WriteFile(taskLocalFile, []byte("good bye world"), os.ModePerm)
|
||||
os.WriteFile(taskLocalFile, []byte("good bye world"), os.ModePerm)
|
||||
|
||||
// Step 3. Start a new alloc
|
||||
alloc2 := mock.BatchAlloc()
|
||||
|
||||
Reference in New Issue
Block a user