integration: format code with gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
79f5aac2d0
commit
07e6b0ac70
5 changed files with 10 additions and 12 deletions
|
@ -700,7 +700,7 @@ func TestBuildPlatformInvalid(t *testing.T) {
|
|||
func writeTarRecord(t *testing.T, w *tar.Writer, fn, contents string) {
|
||||
err := w.WriteHeader(&tar.Header{
|
||||
Name: fn,
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
Size: int64(len(contents)),
|
||||
Typeflag: '0',
|
||||
})
|
||||
|
|
|
@ -100,9 +100,7 @@ func TestNoNewPrivileges(t *testing.T) {
|
|||
}
|
||||
if stdErr != tc.stdErr {
|
||||
t.Fatalf("test produced invalid error: %q, expected %q. Stdout:%q", stdErr, tc.stdErr, stdOut)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -268,7 +268,7 @@ func TestTemplatedConfig(t *testing.T) {
|
|||
Name: "templated_config",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
},
|
||||
ConfigID: templatedConfig.ID,
|
||||
ConfigName: templatedConfigName,
|
||||
|
@ -280,7 +280,7 @@ func TestTemplatedConfig(t *testing.T) {
|
|||
Name: "referencedconfigtarget",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
},
|
||||
ConfigID: referencedConfig.ID,
|
||||
ConfigName: referencedConfigName,
|
||||
|
@ -292,7 +292,7 @@ func TestTemplatedConfig(t *testing.T) {
|
|||
Name: "referencedsecrettarget",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
},
|
||||
SecretID: referencedSecret.ID,
|
||||
SecretName: referencedSecretName,
|
||||
|
|
|
@ -155,7 +155,7 @@ func TestConfigDaemonSeccompProfiles(t *testing.T) {
|
|||
d.Stop(t)
|
||||
|
||||
cfg := filepath.Join(d.RootDir(), "daemon.json")
|
||||
err := os.WriteFile(cfg, []byte(`{"seccomp-profile": "`+tc.profile+`"}`), 0644)
|
||||
err := os.WriteFile(cfg, []byte(`{"seccomp-profile": "`+tc.profile+`"}`), 0o644)
|
||||
assert.NilError(t, err)
|
||||
|
||||
d.Start(t, "--config-file", cfg)
|
||||
|
@ -285,7 +285,7 @@ func TestDaemonProxy(t *testing.T) {
|
|||
|
||||
configFile := filepath.Join(d.RootDir(), "daemon.json")
|
||||
configJSON := fmt.Sprintf(`{"proxies":{"http-proxy":%[1]q, "https-proxy": %[1]q, "no-proxy": "example.com"}}`, proxyServer.URL)
|
||||
assert.NilError(t, os.WriteFile(configFile, []byte(configJSON), 0644))
|
||||
assert.NilError(t, os.WriteFile(configFile, []byte(configJSON), 0o644))
|
||||
|
||||
d.Start(t, "--iptables=false", "--config-file", configFile)
|
||||
defer d.Stop(t)
|
||||
|
@ -327,7 +327,7 @@ func TestDaemonProxy(t *testing.T) {
|
|||
|
||||
configFile := filepath.Join(d.RootDir(), "daemon.json")
|
||||
configJSON := fmt.Sprintf(`{"proxies":{"http-proxy":%[1]q, "https-proxy": %[1]q, "no-proxy": "example.com"}}`, proxyRawURL)
|
||||
assert.NilError(t, os.WriteFile(configFile, []byte(configJSON), 0644))
|
||||
assert.NilError(t, os.WriteFile(configFile, []byte(configJSON), 0o644))
|
||||
|
||||
err := d.StartWithError("--http-proxy", proxyRawURL, "--https-proxy", proxyRawURL, "--no-proxy", "example.com", "--config-file", configFile, "--validate")
|
||||
assert.ErrorContains(t, err, "daemon exited during startup")
|
||||
|
|
|
@ -277,7 +277,7 @@ func TestTemplatedSecret(t *testing.T) {
|
|||
Name: "templated_secret",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
},
|
||||
SecretID: templatedSecret.ID,
|
||||
SecretName: templatedSecretName,
|
||||
|
@ -289,7 +289,7 @@ func TestTemplatedSecret(t *testing.T) {
|
|||
Name: "referencedconfigtarget",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
},
|
||||
ConfigID: referencedConfig.ID,
|
||||
ConfigName: referencedConfigName,
|
||||
|
@ -301,7 +301,7 @@ func TestTemplatedSecret(t *testing.T) {
|
|||
Name: "referencedsecrettarget",
|
||||
UID: "0",
|
||||
GID: "0",
|
||||
Mode: 0600,
|
||||
Mode: 0o600,
|
||||
},
|
||||
SecretID: referencedSecret.ID,
|
||||
SecretName: referencedSecretName,
|
||||
|
|
Loading…
Reference in a new issue