Merge pull request #1052 from docker/test-compose-pull

Add test for compose pull
This commit is contained in:
Guillaume Tardif 2020-12-11 17:25:26 +01:00 committed by GitHub
commit cbbefa3581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -24,7 +24,7 @@ import (
"testing"
"time"
"gotest.tools/assert"
"gotest.tools/v3/assert"
"gotest.tools/v3/icmd"
. "github.com/docker/compose-cli/tests/framework"
@ -148,6 +148,7 @@ func TestLocalComposeBuild(t *testing.T) {
c.RunDockerCmd("rmi", "custom-nginx")
})
}
func TestLocalComposeVolume(t *testing.T) {
c := NewParallelE2eCLI(t, binDir)
@ -176,3 +177,13 @@ func TestLocalComposeVolume(t *testing.T) {
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"))
}

View File

@ -0,0 +1,7 @@
services:
simple:
image: busybox:1.27.2
command: top
another:
image: busybox:1.31.0-uclibc
command: top