Commit Graph

12 Commits

Author SHA1 Message Date
Joffrey F 22d9a258f4 v2 custom volume name support
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-11 11:48:00 -07:00
Joffrey F 6a4adb64f9 Some more test adjustments for Swarm support
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-07-20 16:39:03 -07:00
Joffrey F 7a4c328c41 Rewriting tests to be UCP/Swarm compatible
- Event may contain more information in some cases.
  Don't assume order or format
- Don't assume ports are always exposed on 0.0.0.0 by default
- Absence of HostConfig in a create payload sometimes causes an error at the
  engine level
- In Swarm, volume names are prefixed by "<node_name>/"
- When testing against Swarm, the default network driver is overlay
- Ensure custom test networks are always attachable
- Handle Swarm network names
- Some params moved to host config in recent (1.21+) version
- Conditional test skips for Swarm environments

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-06-14 16:17:15 -07:00
Joffrey F ba47fb99ba Add default labels to networks and volumes created by Compose
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-19 20:43:35 -08:00
Ian Campbell d6f70dddc7 Call the superclass tearDown in VolumeTest
Currently it doesn't actually seem to make any practical difference that this
is missing, but it seems like good practice to do so anyway, to be robust
against future test case changes which might require cleanup done in the super
class.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-21 13:17:53 +01:00
Ian Campbell 3124fec01a tearDown tmp_volumes array itself in VolumeTest
Each volume in the array holds a reference to a docker.client.Client object and
therefore a connection pool which leaves fds open once the test has completed.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-21 13:17:53 +01:00
Joffrey F d601199eb5 Normalize external_name
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-13 12:07:08 -08:00
Joffrey F f774422d18 Test Volume.exists() behavior
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-12 16:58:24 -08:00
Joffrey F 9cb58b796e Implement ability to specify external volumes
External volumes are created and managed by the user.
They are not namespaced.
They are expected to exist at the beginning of the up phase.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-12 16:53:49 -08:00
Joffrey F 05935b5e54 Don't recreate pre-existing volumes.
During the initialize_volumes phase, if a volume using the
non-namespaced name already exists, don't create the namespaced
equivalent.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-12 15:42:42 -08:00
Daniel Nephin bf1552da79 Use json to encode invalid values in configuration errors so that the user sees a proper repr of the value.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-07 13:09:24 -05:00
Joffrey F ec5111f1c2 Volumes are now prefixed with the project name
When created through the compose file, volumes are prefixed
with the name of the project they belong to + underscore,
similarly to how containers are currently handled.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-05 15:21:53 -08:00