Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sreya committed Aug 28, 2024
1 parent 47b5af8 commit b5b2258
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 1 addition & 8 deletions integration/integrationtest/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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,
Expand Down
10 changes: 9 additions & 1 deletion integration/integrationtest/os.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit b5b2258

Please sign in to comment.