moby/integration
Sebastiaan van Stijn faf6442f80
integration: fix TestBuildUserNamespaceValidateCapabilitiesAreV2 not using frozen image
Commit f2f5106c92 added this test to verify loading
of images that were built with user-namespaces enabled.

However, because this test spins up a new daemon, not the daemon that's set up by
the test-suite's `TestMain()` (which loads the frozen images).

As a result, the `debian:bullseye` image was pulled from Docker Hub when running
the test;

    Calling POST /v1.41/images/load?quiet=1
    Applying tar in /go/src/github.com/docker/docker/bundles/test-integration/TestBuildUserNamespaceValidateCapabilitiesAreV2/d4d366b15997b/root/165536.165536/overlay2/3f7f9375197667acaf7bc810b34689c21f8fed9c52c6765c032497092ca023d6/diff" storage-driver=overlay
    Applied tar sha256:845f0e5159140e9dbcad00c0326c2a506fbe375aa1c229c43f082867d283149c to 3f7f9375197667acaf7bc810b34689c21f8fed9c52c6765c032497092ca023d6, size: 5922359
    Calling POST /v1.41/build?buildargs=null&cachefrom=null&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=&labels=null&memory=0&memswap=0&networkmode=&rm=0&shmsize=0&t=capabilities%3A1.0&target=&ulimits=null&version=
    Trying to pull debian from https://registry-1.docker.io v2
    Fetching manifest from remote" digest="sha256:f169dbadc9021fc0b08e371d50a772809286a167f62a8b6ae86e4745878d283d" error="<nil>" remote="docker.io/library/debian:bullseye
    Pulling ref from V2 registry: debian:bullseye
    ...

This patch updates `TestBuildUserNamespaceValidateCapabilitiesAreV2` to load the
frozen image. `StartWithBusybox` is also changed to `Start`, because the test
is not using the busybox image, so there's no need to load it.

In a followup, we should probably add some utilities to make this easier to set up
(and to allow passing the list frozen images that we want to load, without having
to "hard-code" the image name to load).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 46dfc31342)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-03 13:54:16 +01:00
..
build integration: fix TestBuildUserNamespaceValidateCapabilitiesAreV2 not using frozen image 2021-02-03 13:54:16 +01:00
config integration/config: add check for removing non-existing config 2020-04-14 18:31:38 +02:00
container Make test work with rootless mode 2021-02-03 13:54:09 +01:00
distribution bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
image Windows: Enable more integration tests 2020-09-20 22:09:27 +03:00
internal Replace service "Capabilities" w/ add/drop API 2020-07-27 10:09:42 -07:00
network Networking: add regression test for networks endpoint with trailing slash 2020-11-30 12:34:24 +01:00
plugin fix integration test case TestExternalGraphDriver failed in mips arch 2020-09-15 10:04:00 +08:00
secret integration/secret: add check for empty list not producing an error 2020-04-14 18:31:36 +02:00
service Replace service "Capabilities" w/ add/drop API 2020-07-27 10:09:42 -07:00
session bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
system test-integration: support more rootless tests 2020-03-16 17:37:38 +09:00
testdata/https integration/plugin/authz: port tests from integration-cli 2017-10-02 14:20:59 +01:00
volume Windows: Enable more integration tests 2020-09-20 22:09:27 +03:00
doc.go Add canonical import comment 2018-02-05 16:51:57 -05:00