mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05: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:
parent
b639f933e1
commit
fdc1b22030
2 changed files with 3 additions and 3 deletions
|
@ -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",
|
||||
|
|
|
@ -61,7 +61,7 @@ func ensureSyscallTest(c *testing.T) {
|
|||
FROM debian:jessie
|
||||
COPY . /usr/bin/
|
||||
`)
|
||||
err = ioutil.WriteFile(dockerFile, content, 600)
|
||||
err = ioutil.WriteFile(dockerFile, content, 0600)
|
||||
assert.NilError(c, err)
|
||||
|
||||
var buildArgs []string
|
||||
|
@ -116,7 +116,7 @@ func ensureNNPTest(c *testing.T) {
|
|||
COPY . /usr/bin
|
||||
RUN chmod +s /usr/bin/nnp-test
|
||||
`
|
||||
err = ioutil.WriteFile(dockerfile, []byte(content), 600)
|
||||
err = ioutil.WriteFile(dockerfile, []byte(content), 0600)
|
||||
assert.NilError(c, err, "could not write Dockerfile for nnp-test image")
|
||||
|
||||
var buildArgs []string
|
||||
|
|
Loading…
Reference in a new issue