Commit graph

5039 commits

Author SHA1 Message Date
Vincent Demeester
183076e89d
Migrate test-integration-cli experimental build tests to integration
All `docker build` tests that require an `ExperimentalDaemon` are
migrated to `integration/build` package and start an experimental
daemon to test on it.

The end goal being to remove the `experimental` builds.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-30 13:10:02 +02:00
Vincent Demeester
e55d6fc857 Skip some tests in certain condition to run with e2e image
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-29 09:10:39 +02:00
Anusha Ragunathan
18d1688530
Merge pull request #36711 from cpuguy83/plugin_mounts_sorting
Don't sort plugin mounts slice
2018-03-28 11:57:38 -07:00
Brian Goff
ec90839ca3 Don't sort plugin mounts slice
This was added as part of a53930a04f with
the intent to sort the mounts in the plugin config, but this was sorting
*all* the mounts from the default OCI spec which is problematic.

In reality we don't need to sort this because we are only adding a
self-binded mount to flag it as rshared.

We may want to look at sorting the plugin mounts before they are added
to the OCI spec in the future, but for now I think the existing behavior
is fine since the plugin author has control of the order (except for the
propagated mount).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-03-28 09:10:43 -04:00
Vincent Demeester
ef5bc60326
Migrate test-integration-cli experimental macvlan test to integration
All `Macvlan` related test on `DockerSuite` and `DockerNetworkSuite`
are migrated to `macvlan_test.go`.

Also, as `macvlan` seems to be out of experimental, this removes
the *skip* when the run is not experimental (and doesn't start a
daemon with experimental either).

The end goal being to remove the `experimental` builds.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-28 10:47:11 +02:00
Vincent Demeester
5433ceb12e
Migrate DockerTrustSuite to docker/cli e2e tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-19 09:26:35 +01:00
Daniel Nephin
c9e52bd0da Post migration assertion fixes
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-16 11:03:46 -04:00
Daniel Nephin
6be0f70983 Automated migration using
gty-migrate-from-testify --ignore-build-tags

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-16 11:03:43 -04:00
Kir Kolyshkin
5043639645 integration-cli/TestSlowStdinClosing: increase timeout
I noticed this test failed on Windows:

> 17:46:24 docker_cli_run_test.go:4361:
> 17:46:24 c.Fatal("running container timed out") // cleanup in teardown

I also noticed that in general tests are running slower on Windows,
for example TestStartAttachSilent (which runs a container with
`busybox echo test` and then starts it again) took 29.763s.
This means a simple container start can easily take 15s, which
explains the above failure.

Double the timeout from 15s to 30s.

Fixes: 4e262f6387 ("Fix race on sending stdin close event")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-03-12 20:35:28 -07:00
Christopher Jones
620ddc78a1
[integration] skip ppc64le oom tests for now
These tests were enabled by changing a config option on the ci
machines, instead of from a patch, so let me disable them
for now on ppc64le and open up another patch to enable them, where I can find
out what the issues are with them.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2018-03-08 17:51:37 -06:00
Sebastiaan van Stijn
36e1646e4f
Remove duplicate TestServiceUpdatePort
The TestAPIServiceUpdatePort test performs exactly
the same steps.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-06 16:17:13 +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
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
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
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
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
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
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
Sebastiaan van Stijn
1346a2c89a
Merge pull request #36267 from Microsoft/jjh/removeservicing
Windows: Remove servicing mode
2018-02-28 01:15:03 +01:00
Yong Tang
4b99d78207 Migrate config inspect test to api test
This fix migrates config inspect test in integration-cli
to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-27 23:25:07 +00:00
Amr Gawish
df6af282b9 Print which path failed when the mount source doesn't exist.
Changes Details:
--------------
Fixes: #36395

Refactoring the code to do the following:
1. Add the method `errBindSourceDoesNotExist` inside `validate.go` to be in-line with the rest of error message
2. Utilised the new method inside `linux_parser.go`, `windows_parser.go` and `validate_test.go`
3. Change the format from `bind mount source path: '%s' does not exist` to `bind mount source path does not exist: %s`
4. Reflected the format change into the 2 unit tests, namely: `volume_test.go` and `validate_test.go`
5. Reflected the format change into `docker_api_containers_test.go` integration test

Signed-off-by: Amr Gawish <amr.gawish@gmail.com>
2018-02-27 23:19:46 +00:00
Daniel Nephin
00d409f03e Migrate some copy tests to integration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-27 16:48:35 -05:00
Yong Tang
6bd4f4801b Migrate several docker rm tests to api tests
This fix migrates several docker rm tests to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-27 19:20:01 +00:00
John Howard
d4f37c0885 Windows: Remove servicing mode
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-02-27 08:48:31 -08:00
Vincent Demeester
894c213b3b
Clean some docker_cli_build_tests that are cli-only
Remove TestBuildRenamedDockerfile and TestBuildDockerfileOutsideContext
that are cli-only tests (and already tested in the docker/cli
repository).

Also adds some comments on few tests that could be migrate to
docker/cli.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-27 13:42:29 +01:00
Vincent Demeester
407e122ac3
Merge pull request #36292 from yongtang/0212-2018-volumes-tests
Migrate volumes tests in integration-cli to api tests
2018-02-27 13:06:06 +01:00
Dennis Chen
0d31dee5ec Network testing with busybox:glibc
Using the `busybox:glibc` instead of `busybox:latest` to the
network related test cases (`ping` issue).

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-02-27 06:53:00 +00:00
Yong Tang
d896f87c05 Migrate volumes tests in integration-cli to api tests
This fix migrates volumes tests in integration-cli to api tests
in integration/

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-27 05:18:31 +00:00
Yong Tang
99e2818850 Migrate some config secret tests to api test
This fix migrates some secret create tests to api tests,
and remove redundant TestConfigCreate.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-25 23:58:04 +00:00
Dennis Chen
57d85e7e54 Clean the teardown process of network test
We need to clean the resources created in some test cases, else
in some cases we'll get below error for other tests:

> FAIL: docker_experimental_network_test.go:37: DockerNetworkSuite.TestDockerNetworkMacvlanPersistance
>  docker_experimental_network_test.go:44:
> ...
> Command:  ip link add dm-dummy0 type dummy
> ExitCode: 2
> Error:    exit status 2
> Stdout:
> Stderr:   RTNETLINK answers: File exists
> ...

Logically, each test case should be independent, the failure of previous
test case should not have side-effect for the test cases followed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-02-23 08:54:52 +00:00
Brian Goff
c6513bd051
Merge pull request #36363 from dnephin/fix-attach-detach-test
Fix TestAttachAfterDetach to work with latest client
2018-02-22 11:25:02 -05:00
Sebastiaan van Stijn
466cc98143
Merge pull request #34899 from dnephin/fix-duplicate-new-client
[client] Remove duplicate NewClient functions
2018-02-21 12:59:42 +01:00
Sebastiaan van Stijn
20028325da
Merge pull request #35829 from cpuguy83/no_private_mount_for_plugins
Perform plugin mounts in the runtime
2018-02-21 12:28:13 +01:00
Daniel Nephin
847b610620 Fix TestAttachAfterDetach to work with latest client
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-20 18:34:25 -05:00
Daniel Nephin
0a91ba2d8c Remove duplicate calls for getting an APIClient
Remove request.SockRequest
Remove request.SockRequestHijack
Remove request.SockRequestRaw()
Remove deprecated ParseHost
Deprecate and unexport more helpers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-20 17:27:24 -05:00
Brian Goff
0df654f3d6 Cleanup volume plugin test with bad assumptions
Test made some bad assumptions about on-disk state of volume data.
This updates the test to only test based on what the volume API is
designed to provide.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-02-20 16:57:20 -05:00
Vincent Demeester
7060a40add
Merge pull request #36330 from vdemeester/migrate-container-list-tests
test: clean/migrate some docker ps cli-only integration tests
2018-02-20 08:44:17 +01:00
Vincent Demeester
641c73d211
Clean some cli-only integration tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-19 11:19:19 +01:00
Vincent Demeester
04d97267b6
Merge pull request #36306 from cpuguy83/fix_logopt_validator_plugins
Move log validator logic after plugins are loaded
2018-02-16 11:52:23 +01:00
Vincent Demeester
1474ec1ecf
Merge pull request #36274 from thaJeztah/bump-swarmkit
Bump SwarmKit to f74983e7c015a38a81c8642803a78b8322cf7eac
2018-02-15 18:40:09 +01:00
Brian Goff
b0b9a25e7e Move log validator logic after plugins are loaded
This ensures that all log plugins are registered when the log validator
is run.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-02-15 11:53:11 -05:00
Vincent Demeester
05e7f2cf58
Test invalid filter and move validation on top
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-15 16:24:26 +01:00
Yong Tang
f19bea20c9 Remove docker_cli_diff_test.go from integration-cli
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-15 01:03:29 -08:00
Dennis Chen
3a97100976 Unify the frozen images to the multi-arch version
Update and unify the `busybox` images on all arches to the `glibc` multi-arch
version and remove the temp workaround on amd64 which uses the old version
busybox (v1.26) before this PR to bypass the failure of those network related
test cases. Also, this PR will fix all the network related issues with `glibc`
version `busybox` image.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-02-14 03:59:04 +00:00