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>
| ... | ... |
@@ -102,7 +102,12 @@ func TestRmiTagWithExistingContainers(t *testing.T) {
|
| 102 | 102 |
|
| 103 | 103 |
func TestRmiForceWithExistingContainers(t *testing.T) {
|
| 104 | 104 |
image := "busybox-clone" |
| 105 |
- if out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "build", "--no-cache", "-t", image, "/docker-busybox")); err != nil {
|
|
| 105 |
+ |
|
| 106 |
+ cmd := exec.Command(dockerBinary, "build", "--no-cache", "-t", image, "-") |
|
| 107 |
+ cmd.Stdin = strings.NewReader(`FROM busybox |
|
| 108 |
+MAINTAINER foo`) |
|
| 109 |
+ |
|
| 110 |
+ if out, _, err := runCommandWithOutput(cmd); err != nil {
|
|
| 106 | 111 |
t.Fatalf("Could not build %s: %s, %v", image, out, err)
|
| 107 | 112 |
} |
| 108 | 113 |
|