Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcontainer/configs/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ exit 0
verifyCommand := fmt.Sprintf(verifyCommandTemplate, stateJson)
filename := "/tmp/runc-hooktest.sh"
os.Remove(filename)
if err := ioutil.WriteFile(filename, []byte(verifyCommand), 0700); err != nil {
if err := ioutil.WriteFile(filename, []byte(verifyCommand), 0o700); err != nil {
t.Fatalf("Failed to create tmp file: %v", err)
}
defer os.Remove(filename)
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/integration/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ func TestHook(t *testing.T) {
}

// write config of json format into config.json under bundle
f, err := os.OpenFile(filepath.Join(bundle, "config.json"), os.O_CREATE|os.O_RDWR, 0644)
f, err := os.OpenFile(filepath.Join(bundle, "config.json"), os.O_CREATE|os.O_RDWR, 0o644)
ok(t, err)
ok(t, json.NewEncoder(f).Encode(config))

Expand Down
6 changes: 3 additions & 3 deletions libcontainer/integration/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func newTestRoot() (string, error) {
if err != nil {
return "", err
}
if err := os.MkdirAll(dir, 0700); err != nil {
if err := os.MkdirAll(dir, 0o700); err != nil {
return "", err
}
testRoots = append(testRoots, dir)
Expand All @@ -117,7 +117,7 @@ func newTestBundle() (string, error) {
if err != nil {
return "", err
}
if err := os.MkdirAll(dir, 0700); err != nil {
if err := os.MkdirAll(dir, 0o700); err != nil {
return "", err
}
return dir, nil
Expand All @@ -129,7 +129,7 @@ func newRootfs() (string, error) {
if err != nil {
return "", err
}
if err := os.MkdirAll(dir, 0700); err != nil {
if err := os.MkdirAll(dir, 0o700); err != nil {
return "", err
}
if err := copyBusybox(dir); err != nil {
Expand Down