mirror of https://github.com/docker/compose.git
Add test for compose pull
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
parent
59a94a0a8e
commit
331a60bb62
|
@ -24,7 +24,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gotest.tools/assert"
|
"gotest.tools/v3/assert"
|
||||||
"gotest.tools/v3/icmd"
|
"gotest.tools/v3/icmd"
|
||||||
|
|
||||||
. "github.com/docker/compose-cli/tests/framework"
|
. "github.com/docker/compose-cli/tests/framework"
|
||||||
|
@ -148,6 +148,7 @@ func TestLocalComposeBuild(t *testing.T) {
|
||||||
c.RunDockerCmd("rmi", "custom-nginx")
|
c.RunDockerCmd("rmi", "custom-nginx")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLocalComposeVolume(t *testing.T) {
|
func TestLocalComposeVolume(t *testing.T) {
|
||||||
c := NewParallelE2eCLI(t, binDir)
|
c := NewParallelE2eCLI(t, binDir)
|
||||||
|
|
||||||
|
@ -176,3 +177,13 @@ func TestLocalComposeVolume(t *testing.T) {
|
||||||
c.RunDockerCmd("volume", "rm", projectName+"_staticVol")
|
c.RunDockerCmd("volume", "rm", projectName+"_staticVol")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestComposePull(t *testing.T) {
|
||||||
|
c := NewParallelE2eCLI(t, binDir)
|
||||||
|
|
||||||
|
res := c.RunDockerOrExitError("compose", "pull", "--workdir", "fixtures/simple-composefile")
|
||||||
|
output := res.Combined()
|
||||||
|
|
||||||
|
assert.Assert(t, strings.Contains(output, "simple Pulled"))
|
||||||
|
assert.Assert(t, strings.Contains(output, "another Pulled"))
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
services:
|
||||||
|
simple:
|
||||||
|
image: busybox:1.27.2
|
||||||
|
command: top
|
||||||
|
another:
|
||||||
|
image: busybox:1.31.0-uclibc
|
||||||
|
command: top
|
Loading…
Reference in New Issue