1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

integration-cli: fix incorrect permissions (staticcheck)

```
13:06:14 integration-cli/docker_api_containers_test.go:1983:72: SA9002: file mode '666' evaluates to 01232; did you mean '0666'? (staticcheck)
13:06:14 	err = ioutil.WriteFile(filepath.Join(tmpDir, "bar"), []byte("hello"), 666)
13:06:14 integration-cli/fixtures_linux_daemon_test.go:64:46: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck)
13:06:14 	err = ioutil.WriteFile(dockerFile, content, 600)
13:06:14 	                                            ^
13:06:14 integration-cli/fixtures_linux_daemon_test.go:119:54: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck)
13:06:14 	err = ioutil.WriteFile(dockerfile, []byte(content), 600)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-08-05 15:28:25 +02:00
parent b639f933e1
commit fdc1b22030
2 changed files with 3 additions and 3 deletions

View File

@ -1941,7 +1941,7 @@ func (s *DockerSuite) TestContainerAPICreateMountsBindRead(c *testing.T) {
tmpDir, err := ioutil.TempDir("", "test-mounts-api-bind")
assert.NilError(c, err)
defer os.RemoveAll(tmpDir)
err = ioutil.WriteFile(filepath.Join(tmpDir, "bar"), []byte("hello"), 666)
err = ioutil.WriteFile(filepath.Join(tmpDir, "bar"), []byte("hello"), 0666)
assert.NilError(c, err)
config := containertypes.Config{
Image: "busybox",