Use octal values for file mode in filenotify poller and sysinfo_linux tests
Closes #33484. Signed-off-by: Tim Potter <tpot@hpe.com> Upstream-commit: c35ea6b2cda8ac68f2b4a9f6471ca7e09865a6ee Component: engine
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user