From 5b1522095b543eb439a2ceaadb34b251c11a1f38 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Tue, 16 Jun 2020 10:59:40 +0200 Subject: [PATCH] Fix linter Signed-off-by: Ulysses Souza --- azure/convert/convert.go | 1 + cli/cmd/inspect.go | 3 +++ tests/e2e/e2e_test.go | 3 +-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/azure/convert/convert.go b/azure/convert/convert.go index 1ff9b413d..8bdbf2d0f 100644 --- a/azure/convert/convert.go +++ b/azure/convert/convert.go @@ -228,6 +228,7 @@ func (s serviceConfigAciHelper) getAciContainer(volumesCache map[string]bool) (c } +// ContainerGroupToContainer composes a Container from an ACI container definition func ContainerGroupToContainer(containerID string, cg containerinstance.ContainerGroup, cc containerinstance.Container) (containers.Container, error) { memLimits := -1. if cc.Resources != nil && diff --git a/cli/cmd/inspect.go b/cli/cmd/inspect.go index 48fd1674d..60f897d82 100644 --- a/cli/cmd/inspect.go +++ b/cli/cmd/inspect.go @@ -37,6 +37,9 @@ func runInspect(ctx context.Context, id string) error { } b, err := json.MarshalIndent(container, "", " ") + if err != nil { + return err + } containerString := string(b) fmt.Println(containerString) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 625b8aad5..6dc6aa62f 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -202,8 +202,7 @@ func (s *E2eSuite) TestMockBackend() { }) It("can run inspect command on container", func() { - golden.Assert(s.T(), s.NewDockerCommand("inspect", "id").ExecOrDie(), - GoldenFile("inspect-id")) + golden.Assert(s.T(), s.NewDockerCommand("inspect", "id").ExecOrDie(), "inspect-id") }) It("can run 'run' command", func() {