浏览代码

integration-cli: fix test to use busybox outside container

Fixes TestRmiForceWithExistingContainers test to make it use
`busybox` image rather than /docker-busybox hardcoded path
and rebuilding image.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Ahmet Alp Balkan 10 年之前
父节点
当前提交
57d34241fd
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      integration-cli/docker_cli_rmi_test.go

+ 6 - 1
integration-cli/docker_cli_rmi_test.go

@@ -102,7 +102,12 @@ func TestRmiTagWithExistingContainers(t *testing.T) {
 
 func TestRmiForceWithExistingContainers(t *testing.T) {
 	image := "busybox-clone"
-	if out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "build", "--no-cache", "-t", image, "/docker-busybox")); err != nil {
+
+	cmd := exec.Command(dockerBinary, "build", "--no-cache", "-t", image, "-")
+	cmd.Stdin = strings.NewReader(`FROM busybox
+MAINTAINER foo`)
+
+	if out, _, err := runCommandWithOutput(cmd); err != nil {
 		t.Fatalf("Could not build %s: %s, %v", image, out, err)
 	}