Skip to content

Improve Dockerfile.e2e#39116

Merged
tiborvass merged 15 commits intomoby:masterfrom
thaJeztah:improve_e2e_image
Apr 27, 2019
Merged

Improve Dockerfile.e2e#39116
tiborvass merged 15 commits intomoby:masterfrom
thaJeztah:improve_e2e_image

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Apr 19, 2019

follow-up to #39115 (first commit is from that PR)

See individual commits for details

To test (if you're running on Docker 18.09 (API v1.39)):

docker build -t moby-e2e-test -f Dockerfile.e2e .

docker run -it --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e DOCKER_API_VERSION=1.39 \
  moby-e2e-test

@thaJeztah
Copy link
Copy Markdown
Member Author

ping @vdemeester @cpuguy83 PTAL

@thaJeztah
Copy link
Copy Markdown
Member Author

Looking at some weirdness when running these tests; looks like there might be a bug somewhere (not introduced in this PR)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2019

Codecov Report

Merging #39116 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #39116      +/-   ##
==========================================
- Coverage   37.05%   37.02%   -0.04%     
==========================================
  Files         612      612              
  Lines       45400    45400              
==========================================
- Hits        16824    16809      -15     
- Misses      26294    26307      +13     
- Partials     2282     2284       +2

@thaJeztah
Copy link
Copy Markdown
Member Author

Added various fixes/skips for situations where this image is run against an older daemon

@thaJeztah
Copy link
Copy Markdown
Member Author

/cc @seemethere

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Older versions of the daemon would concatenate hostname and
domainname, so hostname "foobar" and domainname "baz.cyphar.com"
would produce `foobar.baz.cyphar.com` as hostname.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
TestNISDomainname in the integration suite covers this

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The daemon may already have other volumes, so filter out those
when running the test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Older versions did not use an UUID as ID

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Copy Markdown
Contributor

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seemethere
Copy link
Copy Markdown
Contributor

seemethere commented Apr 25, 2019

Disregard this, just figured out I was connecting to a remote daemon running 18.09.5

This actually fails for me when I try to run it locally:

 => ERROR [builder 2/3] RUN hack/make.sh build-integration-test-binary                          0.6s
------
 > [builder 2/3] RUN hack/make.sh build-integration-test-binary:
#32 0.488
#32 0.505 error: .git directory missing and DOCKER_GITCOMMIT not specified
#32 0.505   Please either build with the .git directory accessible, or specify the
#32 0.505   exact (--short) commit hash you are building using DOCKER_GITCOMMIT for
#32 0.505   future accountability in diagnosing build issues.  Thanks!
------
executor failed running [/bin/sh -c hack/make.sh build-integration-test-binary]: exit code: 1

EDIT: Actually this only fails for me when I try running with DOCKER_BUILDKIT=1

@kolyshkin
Copy link
Copy Markdown
Contributor

--- FAIL: TestUpdatePidsLimit (4.45s)
    --- FAIL: TestUpdatePidsLimit/update_from_none (0.47s)
        update_linux_test.go:154: failed to parse source file: /go/src/github.com/docker/docker/integration/container/update_linux_test.go: open /go/src/github.com/docker/docker/integration/container/update_linux_test.go: no such file or directory

(most probably the failure comes because I don't run it as root, I don't care)

It looks like test case sources should be copied to the final image, because stuff like assert.Equal() etc tries to parse (reflect) the source file in case of failure to print info about what kind of variable and what value is expected and what is provided, stuff like that.

@thaJeztah
Copy link
Copy Markdown
Member Author

It looks like test case sources should be copied to the final image, because stuff like assert.Equal() etc tries to parse (reflect) the source file in case of failure to print info about what kind of variable and what value is expected and what is provided, stuff like that.

Yes, I actually had a branch that does so, but I was in doubt to include that;

  • the image size actually doubles
  • I wanted to have a look at the gotest.tools repository to see if there's a way to make that reflecting/parsing optional (in situations where the source code is not available)

This test case requires not just daemon >= 1.40, but also
client API >= 1.40. In case older client is used, we'll
get failure from the very first check:

> ipcmode_linux_test.go:313: assertion failed: shareable (string) != private (string)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@thaJeztah
Copy link
Copy Markdown
Member Author

@kolyshkin LGTY?

@kolyshkin kolyshkin self-requested a review April 27, 2019 03:36
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, LGTM (I guess I can followup with gotest.tools stuff later)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants