Commit graph

34725 commits

Author SHA1 Message Date
Kir Kolyshkin
4aae77602a pkg/mount unit tests: skip some test under non-root
This makes `go test .` to pass if run as non-root user, skipping
those tests that require superuser privileges (for `mount`).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-03-06 12:37:27 -08:00
Yong Tang
4db41f1a69
Merge pull request #36494 from stevvooe/remove-unnecessary-types-file
daemon/stats: remove obnoxious types file
2018-03-06 11:52:56 -08:00
Sebastiaan van Stijn
f0694e968f
Merge pull request #36417 from NobodyOnSE/patch-2
Whitelist statx syscall
2018-03-06 14:33:56 +01:00
Sebastiaan van Stijn
0b0af855ae
Merge pull request #36316 from selansen/36247
Fix to address regression caused by PR 30897
2018-03-06 13:40:29 +01:00
Sebastiaan van Stijn
390b74cb63
Merge pull request #36493 from cpuguy83/add_plugin_timeout_test
Adds a unit test for plugin request timeout
2018-03-06 12:45:17 +01:00
NobodyOnSE
b2a907c8ca Whitelist statx syscall for libseccomp-2.3.3 onward
Older seccomp versions will ignore this.

Signed-off-by: NobodyOnSE <ich@sektor.selfip.com>
2018-03-06 08:42:12 +01:00
Vincent Demeester
2f7a76a6a0
Merge pull request #36444 from yongtang/02142018-events-tests
Migrate events tests to api tests
2018-03-06 08:36:30 +01:00
Yong Tang
e02fa4a679
Merge pull request #36490 from yongtang/03052018-expected-actual
Address `expected` vs `actual` in integration tests
2018-03-05 19:40:53 -08:00
Brian Goff
a6b1d2ea29
Merge pull request #36437 from kolyshkin/dm-unused
devmapper.Mounted: remove
2018-03-05 18:14:36 -08:00
Yong Tang
da559d01d1
Merge pull request #36474 from yongtang/03022018-rm-test
Migrate docker rm tests to api tests
2018-03-05 17:15:26 -08:00
selansen
7cf8b20762 Fix to address regression caused by PR 30897
With the inclusion of PR 30897, creating service for host network
    fails in 18.02. Modified IsPreDefinedNetwork check and return
    NetworkNameError instead of errdefs.Forbidden to address this issue

Signed-off-by: selansen <elango.siva@docker.com>
2018-03-05 19:10:39 -05:00
Stephen J Day
244e59e94f
daemon/stats: remove obnoxious types file
While a `types.go` file is handly when there are a lot of record types,
it is completely obnoxious when used for concrete, utility types with a
struct, new function and method set in the same file. This change
removes the `types.go` file in favor of the simpler approach.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-03-05 15:59:04 -08:00
John Stephens
3e1505e3e6
Merge pull request #36327 from Microsoft/jjh/block-pulling-uplevel
Windows: Block pulling uplevel images
2018-03-05 15:12:52 -08:00
Yong Tang
8a854e933b Address expected vs actual in integration tests
This fix addresses `expected` vs `actual` in integration tests
so that they match `assert.Equal(t, expected, actual)`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-05 20:39:42 +00:00
Brian Goff
7ca971fb49 Adds a unit test for plugin request timeout
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-03-05 15:38:56 -05:00
Yong Tang
ed58ba99fb Migrate docker rm tests to api tests
This fix migrates docker rm test in integration-cli
to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-05 20:35:14 +00:00
Yong Tang
4b2fb7e394
Merge pull request #36468 from vdemeester/e2e-container-run
Fixes some integration/container tests to run on remote daemon
2018-03-05 12:23:24 -08:00
Akihiro Suda
8830ef804f
Merge pull request #36407 from agawish/36395-mount-print
36395 mount print
2018-03-06 02:31:21 +09:00
Vincent Demeester
3af9b1d395
Merge pull request #36471 from yongtang/03022018-improvement
Improvement in integration tests
2018-03-05 17:54:09 +01:00
Yong Tang
3a749157d2 Migrate events tests to api tests
This fix migrates events tests in integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-05 16:13:48 +00:00
Vincent Demeester
18dd1d9aba
Fixes some integration/container test to run on remote daemon
```
docker build -f Dockerfile.e2e -t moby-e2e .
docker run -v /var/run/docker.sock:/var/run/docker.sock \
           -e TEST_INTEGRATION_DIR=/tests/integration/container \
           -e DOCKER_API_VERSION=1.36 moby-e2e
```

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-05 14:24:01 +01:00
Vincent Demeester
61cb026e7e
Merge pull request #36449 from thaJeztah/bump-runc-1.0-rc5
Bump Runc to 1.0.0-rc5
2018-03-05 11:44:21 +01:00
Sebastiaan van Stijn
e3814ece21
Merge pull request #36476 from yongtang/03022018-kill_test
Remove unnecessary container.WithName in kill test
2018-03-05 11:42:30 +01:00
Yong Tang
954e55b374
Merge pull request #36475 from IRCody/logdriver-errors
daemon/logger/ring.go: log error not instance
2018-03-03 15:51:35 -08:00
Cody Roseborough
a1956b5623 daemon/logger/ring.go: log error not instance
Log the error returned from logdriver.Log() instead of the logdriver
itself.

Signed-off-by: Cody Roseborough <crrosebo@amazon.com>
2018-03-03 16:29:57 +00:00
Sebastiaan van Stijn
6fe8384939
Merge pull request #36438 from kolyshkin/dm-rm
devmapper/Remove(): use Rmdir, ignore errors
2018-03-03 15:10:08 +01:00
Akihiro Suda
e734e8f515
Merge pull request #36459 from yongtang/02282018-export-test
Migrate export tests to api tests
2018-03-03 12:29:53 +09:00
Kir Kolyshkin
732dd9b848 devmapper/Remove(): use Rmdir, ignore errors
1. Replace EnsureRemoveAll() with Rmdir(), as here we are removing
   the container's mount point, which is already properly unmounted
   and is therefore an empty directory.

2. Ignore the Rmdir() error (but log it unless it's ENOENT). This
   is a mount point, currently unmounted (i.e. an empty directory),
   and an older kernel can return EBUSY if e.g. the mount was
   leaked to other mount namespaces.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-03-02 18:10:57 -08:00
Yong Tang
1778719d6a Remove unnecessary container.WithName in kill test
This fix removes several unnecessary `container.WithName`
usage in docker kill integration test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-03 01:06:49 +00:00
Yong Tang
6ab465804b Improvement in integration tests
This fix adds several improvement:
1. No need for explicit ContainerRemove as it has been handled in setupTest()
2. Added `container.WithImage` helper function and used it in commit tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-02 19:03:59 +00:00
Vincent Demeester
135f815fb4
Merge pull request #36460 from yongtang/03012018-import
Add missing canonical import comment to files in integration tests
2018-03-02 09:37:58 +01:00
Yong Tang
4e702cf70d Migrate export tests to api tests
This fix migrates export tests in integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-02 00:44:03 +00:00
Yong Tang
9045406144 Add missing canonical import comment to files in integration tests
The  canonical import comment was added some time ago, though several
newly added files do not have the comment. This fix adds the missing
canonical import comment to files in integration tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-03-01 22:51:11 +00:00
Sebastiaan van Stijn
7459e4cd4f
Merge pull request #36455 from thaJeztah/flip-asserts
Fix "expected" and "actual" being reversed
2018-03-01 21:31:46 +01:00
Yong Tang
9276750543
Merge pull request #36445 from yongtang/02282018-secret-inspect
Remove docker_cli_secret_inspect_test.go
2018-03-01 09:40:45 -08:00
Vincent Demeester
fa018b433a
Merge pull request #36450 from yongtang/02282018-enhancement
Enhancement of replacing ContainerCreate with helper funcs in tests
2018-03-01 16:47:49 +01:00
Sebastiaan van Stijn
a2517cbf62
Fix "expected" and "actual" being reversed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-01 14:16:19 +01:00
Sebastiaan van Stijn
78efc2f383
Merge pull request #36425 from vdemeester/dockerfile-adjusts
Follow-up fixes on multi-stage moby's Dockerfile
2018-02-28 23:07:27 +01:00
Yong Tang
6ad4720c78 Enhancement of replacing ContainerCreate with helper funcs in tests
This fix is a minor enhancement to replace several ContainerCreate with
helper funcs of `container.Create` in tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-28 21:35:56 +00:00
Sebastiaan van Stijn
aab5eaddcc
bump containerd/console to 2748ece16665b45a47f884001d5831ec79703880
Fix runc exec on big-endian, causing:

    container_linux.go:265: starting container process caused "open /dev/pts/4294967296: no such file or directory"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-28 21:43:20 +01:00
Sebastiaan van Stijn
a2f5a1a5b2
Bump Runc to 1.0.0-rc5 / 4fc53a81fb7c994640722ac585fa9ca548971871
Release notes: https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc5

Possibly relevant changes included:

- chroot when no mount namespaces is provided
- fix systemd slice expansion so that it could be consumed by cAdvisor
- libcontainer/capabilities_linux: Drop os.Getpid() call
- Update console dependency to fix runc exec on BE (causing: `container_linux.go:265: starting container process caused "open /dev/pts/4294967296: no such file or directory"`)
- libcontainer: setupUserNamespace is always called (fixes: Devices are mounted with wrong uid/gid)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-28 21:39:59 +01:00
Yong Tang
3d38adb20c Remove docker_cli_secret_inspect_test.go
as the test (TestSecretInspectMultiple) seems to have been covered pretty well in cli:
https://github.com/docker/cli/blob/master/cli/command/secret/inspect_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-28 17:16:47 +00:00
Sebastiaan van Stijn
75377ec12c
Merge pull request #36434 from dnephin/fix-cp-cli-tests
Migrate some container copy tests to integration
2018-02-28 12:28:18 +01:00
Sebastiaan van Stijn
7c7dfce37f
Merge pull request #36429 from mnussbaum/cleanup_container_unit_test_temp_dir
Clean up a temp dir created in container unit test
2018-02-28 12:28:01 +01:00
Sebastiaan van Stijn
973cf656dd
Merge pull request #36430 from yongtang/02262018-config-test
Migrate config inspect test to api test
2018-02-28 11:50:52 +01:00
Sebastiaan van Stijn
3e0299f58c
Merge pull request #36375 from arm64b/frozen-busybox-latest-glibc
Frozen busybox latest glibc
2018-02-28 10:55:08 +01:00
Vincent Demeester
8fe1589615
Merge pull request #36293 from yongtang/02122018-rm-tests
Migrate several docker rm tests to api tests
2018-02-28 09:25:49 +01:00
Vincent Demeester
572cb66462
Use golang official image instead debian stretch
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-28 09:04:48 +01:00
Sebastiaan van Stijn
f571eb1720
Merge pull request #36427 from vdemeester/micro-clean-docker-cli-build-test
Clean some docker_cli_build_tests that are cli-only
2018-02-28 08:20:51 +01:00
Kir Kolyshkin
0450f61cb9 devmapper.Mounted: remove
It looks like no one uses this function.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-02-27 19:13:46 -08:00