Formatting the code with https://github.com/mvdan/gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -55,11 +55,11 @@ func setupTestV1(t *testing.T) func() {
|
| 55 | 55 |
ctrl = &authorizationController{}
|
| 56 | 56 |
teardown := setupTest(t) |
| 57 | 57 |
|
| 58 |
- err := os.MkdirAll("/etc/docker/plugins", 0755)
|
|
| 58 |
+ err := os.MkdirAll("/etc/docker/plugins", 0o755)
|
|
| 59 | 59 |
assert.NilError(t, err) |
| 60 | 60 |
|
| 61 | 61 |
fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", testAuthZPlugin)
|
| 62 |
- err = os.WriteFile(fileName, []byte(server.URL), 0644) |
|
| 62 |
+ err = os.WriteFile(fileName, []byte(server.URL), 0o644) |
|
| 63 | 63 |
assert.NilError(t, err) |
| 64 | 64 |
|
| 65 | 65 |
return func() {
|
| ... | ... |
@@ -231,7 +231,7 @@ func TestPluginsWithRuntimes(t *testing.T) {
|
| 231 | 231 |
exec runc $@ |
| 232 | 232 |
`, dir) |
| 233 | 233 |
|
| 234 |
- assert.NilError(t, os.WriteFile(p, []byte(script), 0777)) |
|
| 234 |
+ assert.NilError(t, os.WriteFile(p, []byte(script), 0o777)) |
|
| 235 | 235 |
|
| 236 | 236 |
type config struct {
|
| 237 | 237 |
Runtimes map[string]types.Runtime `json:"runtimes"` |
| ... | ... |
@@ -244,7 +244,7 @@ func TestPluginsWithRuntimes(t *testing.T) {
|
| 244 | 244 |
}, |
| 245 | 245 |
}) |
| 246 | 246 |
configPath := filepath.Join(dir, "config.json") |
| 247 |
- os.WriteFile(configPath, cfg, 0644) |
|
| 247 |
+ os.WriteFile(configPath, cfg, 0o644) |
|
| 248 | 248 |
|
| 249 | 249 |
t.Run("No Args", func(t *testing.T) {
|
| 250 | 250 |
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 |
| 344 | 344 |
respond(w, &graphDriverResponse{Size: size})
|
| 345 | 345 |
}) |
| 346 | 346 |
|
| 347 |
- err = os.MkdirAll("/etc/docker/plugins", 0755)
|
|
| 347 |
+ err = os.MkdirAll("/etc/docker/plugins", 0o755)
|
|
| 348 | 348 |
assert.NilError(t, err) |
| 349 | 349 |
|
| 350 | 350 |
specFile := "/etc/docker/plugins/" + name + "." + ext |
| 351 |
- err = os.WriteFile(specFile, b, 0644) |
|
| 351 |
+ err = os.WriteFile(specFile, b, 0o644) |
|
| 352 | 352 |
assert.NilError(t, err) |
| 353 | 353 |
} |
| 354 | 354 |
|