integration/plugin: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
9bd3e011e1
commit
bb5ace2efb
8 changed files with 11 additions and 17 deletions
|
@ -55,11 +55,11 @@ func setupTestV1(t *testing.T) func() {
|
|||
ctrl = &authorizationController{}
|
||||
teardown := setupTest(t)
|
||||
|
||||
err := os.MkdirAll("/etc/docker/plugins", 0755)
|
||||
err := os.MkdirAll("/etc/docker/plugins", 0o755)
|
||||
assert.NilError(t, err)
|
||||
|
||||
fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", testAuthZPlugin)
|
||||
err = os.WriteFile(fileName, []byte(server.URL), 0644)
|
||||
err = os.WriteFile(fileName, []byte(server.URL), 0o644)
|
||||
assert.NilError(t, err)
|
||||
|
||||
return func() {
|
||||
|
|
|
@ -231,7 +231,7 @@ func TestPluginsWithRuntimes(t *testing.T) {
|
|||
exec runc $@
|
||||
`, dir)
|
||||
|
||||
assert.NilError(t, os.WriteFile(p, []byte(script), 0777))
|
||||
assert.NilError(t, os.WriteFile(p, []byte(script), 0o777))
|
||||
|
||||
type config struct {
|
||||
Runtimes map[string]types.Runtime `json:"runtimes"`
|
||||
|
@ -244,7 +244,7 @@ func TestPluginsWithRuntimes(t *testing.T) {
|
|||
},
|
||||
})
|
||||
configPath := filepath.Join(dir, "config.json")
|
||||
os.WriteFile(configPath, cfg, 0644)
|
||||
os.WriteFile(configPath, cfg, 0o644)
|
||||
|
||||
t.Run("No Args", func(t *testing.T) {
|
||||
d.Restart(t, "--default-runtime=myrt", "--config-file="+configPath)
|
||||
|
|
|
@ -344,11 +344,11 @@ func setupPlugin(t *testing.T, ec map[string]*graphEventsCounter, ext string, mu
|
|||
respond(w, &graphDriverResponse{Size: size})
|
||||
})
|
||||
|
||||
err = os.MkdirAll("/etc/docker/plugins", 0755)
|
||||
err = os.MkdirAll("/etc/docker/plugins", 0o755)
|
||||
assert.NilError(t, err)
|
||||
|
||||
specFile := "/etc/docker/plugins/" + name + "." + ext
|
||||
err = os.WriteFile(specFile, b, 0644)
|
||||
err = os.WriteFile(specFile, b, 0o644)
|
||||
assert.NilError(t, err)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,7 @@ import (
|
|||
"github.com/docker/docker/testutil/environment"
|
||||
)
|
||||
|
||||
var (
|
||||
testEnv *environment.Execution
|
||||
)
|
||||
var testEnv *environment.Execution
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
var err error
|
||||
|
|
|
@ -27,7 +27,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
f, err := os.OpenFile(startReq.File, os.O_RDONLY, 0600)
|
||||
f, err := os.OpenFile(startReq.File, os.O_RDONLY, 0o600)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
|
|
@ -37,7 +37,7 @@ func handle(mux *http.ServeMux) {
|
|||
return
|
||||
}
|
||||
|
||||
f, err := os.OpenFile(req.File, syscall.O_RDONLY, 0700)
|
||||
f, err := os.OpenFile(req.File, syscall.O_RDONLY, 0o700)
|
||||
if err != nil {
|
||||
respond(err, w)
|
||||
}
|
||||
|
|
|
@ -8,9 +8,7 @@ import (
|
|||
"github.com/docker/docker/testutil/environment"
|
||||
)
|
||||
|
||||
var (
|
||||
testEnv *environment.Execution
|
||||
)
|
||||
var testEnv *environment.Execution
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
var err error
|
||||
|
|
|
@ -8,9 +8,7 @@ import (
|
|||
"github.com/docker/docker/testutil/environment"
|
||||
)
|
||||
|
||||
var (
|
||||
testEnv *environment.Execution
|
||||
)
|
||||
var testEnv *environment.Execution
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
var err error
|
||||
|
|
Loading…
Add table
Reference in a new issue