Accounting for asynchronous service removals
Swarmkit services' removal will soon become asynchronous (see https://github.com/moby/moby/pull/38525); that is, a service will only actually get deleted once all of its containers are shut down.
This patch changes service tests' tearDown to wait for services to be
actually removed, so that there's no name collision with subsequent tests.
This change is fully backward compatible with the engine's current behaviour.
Couple of other misc changes: consolidated polling in a single
wait_until_truthy function, and allowed passing more flags to py.test in
the makefile test-integration targets through a new optional pytest_options
env variable.
Signed-off-by: Jean Rouge [email protected]
Just to copy over what I said in moby/moby, there should be nothing to change in docker-py (or any API client). If docker-py is broken because of a proposed change in moby, then the proposed change is incorrect.