Commit Graph

35968 Commits

Author SHA1 Message Date
c81448bb56 pkg/mount: wrap mount/umount errors
The errors returned from Mount and Unmount functions are raw
syscall.Errno errors (like EPERM or EINVAL), which provides
no context about what has happened and why.

Similar to os.PathError type, introduce mount.Error type
with some context. The error messages will now look like this:

> mount /tmp/mount-tests/source:/tmp/mount-tests/target, flags: 0x1001: operation not permitted

or

> mount tmpfs:/tmp/mount-test-source-516297835: operation not permitted

Before this patch, it was just

> operation not permitted

[v2: add Cause()]
[v3: rename MountError to Error, document Cause()]
[v4: fixes; audited all users]
[v5: make Error type private; changes after @cpuguy83 reviews]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 65331369617e89ce54cc9be080dba70f3a883d1c)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7f1c6bf5a745c8faeba695d3556dff4c4ff5f473
Component: engine
2019-06-05 11:50:50 -07:00
e213748382 pkg/mount: refactor Unmount()
It has been pointed out that we're ignoring EINVAL from umount(2)
everywhere, so let's move it to a lower-level function. Also, its
implementation should be the same for any UNIX incarnation, so
let's consolidate it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 90be078fe59a8cfeff2bcc5dc2f34a00309837b6)
Upstream-commit: 47c51447e1b6dacf92b40574f6f929958ca9d621
Component: engine
2019-06-04 15:22:52 -07:00
51371cb252 fix typo
Signed-off-by: Omri Shiv <Omri.Shiv@teradata.com>
(cherry picked from commit fe1083d4622658e9e5bf7319d0f94873019fced2)
Upstream-commit: b941f081523cce7defafd4457f380442e10fa345
Component: engine
2019-06-04 15:22:46 -07:00
6f78462c1a UnmountIpcMount: simplify
As standard mount.Unmount does what we need, let's use it.

In addition, this adds ignoring "not mounted" condition, which
was previously implemented (see PR#33329, commit cfa2591d3f26)
via a very expensive call to mount.Mounted().

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 77bc327e24a60791fe7e87980faf704cf7273cf9)
Upstream-commit: 893b24b80db170279d5c9532ed508a81c328de5e
Component: engine
2019-06-04 15:21:22 -07:00
0e24f5bcda Merge pull request #253 from thaJeztah/18.09_backport_root_dir_on_copy
[18.09 backport] Pass root to chroot to for chroot Tar/Untar (CVE-2018-15664)
Upstream-commit: 72797601723f6a8847027a1abbd1a3cea2667718
Component: engine
2019-06-04 11:20:10 -07:00
7432dfa749 Add chroot for tar packing operations
Previously only unpack operations were supported with chroot.
This adds chroot support for packing operations.
This prevents potential breakouts when copying data from a container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 3029e765e241ea2b5249868705dbf9095bc4d529)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 61e0459053c359e322b8d5c017e855f616fd34c0
Component: engine
2019-06-03 18:55:00 +02:00
23dc194c07 Pass root to chroot to for chroot Untar
This is useful for preventing CVE-2018-15664 where a malicious container
process can take advantage of a race on symlink resolution/sanitization.

Before this change chrootarchive would chroot to the destination
directory which is attacker controlled. With this patch we always chroot
to the container's root which is not attacker controlled.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit d089b639372a8f9301747ea56eaf0a42df24016a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 155939994f453559676656bc4b05635e83ebef56
Component: engine
2019-06-03 18:54:52 +02:00
976198fed5 Merge pull request #219 from thaJeztah/18.09_backport_pull_progress_fix
[18.09 backport] builder-next: call stopprogress on download error
Upstream-commit: 532777f1ec3948333fe611f7dba5dfe144e9d267
Component: engine
2019-05-28 18:16:29 -07:00
86dd4d5860 Merge pull request #227 from joeabbey/18.09_backport_NilIPToZero
[18.09] Backport Forcing a nil IP specified in PortBindings to IPv4 zero (0.0.0.0).
Upstream-commit: c882c0011f0857da5e8cef1ea48e0aa80019abf1
Component: engine
2019-05-28 10:32:21 -04:00
e6f07d611b [18.09] Backport Forcing a nil IP specified in PortBindings to IPv4 zero (0.0.0.0).
Signed-off-by: Joe Abbey <joe.abbey@gmail.com>
Upstream-commit: 73d06e603ef2704c317c3f41a06c40aa67b164ec
Component: engine
2019-05-21 08:31:55 -04:00
88cbe50698 builder-next: call stopprogress on download error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 91a57f3e7f5ed569f7b9d97d14de11bb324bb8e0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 77e30108bda9e3369edf33737d8b57c20594ec64
Component: engine
2019-05-20 15:26:49 +02:00
89a08e8974 Merge pull request #201 from andrewhsu/ln
[18.09] bump libnetwork 872f0a8
Upstream-commit: d2cfbce3f3b0e028562fc03178851a1c170099b5
Component: engine
2019-04-23 13:17:26 -07:00
bccb447c5e bump libnetwork 872f0a83c98add6cae255c8859e29532febc0039 (18.09 branch)
full diff: c9029898e3...872f0a83c9

- docker/libnetwork#2354 [18.09 backport] Cleanup the cluster provider when the agent is closed
  - backport of docker/libnetwork#2307 Fix for problem where agent is stopped and does not restart
  - fixes docker/for-linux#495 Docker swarm overlay networking not working after --force-new-cluster
- docker/libnetwork#2369 [18.09 BACKPORT] Pick a random host port if the user does not specify a host port
  - backport of docker/libnetwork#2368 (windows) Pick a random host port if the user does not specify a host port

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5354408039681020f9ad6afe4bf696fc90f9ce69
Component: engine
2019-04-23 16:51:31 +00:00
515ec0845e Merge pull request #198 from thaJeztah/18.09_backport_test_updates
[18.09 backport] test-fixes and updates, and fix images filter when use multi reference filter
Upstream-commit: 82a2b8882e5a9dc2ba4389f589ad28dc9cee0d57
Component: engine
2019-04-23 09:49:55 -07:00
a1ca42a629 Merge pull request #191 from thaJeztah/18.09_backport_windows_ci_fixes
[18.09 backport] windows.ps1 fixes
Upstream-commit: e2352b11c7c1459a06dadf8045a7779ffaafa2ad
Component: engine
2019-04-22 00:28:49 +02:00
2bb8a5be97 Use current windows servercore image
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit aad7e9797b2e9a980b28d7d77bc119cb4b7e57dc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 04d0295c0cdfe3e67ab51ca611e3a7dd8a49b668
Component: engine
2019-04-18 18:06:44 +02:00
647deceb07 Improve 'no matching manifest' error
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
(cherry picked from commit 4b9db209fe7ed25736244bd2b56faf43a9f908dd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6099336ae61ca43cafe9420f3188c796cb0812bc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e4bc7d2fc05fcff4817f39e52b34b17a8f56cd9a
Component: engine
2019-04-18 18:05:04 +02:00
461407c57d Migrate some remaining Manifest V1 tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e65b6978b9137dad8c2bf70c0812e4cb25ff25c
Component: engine
2019-04-18 00:26:43 +02:00
45b389fec8 Replace some checkers and assertions with gotest.tools
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6345208b9b067f19f7792edcc675f59a617a3ca5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9a4d7bb0e25169fa7d48e24777c683587c29c25a
Component: engine
2019-04-17 23:10:05 +02:00
9d8e7a0e24 Remove some checkers to discourage usage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 86f2ac4a6b5b746c3309b57e7e04bdbdb70d46d7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8fcca0be3f31e8296a3ceefcb10acca636673b15
Component: engine
2019-04-17 23:09:59 +02:00
ca79cb7afa Fix typo
Signed-off-by: Hiroyuki Sasagawa <hs19870702@gmail.com>
(cherry picked from commit a28843150a7e926006798369f0ac31f32f028e36)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 45dd95610a26bf4e1995bcc9ad814d60a7f3504a
Component: engine
2019-04-17 23:09:57 +02:00
b175e2d89e TestSwarmContainerEndpointOptions: fix debug
In case of failure, stale out was printed.

Fixes: 6212ea669b4e92b3

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1921753b4b30dcca4fe772e7c1b0bc3f7bb7cd62)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b60ecd32a1d3ba7debf02d15fe346ea5ca607bbd
Component: engine
2019-04-17 23:09:54 +02:00
aa5b904041 TestDaemonRestartIpcMode: modernize
Move the test case from integration-cli to integration.

The test logic itself has not changed, except these
two things:

* the new test sets default-ipc-mode via command line
  rather than via daemon.json (less code);
* the new test uses current API version.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9fd765f07cc08ccc2ea991d21835bf50ece9318b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b228a498d55fcd47c741d51a510a7f5eab0794f7
Component: engine
2019-04-17 23:09:51 +02:00
51a09b5116 integration: add/use WithRestartPolicy
NOTE TestUpdateRestartPolicy is left as is as otherwise
it will decrease its readability.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f664df01d1836686c7a8a917e9da81d56c758d74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c546aace40872169b03e18f07294d3fbfa3d452
Component: engine
2019-04-17 23:09:48 +02:00
9659d7a8ac integration/internal/container/ops: rm unused code
Since container.Create() already initializes HostConfig
to be non-nil, there is no need for this code. Remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 17022b3ad2d95863e5acd17ebaf943b7761623cc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ed48a92a580b7ccc5c5837c7d802f787000146eb
Component: engine
2019-04-17 23:09:45 +02:00
00e3442134 TestUpdateRestartWithAutoRemove: use WithAutoRemove
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 39eaf1ef9709d79fc50095ee2a0546bd2f565ab2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9823799281419aae1b30d961d5c719dd6e392e2
Component: engine
2019-04-17 23:09:43 +02:00
2794526c50 Make TestEventsFilterLabels less flaky
This test sometimes failed because the number of events received did not
match the expected number:

    FAIL: docker_cli_events_test.go:316: DockerSuite.TestEventsFilterLabels

    docker_cli_events_test.go:334:
        c.Assert(len(events), checker.Equals, 3)
    ... obtained int = 2
    ... expected int = 3

This patch makes the test more stable, by:

- use a wider range between `--since` and `--until`. These options were set
  so that the client detaches after events were received, but the actual
  range should not matter. Changing the range will cause more events to be
  returned, but we're specifically looking for the container ID's, so this
  should not make a difference for the actual test.
- use `docker create` instead of `docker run` for the containers. the
  containers don't have to be running to trigger an event; using `create`
  speeds up the test.
- check the exit code of the `docker create` to verify the containers were
  succesfully created.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e15c02465c87c82908bcc45b0c1d6bd38f27c32)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 26f7e0a8b08b2890d079d4083735c05377770ca8
Component: engine
2019-04-17 23:09:40 +02:00
463305c389 reduce flakiness of TestSwarmLockUnlockCluster and TestSwarmJoinPromoteLocked
I noticed that this test failed, because the node was in status "pending".

The test checks for the node's status immediately after it was restarted, so
possibly it needs some time to unlock.

    14:07:10 FAIL: docker_cli_swarm_test.go:1128: DockerSwarmSuite.TestSwarmLockUnlockCluster
    ...
    14:07:10 docker_cli_swarm_test.go:1168:
    14:07:10     checkSwarmLockedToUnlocked(c, d)
    14:07:10 docker_cli_swarm_test.go:1017:
    14:07:10     c.Assert(getNodeStatus(c, d), checker.Equals, swarm.LocalNodeStateActive)
    14:07:10 ... obtained swarm.LocalNodeState = "pending"
    14:07:10 ... expected swarm.LocalNodeState = "active"

This patch adds a `waitAndAssert` for the node's status, with a 1 second timeout.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 973ca00d60712ef644b5b37abf7fa01078bb4ade)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 954425f8bdb5db95355cb20be465d248f7c3b1f1
Component: engine
2019-04-17 23:09:37 +02:00
cfd34d85d8 Remove SameHostDaemon, use testEnv.IsLocalDaemon instead
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 43b15e924ffb7790ae087feac7618308a9e4b75e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3304d91f1e69b53e92240fd3c604d178b0601dd5
Component: engine
2019-04-17 23:09:35 +02:00
e887118a6e Remove unused ExperimentalDaemon, NotS390X, NotPausable requirement checks
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 362f737e1ccf9a1c3ac9599f48b10a33fd9b0e08)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 008cc8ee495d5f13d44764e906d92a8999f4c473
Component: engine
2019-04-17 23:09:32 +02:00
80b75da558 integration-cli/Test*Swarm*: use same args on restart
When starting docker daemons for swarm testing, we disable iptables
and use lo for communication (in order to avoid network conflicts).

The problem is, these options are lost on restart, that can lead
to any sorts of network conflicts and thus connectivity issues
between swarm nodes.

Fix this. This does not fix issues with swarm test failures, but
it seems they appear are less often after this one.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 2ed512c7faea938b0b07e69187b8a132e2ecb66a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 553b09684cb68962403ebdc5495fb548364f778f
Component: engine
2019-04-17 23:09:23 +02:00
de3e7fdf71 TestAPISwarmLeaderElection: add some debug
......

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 06afc2d1e6f8c5052af71e8815266d30e29ed664)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2b498de10422c4d887c37ff1d51ac320e88151c8
Component: engine
2019-04-17 23:09:20 +02:00
3a2688e1e5 docker_cli_swarm_test: factor out common code
This is repeated 6 times in different tests, with slight
minor variations. Let's factor it out, for clarity.

While at it, simplify the code: instead of more complex
parsing of "docker swarm init|update --autolock" output (1)
and checking if the key is also present in
"docker swarm unlock-key" output (2), get the key
from (2) and check it is present in (1).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 24cbb9897193894f4716583d1861091ab2fa1ae2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6ec991ec8371bdba94480c587eea6ea24f3e9d43
Component: engine
2019-04-17 23:09:17 +02:00
d81b3ef73b internal/test/daemon: don't leak timers
A timer is leaking on every daemon start and stop.
Probably nothing major, but given the amount of
daemon starts/stops during tests, it's better to
be accurate about it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 6016520162fdcb19f50d08c4f0b54b06a7a6eac0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 784a89354b118ef68f1f20fb4ff383c6282ea03c
Component: engine
2019-04-17 23:09:14 +02:00
84be354cdf docker_cli_swarm_test.go: rm unused arg
Since commit 17173efbe00 checkSwarmLockedToUnlocked() no longer
require its third argument, so remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 66cb1222d6559e120d9d1a29932aa778aa517894)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2a02a2e9dae0045d550e98fa849aceafc0c41a0e
Component: engine
2019-04-17 23:09:12 +02:00
b4531f8e24 integration-cli: fix netns test cleanup
1. Using MNT_FORCE flag does not make sense for nsfs. Using MNT_DETACH
though might help.

2. When -check.vv is added to TESTFLAGS, there are a lot of messages
like this one:

> unmount of /tmp/dxr/d847fd103a4ba/netns failed: invalid argument

and some like

> unmount of /tmp/dxr/dd245af642d94/netns failed: no such file or directory

The first one means directory is not a mount point, the second one
means it's gone. Do ignore both of these.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 73baee2dcf546b2561bdd9a500b0af08cb62b1be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 90cb9b6545fbf7f91cf3eb427f627a7353ea684f
Component: engine
2019-04-17 23:09:09 +02:00
8c5907db72 TestStartReturnCorrectExitCode: show error
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 0d59f4305cbb1aaae1b0c6aab94c1e5a08b50bfb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d52a18f35215b127bd17e2a2d8cbfd2cb9ede5a3
Component: engine
2019-04-17 23:09:06 +02:00
00a7935f14 Windows: Go1.11: Use long path names in build context (TestBuildSymlinkBreakout)
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit b1b9937bc75f0db9c804838ecce9bb6792a42525)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 533b0f602d10af8fe325c3544a2411f5060a47b8
Component: engine
2019-04-17 23:09:04 +02:00
407b652dce integration-cli: fix TestAttachDetach, rm TestAttachDetachTruncatedID
It looks like the logic of the test became wrong after commit
ae0883c ("Move TestAttachDetach to integration-cli").

The original logic was:
* (a few first steps skipped for clarity)
* send escape sequence to "attach";
* check "attach" is exiting (i.e. escape sequence works);
* check the container is still alive;
* kill the container.

Also, timeouts were big at that time, in the order of seconds.

The logic after the above mentioned commit and until now is:
* ...
* send escape sequence to "attach";
* check the container is running (why shouldn't it?);
* kill the container;
* checks that the "attach" has exited.

So, from the "let's check detach using escape sequence is working"
the test became something like "let's check that attach is gone
once we kill the container".

Let's fix the above test, also increasing the timeout waiting
for attach to exit (which fails from time to time on power CI).

Now, the second test, TestAttachDetachTruncatedID, does the exact
same thing, except it uses a truncated container ID. It does not
seem to be of much value, so let's remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9f3a343a5101ab661a6a97c9e149a0b11ccc320a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 17ae129697c10e9f866ffc253bc211f8912588df
Component: engine
2019-04-17 23:09:01 +02:00
9295462ecc Completely remove d.NewClient from testing tools
Favor `d.NewClientT` instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e063099f918a01891db4389aaa6ba843e5d37fa9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1efe4720feb93c7f47d717001091279636f2039e
Component: engine
2019-04-17 23:08:59 +02:00
3153dc5a37 Remove use of deprecated client.NewClient()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3a4bb96ab74125c95702b818725ba92a27e3a450)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fd6a4681ee906890145556a497a81a914c6aed75
Component: engine
2019-04-17 23:08:56 +02:00
d2f16c6807 Use assert.NilError() instead of assert.Assert()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3449b12cc7eefa8ebd0de6ec8b9803c6ee823af0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 93de0314c7e44d625d791fa14d7316da6d1fc9c7
Component: engine
2019-04-17 23:08:54 +02:00
4e454ab962 Add missing error-check in TestAPISwarmManagerRestore
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2e326eba7040042e7b4e9974ebd46aaa6b03dc4f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 092315055ae1cd24732b913fad53767328b20678
Component: engine
2019-04-17 23:08:51 +02:00
0e40cd84ba Use poll.WaitOn in authz_plugin_test.go
This fix uses poll.WaitOn to replace customerized
implementation in authz_plugin_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0492b0997b2fc739a9a6fe6831145297d8149e55)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cdb40114b4b50bb86e03210186823895e4454653
Component: engine
2019-04-17 23:08:49 +02:00
a6c15caac6 Replace deprecated client.WithDialer()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8d3feccfa9dd0c0b5d866eba982c89f739b5e5b2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c1307fc901fe13e3b45be71638734bf91a7e70f
Component: engine
2019-04-17 23:08:46 +02:00
bfd7f1289c integration-cli: remove deprecated daemonHost() utility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3105ca26dc3dc5273e62dec622b8c40a1ae31b91)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8299d037ca8e2d2d43de56287d31ffb3d9a6ea98
Component: engine
2019-04-17 23:08:44 +02:00
777ce45527 Integration tests: remove some duplicated code, and preserve context
This introduces `NoTasksForService` and `NoTasks` poller checks, that
can be used to check if no tasks are left in general, or for a specific
service.

Some redundant checks were also removed from some tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 56a68c15f8a093b1761e77a74d8b7acdfbcb30a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8f6421457d3be6280236aa466e533fb32cb4509b
Component: engine
2019-04-17 23:08:41 +02:00
66a128b214 Refactor TestInspectNetwork
Clean up and refactor this test;

- make `serviceRunningTasksCount` to use a `desired-state` filter
- use subtests, and inline the `validNetworkVerbose` checks; also use
  asserts for the individual checks, so that any failure will log exactly
  what failed
- remove helper functions that are no longer needed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 60d93aab2e68b13b3f22c43add4762d3e8108227)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 046352162f1a23f10a05b59e4fac9d932bcd4f35
Component: engine
2019-04-17 23:08:39 +02:00
df3af968c9 Remove code duplication and consolidate networkIsRemoved
This fix removes code duplication and consolidates networkIsRemoved
into one place.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 28b7824caa9c8f1acc0471136a8a4fd80e51f491)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dd20556e037b262473f3f8163dfc7c21e9161c8e
Component: engine
2019-04-17 23:08:37 +02:00
f976c75276 Remove use of deprecated client.NewEnvClient()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8ff5ecc091278520a890ce58ed891ec354bf6d9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b9102e2a6b4bb79e080e9ce9d46046532df6f152
Component: engine
2019-04-17 23:08:34 +02:00