Skip to content

Commit b5b2258

Browse files
committed
fmt
1 parent 47b5af8 commit b5b2258

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

integration/integrationtest/docker.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,6 @@ func EnvVar(k, v string) string {
333333
return fmt.Sprintf("%s=%s", k, v)
334334
}
335335

336-
func WriteFile(t *testing.T, path, contents string) {
337-
t.Helper()
338-
339-
//nolint:gosec
340-
err := os.WriteFile(path, []byte(contents), 0644)
341-
require.NoError(t, err)
342-
}
343-
344336
func DockerBridgeIP(t testing.TB) string {
345337
t.Helper()
346338

@@ -512,6 +504,7 @@ func (t *testWriter) Write(b []byte) (int, error) {
512504
t.t.Logf("%s", b)
513505
return len(b), nil
514506
}
507+
515508
func BindMount(src, dst string, ro bool) docker.HostMount {
516509
return docker.HostMount{
517510
Source: src,

integration/integrationtest/os.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ func MkdirAll(t testing.TB, elem ...string) string {
2424
t.Helper()
2525

2626
path := filepath.Join(elem...)
27-
err := os.MkdirAll(path, 0777)
27+
err := os.MkdirAll(path, 0o777)
2828
require.NoError(t, err)
2929
return path
3030
}
31+
32+
func WriteFile(t *testing.T, path, contents string) {
33+
t.Helper()
34+
35+
//nolint:gosec
36+
err := os.WriteFile(path, []byte(contents), 0o644)
37+
require.NoError(t, err)
38+
}

0 commit comments

Comments
 (0)