dinesh
4dd54b83e8
Add storage_opt in v2.1
...
Signed-off-by: dinesh <dineshpy07@gmail.com>
2017-06-27 12:51:21 -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
8512b33e24
Remedy test failures
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-06-06 11:50:09 -07:00
Joffrey F
49605f2715
Add support for build labels in 2.1 and 2.2 format
...
Add cache_from in 2.2 format
Add integration test for build labels
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-23 15:53:06 -07:00
Alexey Rokhin
bffdb7a349
service_test.py reorder imports
...
Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
2017-05-17 16:42:43 +03:00
Alexey Rokhin
61ed6ca8a4
skip cpu_percent test for Linux
...
Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
2017-05-17 16:18:28 +03:00
Alexey Rokhin
3e39aa0709
Fix testcases.py formatting
...
Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
2017-05-17 15:21:35 +03:00
Alexey Rokhin
0043dc4fab
Add cpu_count, cpu_percent, cpus parameters.
...
Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
2017-05-17 14:50:29 +03:00
Joffrey F
fd699c5923
Merge pull request #4742 from shin-/2496-new_scale
...
docker-compose up --scale, scale in config file
2017-04-27 15:52:31 -07:00
Joffrey F
a0cf0a2009
Avoid rebinding tmpfs data volumes when recreating containers
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-25 15:10:57 -07:00
Joffrey F
2ba4e5e8ec
Prevent `docker-compose scale` to be used with a v2.2 config file
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-21 11:42:18 -07:00
Joffrey F
78ee612333
Implement --scale option on up command, allow scale config in v2.2 format
...
docker-compose scale modified to reuse code between up and scale
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-17 19:51:48 -07:00
Joffrey F
94defc159a
Merge pull request #4716 from shin-/4415-init_init_path
...
Add support for service.init
2017-04-10 14:42:18 -07:00
Joffrey F
843a0d82a0
Add support for IPAM options in v2 format
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-10 12:24:05 -07:00
Joffrey F
cc966a7e19
Add support for init and init_path
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-10 12:16:57 -07:00
Joffrey F
732bf52a4e
The interval is too damn small
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-22 14:09:50 -07:00
Daniel Nephin
2acf286ed6
Support V3.2
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-15 11:40:31 -04:00
Joffrey F
d5a2d37d05
Properly resolve build args against host environment values
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-07 18:13:11 -08:00
Joffrey F
dd4e49ef98
Merge pull request #4563 from shin-/3723-mem-reservation
...
Add mem_reservation option to service config in 2.0 and 2.1 formats
2017-03-07 15:23:22 -08:00
Joffrey F
e344fe9a9f
Merge pull request #4566 from shin-/eddwardo-run-v
...
Add --volumes flag to docker-compose run
2017-03-07 15:22:51 -08:00
Joffrey F
ec252350ae
Add mem_reservation option to service config in 2.0 and 2.1 formats
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 18:21:03 -08:00
Joffrey F
bf7c2bc0f8
Use create_host_file in run -v tests to ensure file availability
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 18:13:16 -08:00
Joffrey F
b454268f93
Merge pull request #4565 from shin-/onorua-pids-limit
...
Add pids_limit to service config
2017-03-06 18:09:53 -08:00
Joffrey F
b6fb3f2634
pids_limit not yet supported for swarm services - removing from v3 format
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 14:32:04 -08:00
Joffrey F
7512dccaa8
Add dns_opt to 2.1 schema
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 13:28:52 -08:00
George Lester
c7b8278e78
Implemented dns_opt
...
Signed-off-by: George Lester <glester491@gmail.com>
2017-03-03 15:37:21 -08:00
Yaroslav Molochko
6a151aac04
introducing pids_limit, fix for #4178
...
Signed-off-by: Yaroslav Molochko <y.molochko@anchorfree.com>
2017-03-02 16:44:26 -08:00
Joffrey F
9f8e01fa94
Merge pull request #3543 from milin/master
...
Replace assertEquals with assertEqual in unittests since the former is getting dep…
2017-03-01 16:27:36 -08:00
Joey Payne
33fcfca040
Add test for cache_from
...
Signed-off-by: Joey Payne <jyapayne@gmail.com>
2017-02-21 19:01:30 -07:00
Daniel Nephin
59d1847d9b
Fix some test failures.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-31 09:53:40 -05:00
Daniel Nephin
4053adc7d3
Add an integration test for secrets using bind mounts.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-31 09:53:16 -05:00
Joffrey F
5c2165eaaf
Fix volume definition in v3 schema
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 15:41:31 -08:00
Joffrey F
56a1b02aac
Catch healthcheck exceptions in parallel_execute
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-17 13:22:16 -08:00
Joffrey F
8145429399
Unify healthcheck spec definition in v2 and v3
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-04 13:14:23 -08:00
Joffrey F
04394b1d0a
Expand depends_on to allow different conditions (service_start, service_healthy)
...
Rework "up" and "start" to wait on conditional state of dependent services
Add integration tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-04 11:28:30 -08: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
Joffrey F
e6b2949edc
Merge pull request #4216 from lawliet89/userns_mode
...
Implement `userns_mode` HostConfig for services
2016-12-19 18:12:15 -08:00
Daniel Nephin
e04a12b5ca
Increase minimum version for v3.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-07 11:16:40 -05:00
Yong Wen Chua
62f8b1402e
Implement `userns_mode` HostConfig for services
...
Fixes #3349
This allows the key `userns_mode` to be used in service definitions.
Since `userns_mode` requires API version > 1.23, this is only available
in 2.1 and 3.0 versions of compose file
Signed-off-by: Yong Wen Chua <me@yongwen.xyz>
2016-12-05 14:25:56 +08:00
Joffrey F
60d005b055
Improve robustness of a couple integration tests with occasional failures
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-24 13:58:45 -07:00
Joffrey F
14716bc2da
Merge branch 'master' of https://github.com/dbdd4us/compose into dbdd4us-master
2016-10-17 14:09:09 -07:00
Joffrey F
a5c1e4b0cd
Merge pull request #3991 from shin-/3906-isolation-config
...
Add support for "isolation" in config
2016-10-17 11:02:11 -07:00
dbdd
bdcce13f4a
add support for creating volume and network with label definition
...
Signed-off-by: dbdd <wangtong2712@gmail.com>
2016-10-12 10:35:14 +08:00
Joffrey F
e5ded6ff9b
Add support for enable_ipv6 in network definition.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-06 15:49:08 -07:00
Joffrey F
dc8a39f70d
Add support for "isolation" in config
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-28 15:31:58 -07:00
Joffrey F
f65f89ad8c
Merge pull request #3653 from shin-/3637-link-local-ips
...
Add support for link-local IPs in service.networks definition
2016-09-22 11:58:29 -07:00
Joffrey F
66b395d950
Include docker-py link-local fix and improve integration test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:55:42 -07:00
Joffrey F
fd254caa68
Add support for link-local IPs in service.networks definition
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:55:14 -07:00
George Lester
dada36f732
Supported group_add
...
Signed-off-by: George Lester <glester491@gmail.com>
2016-09-11 23:10:49 -07:00
Jean-François Roche
d824cb9b06
Add support for swappiness constraint
...
Run a service using `docker run --memory-swappiness=0` (see
https://docs.docker.com/engine/reference/run/ )
refs #2383
Signed-off-by: Jean-François Roche <jfroche@affinitic.be>
2016-08-16 11:02:51 +02: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
Ian Campbell
5cdf30fc12
Teardown project and db in ResilienceTest
...
These hold 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
Ian Campbell
0483bcb472
delete DockerClientTestCase.client class attribute on tearDownClass
...
This is a docker.client.Client and therefore contains a connection pool, so
each subclass of DockerClientTestCase can end up holding on to up to 10 Unix
socket file descriptors after the tests contained in the sub-class are
complete.
Before this by the end of a test run I was seeing ~100 open file descriptors,
~80 of which were Unix domain sockets. By cleaning these up only 15 Unix
sockets remain at the end (out of ~25 fds, the rest of which are the Python
interpretter, opened libraries etc).
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-20 15:51:22 +01:00
Aanand Prasad
d7db15ce94
Merge pull request #3364 from TomasTomecek/3355-detailed-error-messages
...
service: detailed error messages for create and start
2016-07-11 16:29:35 -04:00
Jonathan Giannuzzi
83f35e132b
Add support for creating internal networks
...
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-07-11 11:34:01 +02:00
Tomas Tomecek
fea970dff3
service: detailed error messages for create and start
...
Fixes : #3355
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-07-11 10:45:27 +02:00
Aanand Prasad
1e176b58c5
Merge pull request #3592 from stakodiak/fix-privilege-typo
...
Fix a typo in a test's name.
2016-07-06 15:22:05 -07:00
George Lester
6fe5d2b543
Implemented oom_score_adj
...
Signed-off-by: George Lester <glester491@gmail.com>
2016-07-05 23:43:32 -07:00
Jonathan Giannuzzi
3c77db709f
Fix assertion that was always true
...
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-06-20 14:48:45 +02:00
alex
68d73183eb
Fix a typo in a test's name.
2016-06-13 23:36:34 -04:00
Milind Shakya
11a2eab549
Replace assertEquals with assertEqual since the former is getting deprecated soon. Also, fix pep8 E309.
...
Signed-off-by: Milind Shakya <sh.milind@gmail.com>
2016-06-02 16:35:23 -07:00
Joffrey F
842e372258
Eliminate duplicates when merging port mappings from config files
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-20 15:28:35 -07:00
Joffrey F
310b3d9441
Properly handle APIError failures in Project.up
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-02 13:42:05 -07:00
Daniel Nephin
56c6e29819
Unit test for skipping network disconnect.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-15 16:28:59 -04:00
Daniel Nephin
83df95d511
Remove extra ensure_image_exists() which causes duplicate builds.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-08 15:21:12 -04:00
Daniel Nephin
b33d7b3dd8
Prevent unnecessary inspection of containers when created from an inspect.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-06 11:14:42 -04:00
Joffrey F
12ad3ff301
Injecting os.environ in Environment instance happens outside of init method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:28 -07:00
Joffrey F
b99037b4a6
Add support for DOCKER_* variables in .env file
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:28 -07:00
Joffrey F
1801f83bb8
Environment class cleanup
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F
5831b869e8
Update tests for new environment handling
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F
c69d8a3bd2
Implement environment singleton to be accessed throughout the code
...
Load and parse environment file from working dir
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Daniel Nephin
732531b722
Disable a test that is failing against 1.11.0rc1.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-24 12:32:13 -04:00
Aanand Prasad
aaa7b09369
Merge pull request #3181 from dnephin/fix_partial_change_test_failure
...
Fix flaky partial_change state test
2016-03-22 10:14:28 +00:00
Aanand Prasad
a20b84e6d2
Merge pull request #3178 from aanand/2774-off-one-offs
...
Remove one-off containers in `rm` and `down`
2016-03-22 10:12:21 +00:00
Daniel Nephin
5c968f9e15
Fix flaky partial_change state test.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-21 19:07:50 -04:00
Daniel Nephin
be1476f24b
Only allow tmpfs on v2.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-21 14:41:28 -04:00
Joffrey F
5826a2147b
Use enum to represent 3 possible states of the one_off filter
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-21 12:12:52 +00:00
Philip Walls
85c7d3e5ce
Add support for docker run --tmpfs flag.
...
Signed-off-by: Philip Walls <pawalls@rabidgeek.com>
2016-03-18 18:19:48 -04:00
Daniel Nephin
25cbc2aae9
Fix flaky network test.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-18 18:19:16 -04:00
Joffrey F
20c29f7e47
Add flag to up/down to remove orphaned containers
...
Add --remove-orphans to CLI reference docs
Add --remove-orphans to bash completion file
Test orphan warning and remove_orphan option in up
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-15 16:11:49 -07:00
Ilya Skriblovsky
5df774bd10
Fixed testing error handling by `up`
...
Signed-off-by: Ilya Skriblovsky <IlyaSkriblovsky@gmail.com>
2016-03-14 22:55:42 +03:00
Matt Daue
ee136446a2
Fix #2804 : Add ipv4 and ipv6 static addressing
...
- Added ipv4_network and ipv6_network to the networks section in the
service section for each configured network
- Added feature documentation
- Added unit tests
Signed-off-by: Matt Daue <mattdaue@gmail.com>
2016-03-09 18:37:52 -05:00
Joffrey F
d2b065e615
Don't raise ConfigurationError for volume driver mismatch
...
when driver is unspecified
Add testcase
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-07 18:07:41 -08:00
Aanand Prasad
2c75a8fdf5
Extract helper methods for building config objects from dicts
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-02 15:09:48 -08:00
Jesus
6bfb23baaa
Display containers name when scale a container
...
Display in the log output the name of those containers created using the scale command and
change the test_scale_with_api_error test to support the containers name when scale
Signed-off-by: Jesus Rodriguez Tinoco <jesus.rodriguez.tinoco@gmail.com>
2016-02-29 20:19:03 +01:00
Aanand Prasad
adb8de367e
Merge pull request #2388 from dnephin/fix_long_lines
...
Wrap long lines
2016-02-25 16:52:33 -08:00
Daniel Nephin
43ecf8793a
Address old TODO, and small refactor of container name logic in service.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-24 16:19:38 -08:00
Daniel Nephin
d451578152
Make environment variables without a value the same as docker-cli.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-23 11:14:59 -08:00
Daniel Nephin
4b04280db8
Revert "Change special case from '_', None to ()"
...
This reverts commit 677c50650c
.
Revert "Modify service_test.py::ServiceTest::test_resolve_env to reflect new behavior"
This reverts commit 0019037712
.
Revert "Mangle the tests. They pass for better or worse!"
This reverts commit 7ab9509ce6
.
Revert "If an env var is passthrough but not defined on the host don't set it."
This reverts commit 6540efb3d3
.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-23 11:13:57 -08:00
Joffrey F
7152f7ea76
Handle mismatched network formats in config files
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:24:41 -08:00
Daniel Nephin
4a09da43ea
Fix copying of volumes by using the name of the volume instead of the host path.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-17 13:34:14 -05:00
Daniel Nephin
740329a131
Shm_size requires docker 1.10.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-11 13:50:23 -05:00
Spencer Rinehart
5e6dc3521c
Add support for shm_size. Fixes #2823 .
...
shm_size controls the size of /dev/shm in the container and requires
Docker 1.10 or newer (API version 1.22). This requires docker-py 1.8.0
(docker/docker-py#923 ).
Similar to fields like `mem_limit`, `shm_size` may be specified as
either an integer or a string (e.g., `64M`).
Updating docker-py to the master branch in order to get the unreleased
dependency on `shm_size` there in place.
Signed-off-by: Spencer Rinehart <anubis@overthemonkey.com>
2016-02-10 15:25:18 -06:00
Joffrey F
fdf4a2e89e
Merge pull request #2734 from jrabbit/empty-env-var-2359
...
Empty env var #2359
2016-02-08 11:17:54 -08:00
Daniel Nephin
57fc85b457
Wrap long lines and restrict lines to 105 characters.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-04 19:05:39 -05:00
Daniel Nephin
3d3388d59b
Extract volume init and removal from project.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:53:04 -05:00
Daniel Nephin
e551988616
Include networks in the config_hash.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:52:03 -05:00
Daniel Nephin
0810eeba10
Don't initialize networks that aren't used by any services.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:52:03 -05:00
Aanand Prasad
aeef61fcd8
Make 'version' a string
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-02-02 13:58:34 +00:00