mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
integration-cli: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -988,7 +988,7 @@ func (s *DockerCLIBuildSuite) TestBuildAddBadLinks(c *testing.T) {
|
||||
c.Fatal(err)
|
||||
}
|
||||
|
||||
err = os.WriteFile(fooPath, []byte("test"), 0666)
|
||||
err = os.WriteFile(fooPath, []byte("test"), 0o666)
|
||||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@ func (s *DockerCLIBuildSuite) TestBuildAddBadLinksVolume(c *testing.T) {
|
||||
defer ctx.Close()
|
||||
fooPath := filepath.Join(ctx.Dir, targetFile)
|
||||
|
||||
err = os.WriteFile(fooPath, []byte("test"), 0666)
|
||||
err = os.WriteFile(fooPath, []byte("test"), 0o666)
|
||||
if err != nil {
|
||||
c.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -2050,7 +2050,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFile(c *testing.T)
|
||||
|
||||
// daemon config file
|
||||
const configFilePath = "test-daemon.json"
|
||||
err := os.WriteFile(configFilePath, []byte(`{ "max-concurrent-downloads" : 8 }`), 0666)
|
||||
err := os.WriteFile(configFilePath, []byte(`{ "max-concurrent-downloads" : 8 }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
defer os.Remove(configFilePath)
|
||||
s.d.Start(c, fmt.Sprintf("--config-file=%s", configFilePath))
|
||||
@@ -2061,7 +2061,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFile(c *testing.T)
|
||||
assert.NilError(c, err)
|
||||
assert.Assert(c, strings.Contains(string(content), expectedMaxConcurrentUploads))
|
||||
assert.Assert(c, strings.Contains(string(content), expectedMaxConcurrentDownloads))
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "max-concurrent-uploads" : 7, "max-concurrent-downloads" : 9 }`), 0666)
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "max-concurrent-uploads" : 7, "max-concurrent-downloads" : 9 }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
|
||||
// unix.Kill(s.d.cmd.Process.Pid, unix.SIGHUP)
|
||||
@@ -2084,7 +2084,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFileReload(c *test
|
||||
|
||||
// daemon config file
|
||||
const configFilePath = "test-daemon.json"
|
||||
err := os.WriteFile(configFilePath, []byte(`{ "max-concurrent-uploads" : null }`), 0666)
|
||||
err := os.WriteFile(configFilePath, []byte(`{ "max-concurrent-uploads" : null }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
defer os.Remove(configFilePath)
|
||||
|
||||
@@ -2096,7 +2096,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFileReload(c *test
|
||||
assert.NilError(c, err)
|
||||
assert.Assert(c, strings.Contains(string(content), expectedMaxConcurrentUploads))
|
||||
assert.Assert(c, strings.Contains(string(content), expectedMaxConcurrentDownloads))
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "max-concurrent-uploads" : 1, "max-concurrent-downloads" : null }`), 0666)
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "max-concurrent-uploads" : 1, "max-concurrent-downloads" : null }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
|
||||
assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
|
||||
@@ -2110,7 +2110,7 @@ func (s *DockerDaemonSuite) TestDaemonMaxConcurrencyWithConfigFileReload(c *test
|
||||
assert.NilError(c, err)
|
||||
assert.Assert(c, strings.Contains(string(content), expectedMaxConcurrentUploads))
|
||||
assert.Assert(c, strings.Contains(string(content), expectedMaxConcurrentDownloads))
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "labels":["foo=bar"] }`), 0666)
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "labels":["foo=bar"] }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
|
||||
assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
|
||||
@@ -2451,13 +2451,13 @@ func (s *DockerDaemonSuite) TestDaemonShutdownTimeoutWithConfigFile(c *testing.T
|
||||
|
||||
// daemon config file
|
||||
const configFilePath = "test-daemon.json"
|
||||
err := os.WriteFile(configFilePath, []byte(`{ "shutdown-timeout" : 8 }`), 0666)
|
||||
err := os.WriteFile(configFilePath, []byte(`{ "shutdown-timeout" : 8 }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
defer os.Remove(configFilePath)
|
||||
|
||||
s.d.Start(c, fmt.Sprintf("--config-file=%s", configFilePath))
|
||||
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "shutdown-timeout" : 5 }`), 0666)
|
||||
err = os.WriteFile(configFilePath, []byte(`{ "shutdown-timeout" : 5 }`), 0o666)
|
||||
assert.NilError(c, err)
|
||||
|
||||
assert.Assert(c, s.d.Signal(unix.SIGHUP) == nil)
|
||||
|
||||
@@ -78,7 +78,6 @@ func RunCommandPipelineWithOutput(cmds ...*exec.Cmd) (output string, err error)
|
||||
if i > 0 {
|
||||
prevCmd := cmds[i-1]
|
||||
cmd.Stdin, err = prevCmd.StdoutPipe()
|
||||
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("cannot set stdout pipe for %s: %v", cmd.Path, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user