Skip to content

Commit

Permalink
linter errors fixed
Browse files Browse the repository at this point in the history
Signed-off-by: kimdcottrell <me@kimdcottrell.com>
  • Loading branch information
kimdcottrell committed Oct 28, 2023
1 parent 51cb552 commit 0572e07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions pkg/compose/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,11 +1131,12 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne

if len(networks) == 0 {
// in this instance, n.Name is really an ID
network, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
networks = append(networks, network)
sn, err := s.apiClient().NetworkInspect(ctx, n.Name, moby.NetworkInspectOptions{})
if err != nil {
return err
}
networks = append(networks, sn)

}

// NetworkList API doesn't return the exact name match, so we can retrieve more than one network with a request
Expand Down
8 changes: 5 additions & 3 deletions pkg/e2e/watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ func TestRebuildOnDotEnvWithExternalNetwork(t *testing.T) {
assert.Assert(t, !strings.Contains(res.Combined(), projectName), res.Combined())

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

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

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

Expand Down

0 comments on commit 0572e07

Please sign in to comment.