Browse Source

volume/local fix file permissions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 6 years ago
parent
commit
ad95c6315d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      volume/local/local_test.go

+ 3 - 3
volume/local/local_test.go

@@ -149,7 +149,7 @@ func TestCreate(t *testing.T) {
 		}
 		}
 	}
 	}
 
 
-	r, err = New(rootDir, idtools.Identity{UID: os.Geteuid(), GID: os.Getegid()})
+	_, err = New(rootDir, idtools.Identity{UID: os.Geteuid(), GID: os.Getegid()})
 	if err != nil {
 	if err != nil {
 		t.Fatal(err)
 		t.Fatal(err)
 	}
 	}
@@ -295,7 +295,7 @@ func TestRelaodNoOpts(t *testing.T) {
 		t.Fatal(err)
 		t.Fatal(err)
 	}
 	}
 	// make sure a file with `null` (.e.g. empty opts map from older daemon) is ok
 	// make sure a file with `null` (.e.g. empty opts map from older daemon) is ok
-	if err := ioutil.WriteFile(filepath.Join(rootDir, "test2"), []byte("null"), 600); err != nil {
+	if err := ioutil.WriteFile(filepath.Join(rootDir, "test2"), []byte("null"), 0600); err != nil {
 		t.Fatal(err)
 		t.Fatal(err)
 	}
 	}
 
 
@@ -303,7 +303,7 @@ func TestRelaodNoOpts(t *testing.T) {
 		t.Fatal(err)
 		t.Fatal(err)
 	}
 	}
 	// make sure an empty opts file doesn't break us too
 	// make sure an empty opts file doesn't break us too
-	if err := ioutil.WriteFile(filepath.Join(rootDir, "test3"), nil, 600); err != nil {
+	if err := ioutil.WriteFile(filepath.Join(rootDir, "test3"), nil, 0600); err != nil {
 		t.Fatal(err)
 		t.Fatal(err)
 	}
 	}