mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #33485 from tpot/33484-fix-file-perm-octal
Use octal values for file mode in filenotify poller and sysinfo_linux tests
This commit is contained in:
commit
91e0141784
2 changed files with 4 additions and 4 deletions
|
@ -61,7 +61,7 @@ func TestPollerEvent(t *testing.T) {
|
|||
default:
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(f.Name(), []byte("hello"), 644); err != nil {
|
||||
if err := ioutil.WriteFile(f.Name(), []byte("hello"), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := assertEvent(w, fsnotify.Write); err != nil {
|
||||
|
|
|
@ -16,7 +16,7 @@ func TestReadProcBool(t *testing.T) {
|
|||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
procFile := filepath.Join(tmpDir, "read-proc-bool")
|
||||
if err := ioutil.WriteFile(procFile, []byte("1"), 644); err != nil {
|
||||
if err := ioutil.WriteFile(procFile, []byte("1"), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ func TestReadProcBool(t *testing.T) {
|
|||
t.Fatal("expected proc bool to be true, got false")
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(procFile, []byte("0"), 644); err != nil {
|
||||
if err := ioutil.WriteFile(procFile, []byte("0"), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if readProcBool(procFile) {
|
||||
|
@ -48,7 +48,7 @@ func TestCgroupEnabled(t *testing.T) {
|
|||
t.Fatal("cgroupEnabled should be false")
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(path.Join(cgroupDir, "test"), []byte{}, 644); err != nil {
|
||||
if err := ioutil.WriteFile(path.Join(cgroupDir, "test"), []byte{}, 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue