Commit Graph

1032 Commits

Author SHA1 Message Date
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
Joffrey F 95c6cc0420 Merge pull request #3994 from shin-/3430-enable-ipv6
Add support for enable_ipv6 in network definition.
2016-10-17 11:02:00 -07:00
realityone 22d91f60be
fix serialize restart spec with null string
Signed-off-by: realityone <realityone@me.com>
2016-10-14 18:20:55 +08: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 e4bb9bde30 Merge pull request #3964 from shin-/3963-unicode-env
Don't break when interpolating environment with unicode characters
2016-10-11 12:00:36 -07:00
Joffrey F 7f1606545d Merge pull request #4004 from shin-/4000-extend-logging
Properly merge logging dictionaries in overriding configs
2016-10-11 12:00:06 -07:00
Joffrey F 0603b445e2 Properly merge logging dictionaries in overriding configs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-10 15:39:05 -07:00
Joffrey F 9248298a4a Merge pull request #4016 from shin-/4008-unicode-formatter
Handle formatter case where logrecord message is binary containing unicode
2016-10-06 16:49:03 -07:00
Joffrey F bc3ed6dead Merge pull request #3992 from shin-/3701-npipe-windows-default
Use docker-py's default behavior when no explicit host on Windows
2016-10-06 16:48:35 -07: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 17c5b45641 Handle formatter case where logrecord message is binary containing
unicode characters.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-06 15:39:47 -07:00
Daniel Nephin 2bce81508e Support non-alphanumeric default values.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-06 17:04:19 -04:00
Daniel Nephin fe08be698d Support inline default values.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-29 12:46:11 -04:00
Joffrey F 007cf96452 Use docker-py's default behavior when no explicit host on Windows
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-28 15:36:57 -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 53fa44c01e Don't break when interpolating environment with unicode characters
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 18:05:59 -07:00
Joffrey F 7687412e03 Merge pull request #3922 from shin-/3897-volumespec_parse_win32
Improve volumespec parsing on windows platforms
2016-09-20 13:09:37 -07:00
Joffrey F 33424189d4 Denormalize function defaults to latest version
Minor docs fix

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 11:47:14 -07:00
Joffrey F 7911659266 Improve volumespec parsing on windows platforms
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 11:24:24 -07:00
Joffrey F 1648a3e257 Merge pull request #3709 from Knetic/groupadd
Supported group_add
2016-09-19 17:18:06 -07:00
Joffrey F 64517e31fc Force default host on windows to the default TCP host (instead of npipe)
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-16 11:43:25 -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
Joffrey F 651283eef9 Merge pull request #3941 from shin-/3888-recover-apierror-logs
Catch APIError while printing container logs
2016-09-13 12:58:40 -07:00
Joffrey F f065ce0f73 Merge pull request #3942 from shin-/3873-syslog-logs-error
Only allow log streaming if logdriver is json-file
2016-09-13 12:28:27 -07:00
Joffrey F 3fcd648ba2 Catch APIError while printing container logs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-13 12:10:41 -07:00
Joffrey F 7dd2e33057 Only allow log streaming if logdriver is json-file or journald
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-13 11:56:26 -07:00
Aanand Prasad 9759f27fa6 Fix integration test on Docker for Mac
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-09-13 14:50:37 +01:00
George Lester dada36f732 Supported group_add
Signed-off-by: George Lester <glester491@gmail.com>
2016-09-11 23:10:49 -07:00
Joffrey F 3dec600d82 Merge pull request #3830 from shin-/3534-machine-config-args
Remove surrounding quotes from TLS paths, if present
2016-09-07 18:35:43 -07:00
Joffrey F 267a243f80 Merge pull request #3799 from aanand/handle-connection-error-on-project-init
Handle connection errors on project initialization
2016-09-06 10:25:48 -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
Joffrey F c0305024f5 Remove surrounding quotes from TLS paths, if present
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-09 15:13:01 -07:00
Aanand Prasad d29f8e1022 Merge pull request #3789 from shin-/3788-json-splitter-fix
json_splitter: Don't break when buffer contains leading whitespace.
2016-08-03 13:23:52 +01:00
Aanand Prasad b3a4d76d4f Handle connection errors on project initialization
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-08-02 11:44:25 +01:00
Joffrey F 6f4be1cffc json_splitter: Don't break when buffer contains leading whitespace.
Add error logging with detailed output for decode errors

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-29 14:05:59 -07:00
Aanand Prasad 5aeeecb6f2 Fix stacktrace when handling timeout error
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-29 17:12:46 +01:00
Aanand Prasad e9d62e8404 Merge pull request #3676 from aanand/warn-for-swarm-mode
Show a warning when engine is in swarm mode
2016-07-27 15:38:09 +01:00
Ben Firshman 1877a41b92
Add user agent to API calls
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-07-27 14:26:15 +01:00
Aanand Prasad 887ed8d1b6 Rename --fetch-digests to --push-images and remove auto-pull
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-25 17:36:24 +01:00
Aanand Prasad 2c9e46f60f Show a warning when engine is in swarm mode
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-25 13:46:56 +01:00
Nikola Kovacs 958758ff6d Remove anonymous volumes when using run --rm.
Named volumes will not be removed.
This is consistent with the behavior of docker run --rm.

Fixes #2419, #3611

Signed-off-by: Nikola Kovacs <nikola.kovacs@gmail.com>
2016-07-25 11:43:30 +02:00
Daniel Nephin 619bf4c4df Merge pull request #3705 from aanand/fix-timeout-message
Fix timeout value in error message
2016-07-22 10:57:41 -04:00
Daniel Nephin 10749e187c Merge pull request #3718 from aanand/fix-run-entrypoint
Fix bugs with entrypoint/command in docker-compose run
2016-07-22 10:55:25 -04: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
Ian Campbell 6649e9aba3 tearDown the project override at the end of each test case
self._project.client is a docker.client.Client, so creating a new self._project
leaks (via the embedded connection pool) a bunch of Unix socket file
descriptors for each test which overrides self.project using this mechanism.

In my tests I observed the test harness using 800-900 file descriptor, which is
OK on Linux with the default limit of 1024 but breaks on OSX (e.g. with
Docker4Mac) where the default limit is only 256. The failure can be provoked on
Linux too with `ulimit -n 256`.

With this fix I have observed the process ending with ~100 file descriptors
open, including 83 Unix sockets, so I think there is likely at least one more
leak lurking.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-20 14:34:12 +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
Aanand Prasad 593d1aeb09 Fix bugs with entrypoint/command in docker-compose run
- When no command is passed but `--entrypoint` is, set Cmd to `[]`
- When command is a single empty string, set Cmd to `[""]`

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-11 16:15:13 -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 4207d43b85 Fix timeout value in error message
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-07 12:08:47 -07: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
Aanand Prasad 554dc2496a Merge pull request #3590 from Knetic/oomscore
Added support for oom_score_adj
2016-07-06 11:45:09 -07:00
Aanand Prasad 949b88fff9 Fix alias tests on 1.11
The fix in 8e04582052 caused a regression
when testing against 1.11.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-06 09:56:25 -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
Aanand Prasad 50d5aab8ad Fix test: check container's Env array instead of the output of 'env'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-06-30 17:00:30 -07:00
Joffrey F 5d244ef6d8 Unset env vars behavior in 'run' mirroring engine
Unset env vars passed to `run` via command line options take the
value of the system's var with the same name.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-30 15:48:23 -07:00
Aanand Prasad 72d3d5d84b Merge pull request #3612 from dnephin/tests_for_bundle
Add some unit tests and an acceptance test for bundle
2016-06-28 14:47:29 -07:00
Daniel Nephin 5640bd42a8 Add an acceptance test for bundle.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-28 10:18:59 -04:00
Daniel Nephin 95207561bb Add some unit tests for new bundle and push commands.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-28 10:18:20 -04:00
Aanand Prasad 8e04582052 Fix tests to accommodate short-id container alias
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-06-27 16:21:19 -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
Joffrey F ee68a51e28 Skip TLS version test if TLSv1_2 is not available on platform
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-14 12:23:04 -07:00
Aanand Prasad 8f8c17bf66 Merge pull request #3549 from shin-/KalleDK-master
Add support for COMPOSE_TLS_VERSION config option
2016-06-14 10:57:12 -07:00
Aanand Prasad 21f20cbc9b Merge pull request #3449 from Andrey9kin/ready/3281
Fix #3281: Unexpected result when using build args with default values
2016-06-14 08:05:07 -07:00
alex 68d73183eb Fix a typo in a test's name. 2016-06-13 23:36:34 -04:00
Joffrey F 60f7e021ad Fix split_path_mapping behavior when mounting "/"
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-13 15:32:10 -07:00
Aanand Prasad e502417df2 Merge pull request #3475 from shin-/3429-networks-config-serialize
Output valid config in config command
2016-06-07 18:01:39 +02:00
Joffrey F ea640f3821 Remove external_name from serialized config output
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-03 12:10:09 -07:00
Joffrey F e7a8b2fed5 Update TLS version configuration code. Tests.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-03 11:45:22 -07: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
Andrey Devyatkin a67ba5536d Fix #3281: Unexpected result when using build args with default values
Fix the issue when build arg is set to None instead of empty string. Usecase:

cat docker-compose.yml
  .... args:
  - http_proxy
  - https_proxy
  - no_proxy

If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads

With this change undefined build args will be set to empty string instead of string None

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-28 11:39:41 +02:00
Andrey Devyatkin c148849f0e Fix #3281: Unexpected result when using build args with default values
Fix the issue when build arg is set to None instead of empty string. Usecase:

cat docker-compose.yml
.... args:
- http_proxy
- https_proxy
- no_proxy

If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads

With this change undefined build args will be set to empty string instead of string None

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-27 20:16:52 +02:00
Denis Makogon 1298b9aa5d Issue-3503: Improve timestamp validation in tests
CLITestCase.test_events_human_readable fails due to
 wrong assumption that host where tests were launched
 will have the same date time as Docker daemon.

 This fix introduces internal method for validating
 timestamp in Docker logs

Signed-off-by: Denys Makogon <lildee1991@gmail.com>
2016-05-27 14:50:13 +03:00
Andrey Devyatkin e3e8a619cc Fix #3281: Unexpected result when using build args with default values
Fix the issue when build arg is set to None instead of empty string.
Usecase:

cat docker-compose.yml
....
args:
- http_proxy
- https_proxy
- no_proxy

If http_proxy, https_proxy, no_proxy environment variables are not defined
then http_proxy, https_proxy, no_proxy build args will be set to string None which breaks all downloads

With this change build args will not passed to docker engine if they are equal to string None

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-27 07:48:13 +02: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
Aanand Prasad 7763122ecb Merge pull request #3459 from shin-/2487-split-volume-path
Always use the Windows version of splitdrive when parsing volume mappings
2016-05-20 11:42:43 +01:00
Joffrey F 2b5b665d3a Add test for path mapping with Windows containers
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-19 14:53:37 -07:00
Joffrey F db0a6cf2bb Always use the Windows version of splitdrive when parsing volume mappings
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-17 16:33:59 -07:00
Joffrey F 844b7d463f Update rm command to always remove one-off containers.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-16 14:59:33 -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
Joffrey F 0b24883cef Support combination of shorthand flag and equal sign for host option
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-04-28 12:52:00 -07:00
Aanand Prasad 756ef14edc Fix format of 'restart' option in 'config' output
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-26 19:21:03 +01:00
Aanand Prasad 6064d200f9 Fix output of 'config' for v1 files
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-26 19:21:03 +01:00
Aanand Prasad 84a3e2fe79 Check full error message in test_up_with_net_is_invalid
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-26 19:21:03 +01:00
Aanand Prasad a4d3dd6197 Remove v2_only decorators on config tests
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-26 19:21:03 +01:00
Patrice FERLET ba10f1cd55 Fix the tests from jenkins
Acceptance tests didn't set "help" command to return "0" EXIT_CODE.

close #3354
related #3263

Signed-off-by: Patrice Ferlet <metal3d@gmail.com>
2016-04-20 13:23:37 +02:00
Aanand Prasad 984f839d33 Merge pull request #3263 from twitherspoon/3191_2_help_cli_feature
Added code to support no argument help command
2016-04-19 12:14:24 +01:00
Aanand Prasad 52fa010ac7 Merge pull request #3337 from dnephin/check_for_short_id_alias
Check for short id alias, and don't disconnect if it already exists
2016-04-19 12:12:43 +01:00
johnharris85 6d2805917c Account for aliased links
Fix failing tests
Signed-off-by: John Harris <john@johnharris.io>
2016-04-17 15:25:06 -04:00
johnharris85 377be5aa1f Adding tests
Signed-off-by: John Harris <john@johnharris.io>
2016-04-17 14:01:06 -04: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
Danyal Prout 339ebc0483 Fixes #2096: Only show multiple port clash warning if multiple containers
are about to be started.

Signed-off-by: Danyal Prout <me@dany.al>
2016-04-12 20:58:21 +01:00
Tony Witherspoon ae46bf8907 Updated StringIO import to support io module
Signed-off-by: Tony Witherspoon <tony.witherspoon@gmail.com>
2016-04-12 12:29:59 -04:00
Tony Witherspoon 276738f733 Updated cli_test.py to validate against the updated help command conditions
Signed-off-by: Tony Witherspoon <tony.witherspoon@gmail.com>
2016-04-12 11:47:15 -04:00
Aanand Prasad 7781f62ddf Attempt to fix flaky logs test
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-12 12:07:13 +01:00
Aanand Prasad 15c5bc2e6c Rename a couple of functions in parallel.py
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-11 13:05:30 +01: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
Aanand Prasad ffab27c049 Test events coming out of parallel_execute_stream in error case
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-08 18:53:16 +01:00
Aanand Prasad 3720b50c3b Extract get_deps test helper
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-08 18:48:07 +01:00
Aanand Prasad 141b96bb31 Abort operations if their dependencies fail
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-08 17:51:09 +01:00
Tony Witherspoon f5b80640fe Merge branch '3191_2_help_cli_feature' of https://github.com/twitherspoon/compose into 3191_2_help_cli_feature 2016-04-07 12:46:27 -04:00
Tony Witherspoon 5d0aab4a8e updated cli_test.py to no longer expect raised SystemExit exceptions
Signed-off-by: Tony Witherspoon <tony.witherspoon@gmail.com>
2016-04-07 12:42:14 -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 d27b82207c Remove obsolete assert_hostname tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-30 10:58:15 -07:00
Joffrey F 7116aefe43 Fix assert_hostname logic in tls_config_from_options
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-28 17:39:20 -07: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 36f1b4589c Limit occurrences of creating an environment object.
.env file is always read from the project_dir

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F f48da96e8b Test get_project_name from env file
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F d55fc85fea Added default env file test.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -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 fd020ed2cf Tests use updated get_config_paths_from_options signature
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 c3eca82749 Merge pull request #3128 from dnephin/add_network_settings_to_config_hash
Include network settings as part of the service config hash.
2016-03-23 17:01:32 +00:00
Joffrey F 2cc87555cb tls_config_from_options unit tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-22 11:57:45 -07: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
Aanand Prasad 2bf5e46857 Stop and remove still-running one-off containers in 'down'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-21 18:08:07 +00:00
Aanand Prasad a2317dfac2 Remove one-off containers in 'docker-compose down'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-21 16:15:49 +00: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
Joffrey F 187ea4cd81 Add --all option to rm command - remove one-off containers
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-21 12:12:52 +00:00
Daniel Nephin dfac48f3f5 Make a new flaky test less flaky.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-18 18:20:03 -04:00
Daniel Nephin 089ec66522 Include network settings as part of the service config hash.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-18 18:20:03 -04: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
Thomas Grainger 20bf05a6e3 Fix TypeError in Exception handling
Traceback (most recent call last):
  File "/tmp/tmp.02tgGaAGtW/docker-compose/bin/docker-compose", line 11, in <module>
    sys.exit(main())
  File "/tmp/tmp.02tgGaAGtW/docker-compose/lib/python3.4/site-packages/compose/cli/main.py", line 68, in main
    log_api_error(e)
  File "/tmp/tmp.02tgGaAGtW/docker-compose/lib/python3.4/site-packages/compose/cli/main.py", line 89, in log_api_error
    if 'client is newer than server' in e.explanation:
TypeError: 'str' does not support the buffer interface

Signed-off-by: Thomas Grainger <tagrain@gmail.com>
2016-03-17 15:13:01 +00:00
Aanand Prasad 371ea479f5 Merge pull request #3075 from dnephin/reactive_logs
Display logs for new containers started after the command is run
2016-03-16 21:03:25 +00:00
Aanand Prasad abddabfb0a Merge pull request #3135 from dnephin/fix_down_idempotency
Make down idempotent, continue to remove resources if one is missing
2016-03-16 20:26:18 +00:00
Joffrey F dd40331b44 Merge pull request #3102 from shin-/1477-a-modest-proposal
Add flag to up/down to remove orphaned containers
2016-03-16 10:58:15 -07: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
Simon van der Veldt 658803edf8 Add -w or --workdir to compose run to override workdir from commandline
Signed-off-by: Simon van der Veldt <simon.vanderveldt@gmail.com>
2016-03-15 15:28:32 -04:00
Daniel Nephin bf96edfe11 Reduce the args of some functions by including presenters as part of the thread_args.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 15:15:00 -04:00
Daniel Nephin e5529a89e1 Make down idempotent, continue to remove resources if one is missing.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:26:29 -04:00
Daniel Nephin e8a93821d4 Fix race condition where a container stopping and starting again would cause logs to miss logs.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:11 -04:00
Daniel Nephin 8d9adc0902 Fix flaky log test by using container status, instead of boolean state.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Daniel Nephin 48ed68eeaa Fix geneartors for python3.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Daniel Nephin 4312c93eae Add an acceptance test to show logs behaves properly for stopped containers.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Daniel Nephin 44c1747127 Add tests for reactive log printing.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Daniel Nephin 65797558f8 Refactor log printing to support containers that are started later.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04: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
Ilya Skriblovsky f933381a12 Dependency-ordered start/stop/up
Signed-off-by: Ilya Skriblovsky <IlyaSkriblovsky@gmail.com>
2016-03-14 22:55:42 +03:00