1
0
Fork 0
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:
Brian Goff 2017-06-02 11:15:42 -04:00 committed by GitHub
commit 91e0141784
2 changed files with 4 additions and 4 deletions

View file

@ -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 {

View file

@ -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)
}