mirror of https://github.com/docker/cli.git
test/e2e: Use "frozen" tag to reference test images
This makes it possible to update the image loaded for e2e tests without modifying all tests that use them. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
41b6ec07ce
commit
ec5504a83f
|
@ -34,7 +34,7 @@ func TestRunBuildDockerfileFromStdinWithCompress(t *testing.T) {
|
|||
|
||||
cli := test.NewFakeCli(&fakeClient{imageBuildFunc: fakeImageBuild})
|
||||
dockerfile := bytes.NewBufferString(`
|
||||
FROM alpine:3.6
|
||||
FROM alpine:frozen
|
||||
COPY foo /
|
||||
`)
|
||||
cli.SetIn(streams.NewIn(io.NopCloser(dockerfile)))
|
||||
|
@ -66,7 +66,7 @@ func TestRunBuildResetsUidAndGidInContext(t *testing.T) {
|
|||
dir := fs.NewDir(t, "test-build-context",
|
||||
fs.WithFile("foo", "some content", fs.AsUser(65534, 65534)),
|
||||
fs.WithFile("Dockerfile", `
|
||||
FROM alpine:3.6
|
||||
FROM alpine:frozen
|
||||
COPY foo bar /
|
||||
`),
|
||||
)
|
||||
|
@ -155,7 +155,7 @@ func TestRunBuildFromLocalGitHubDir(t *testing.T) {
|
|||
func TestRunBuildWithSymlinkedContext(t *testing.T) {
|
||||
t.Setenv("DOCKER_BUILDKIT", "0")
|
||||
dockerfile := `
|
||||
FROM alpine:3.6
|
||||
FROM alpine:frozen
|
||||
RUN echo hello world
|
||||
`
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ func TestBuildFromContextDirectoryWithTag(t *testing.T) {
|
|||
result.Assert(t, icmd.Expected{Err: buildkitDisabledWarning})
|
||||
output.Assert(t, result.Stdout(), map[int]func(string) error{
|
||||
0: output.Prefix("Sending build context to Docker daemon"),
|
||||
1: output.Suffix("Step 1/4 : FROM registry:5000/alpine:3.6"),
|
||||
1: output.Suffix("Step 1/4 : FROM registry:5000/alpine:frozen"),
|
||||
3: output.Suffix("Step 2/4 : COPY run /usr/bin/run"),
|
||||
5: output.Suffix("Step 3/4 : RUN run"),
|
||||
7: output.Suffix("running"),
|
||||
|
|
|
@ -41,7 +41,7 @@ func TestPullWithContentTrust(t *testing.T) {
|
|||
func TestPullQuiet(t *testing.T) {
|
||||
result := icmd.RunCommand("docker", "pull", "--quiet", fixtures.AlpineImage)
|
||||
result.Assert(t, icmd.Success)
|
||||
assert.Check(t, is.Equal(result.Stdout(), "registry:5000/alpine:3.6\n"))
|
||||
assert.Check(t, is.Equal(result.Stdout(), "registry:5000/alpine:frozen\n"))
|
||||
assert.Check(t, is.Equal(result.Stderr(), ""))
|
||||
}
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ const (
|
|||
// EvilNotaryURL is the location of the evil notary server
|
||||
EvilNotaryURL = "https://evil-notary-server:4444"
|
||||
// AlpineImage is an image in the test registry
|
||||
AlpineImage = "registry:5000/alpine:3.6"
|
||||
AlpineImage = "registry:5000/alpine:frozen"
|
||||
// AlpineSha is the sha of the alpine image
|
||||
AlpineSha = "641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d"
|
||||
// BusyboxImage is an image in the test registry
|
||||
BusyboxImage = "registry:5000/busybox:1.27.2"
|
||||
BusyboxImage = "registry:5000/busybox:frozen"
|
||||
// BusyboxSha is the sha of the busybox image
|
||||
BusyboxSha = "030fcb92e1487b18c974784dcc110a93147c9fc402188370fbfd17efabffc6af"
|
||||
)
|
||||
|
|
|
@ -2,8 +2,8 @@ version: '3.3'
|
|||
|
||||
services:
|
||||
one:
|
||||
image: registry:5000/alpine:3.6
|
||||
image: registry:5000/alpine:frozen
|
||||
command: top
|
||||
two:
|
||||
image: registry:5000/alpine:3.6
|
||||
image: registry:5000/alpine:frozen
|
||||
command: top
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version: '3.5'
|
||||
services:
|
||||
web:
|
||||
image: registry:5000/alpine:3.6
|
||||
image: registry:5000/alpine:frozen
|
||||
command: top
|
||||
networks: [network1, network2]
|
||||
volumes: [volume1, volume2]
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
set -eu -o pipefail
|
||||
|
||||
alpine_src=alpine@sha256:f006ecbb824d87947d0b51ab8488634bf69fe4094959d935c0c103f4820a417d
|
||||
alpine_dest=registry:5000/alpine:3.6
|
||||
alpine_dest=registry:5000/alpine:frozen
|
||||
|
||||
busybox_src=busybox@sha256:3e8fa85ddfef1af9ca85a5cfb714148956984e02f00bec3f7f49d3925a91e0e7
|
||||
busybox_dest=registry:5000/busybox:1.27.2
|
||||
busybox_dest=registry:5000/busybox:frozen
|
||||
|
||||
fetch_tag_image() {
|
||||
docker pull "$1"
|
||||
|
|
Loading…
Reference in New Issue