diff --git a/integration/integrationtest/docker.go b/integration/integrationtest/docker.go index 5b76b57..23177ae 100644 --- a/integration/integrationtest/docker.go +++ b/integration/integrationtest/docker.go @@ -333,14 +333,6 @@ func EnvVar(k, v string) string { return fmt.Sprintf("%s=%s", k, v) } -func WriteFile(t *testing.T, path, contents string) { - t.Helper() - - //nolint:gosec - err := os.WriteFile(path, []byte(contents), 0644) - require.NoError(t, err) -} - func DockerBridgeIP(t testing.TB) string { t.Helper() @@ -512,6 +504,7 @@ func (t *testWriter) Write(b []byte) (int, error) { t.t.Logf("%s", b) return len(b), nil } + func BindMount(src, dst string, ro bool) docker.HostMount { return docker.HostMount{ Source: src, diff --git a/integration/integrationtest/os.go b/integration/integrationtest/os.go index 4db1b28..45aacd7 100644 --- a/integration/integrationtest/os.go +++ b/integration/integrationtest/os.go @@ -24,7 +24,15 @@ func MkdirAll(t testing.TB, elem ...string) string { t.Helper() path := filepath.Join(elem...) - err := os.MkdirAll(path, 0777) + err := os.MkdirAll(path, 0o777) require.NoError(t, err) return path } + +func WriteFile(t *testing.T, path, contents string) { + t.Helper() + + //nolint:gosec + err := os.WriteFile(path, []byte(contents), 0o644) + require.NoError(t, err) +}