浏览代码

Merge pull request #222 from ulyssessouza/inspect

Fix linter
Guillaume Tardif 5 年之前
父节点
当前提交
13d3a52273
共有 3 个文件被更改,包括 5 次插入2 次删除
  1. 1 0
      azure/convert/convert.go
  2. 3 0
      cli/cmd/inspect.go
  3. 1 2
      tests/e2e/e2e_test.go

+ 1 - 0
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 &&

+ 3 - 0
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)
 

+ 1 - 2
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() {