Skip to content

Commit 616bba0

Browse files
kimdcottrellndeloof
authored andcommitted
linter errors fixed
Signed-off-by: kimdcottrell <[email protected]>
1 parent ee6e3c2 commit 616bba0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pkg/compose/create.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,11 +1131,12 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne
11311131

11321132
if len(networks) == 0 {
11331133
// in this instance, n.Name is really an ID
1134-
network, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
1135-
networks = append(networks, network)
1134+
sn, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
11361135
if err != nil {
11371136
return err
11381137
}
1138+
networks = append(networks, sn)
1139+
11391140
}
11401141

11411142
// NetworkList API doesn't return the exact name match, so we can retrieve more than one network with a request

pkg/e2e/watch_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ func TestRebuildOnDotEnvWithExternalNetwork(t *testing.T) {
8080
assert.Assert(t, !strings.Contains(res.Combined(), projectName), res.Combined())
8181

8282
t.Log("create a dotenv file that will be used to trigger the rebuild")
83-
os.WriteFile(dotEnvFilepath, []byte("HELLO=WORLD"), 0666)
84-
_, err := os.ReadFile(dotEnvFilepath)
83+
err := os.WriteFile(dotEnvFilepath, []byte("HELLO=WORLD"), 0o666)
84+
assert.NilError(t, err)
85+
_, err = os.ReadFile(dotEnvFilepath)
8586
assert.NilError(t, err)
8687

8788
// TODO: refactor this duplicated code into frameworks? Maybe?
@@ -114,7 +115,8 @@ func TestRebuildOnDotEnvWithExternalNetwork(t *testing.T) {
114115
assert.Equal(t, pn.Stdout(), n.Stdout())
115116

116117
t.Log("create a dotenv file that will be used to trigger the rebuild")
117-
os.WriteFile(dotEnvFilepath, []byte("HELLO=WORLD\nTEST=REBUILD"), 0666)
118+
err = os.WriteFile(dotEnvFilepath, []byte("HELLO=WORLD\nTEST=REBUILD"), 0o666)
119+
assert.NilError(t, err)
118120
_, err = os.ReadFile(dotEnvFilepath)
119121
assert.NilError(t, err)
120122

0 commit comments

Comments
 (0)