306 Commits

Author SHA1 Message Date
Mark Gallagher
c27c73efae Remove duplicate values check for build.cache_from
The `docker` command accepts duplicate values, so there is no benefit to
performing this check.

Fixes #7342.

Signed-off-by: Mark Gallagher <mark@fts.scot>
2021-01-26 20:15:15 +01:00
Anca Iordache
f1059d75ed
Merge pull request #7866 from luca-nardelli/improve-mandatory-variables-issues
Report which variable fails interpolation when they are mandatory
2020-12-02 20:06:25 +01:00
Ulysses Souza
675c9674e1 Add Makefile including spec download target
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-27 13:50:17 +01:00
Luca Nardelli
d51249acf4 Report which variable fails interpolation when they are mandatory
Add default value before raising UnsetRequiredSubstitution

Signed-off-by: Luca Nardelli <luca.nardelli@protonmail.com>
2020-10-15 09:55:04 +02:00
Ulysses Souza
ce59a4c223 Fix port rendering
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-24 14:49:26 +02:00
aiordache
fa720787d6 update depends_on tests
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-09-14 18:01:35 +02:00
Kevin Clark
d811500fa0 Added merge for max_replicas_per_node
Signed-off-by: Kevin Clark <kclark@edustaff.org>
2020-09-11 08:01:24 -04:00
Ulysses Souza
fde1c681a7 Preserve the version when specified in the file
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-10 13:10:33 +02:00
alexrecuenco
4d3d9f64b9 Removed Python2 support
Closes: #6890

Some remarks,

- `# coding ... utf-8` statements are not needed
- isdigit on strings instead of a try-catch.
- Default opening mode is read, so we can do `open()` without the `'r'` everywhere
- Removed inheritinng from `object` class, it isn't necessary in python3.
- `super(ClassName, self)` can now be replaced with `super()`
- Use of itertools and `chain` on a couple places dealing with sets.
- Used the operator module instead of lambdas when warranted
    `itemgetter(0)` instead of `lambda x: x[0]`
    `attrgetter('name')` instead of `lambda x: x.name`
- `sorted` returns a list, so no need to use `list(sorted(...))`
- Removed `dict()` using dictionary comprehensions whenever possible
- Attempted to remove python3.2 support

Signed-off-by: alexrecuenco <alejandrogonzalezrecuenco@gmail.com>
2020-08-11 17:45:13 +07:00
Anca Iordache
a2095a2a0c
Merge pull request #7510 from hartwork/issue-7501-stop-using-deprecated-assertequal
tests: Stop using deprecated assertEquals (fixes #7501)
2020-08-03 15:29:39 +02:00
aiordache
cb56036a6e rename schema to compose_spec
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-07-09 15:52:46 +02:00
aiordache
c06b30548d cleanup compatibility and tests
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-07-08 19:07:38 +02:00
aiordache
b78c1ec193 Merge 2.x and 3.x schemas
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-07-08 12:31:39 +02:00
Sebastian Pipping
59d03b1d5e tests: Stop using deprecated assertEquals (fixes #7501)
Signed-off-by: Sebastian Pipping <sebastian@pipping.org>
2020-06-09 19:59:36 +02:00
Bastian Venthur
e8424d5ae0 Removed Python2 support
Closes: #6890

Signed-off-by: Bastian Venthur <bastian.venthur@flixbus.com>
2020-06-03 17:37:47 +02:00
Ulysses Souza
d412a1e47f
Merge pull request #6937 from apollo13/issue6871
Properly escape values coming from env_files, fixes #6871
2020-02-24 11:52:14 +01:00
Anca Iordache
09c80ce49b test update - remove 'placement' from unsupported fields
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-02-07 13:50:06 +01:00
Florian Apolloner
f17e7268b0 Properly escape values coming from env_files, fixes #6871
Signed-off-by: Florian Apolloner <florian@apolloner.eu>
2020-01-28 16:33:28 +01:00
Ulysses Souza
6d2658ea65 Add python-dotenv
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-01-27 13:50:34 +01:00
Ulysses Souza
2cb1b4bd5b
Merge pull request #6873 from frenzymadness/pytest_compatibility
Bump Pytest and add refactor compatibility with new version
2020-01-10 17:09:33 +01:00
Lumir Balhar
a436fb953c Remove indentation from test YAML
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
2020-01-10 08:41:11 +01:00
Sergey Fursov
c818bfc62c support PyYAML up to 5.x version
Signed-off-by: Sergey Fursov <geyser85@gmail.com>
2020-01-09 12:30:51 +01:00
Lumir Balhar
73cc89c15f Use stdlib modules instead of deprecated pytest fixtures
Signed-off-by: Lumír Balhar <lbalhar@redhat.com>
2020-01-09 07:01:44 +01:00
ulyssessouza
7f49bbb998 Validate version format on formats 2+
Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
2020-01-07 18:37:47 +01:00
Aleksandr Mezin
74f892de95 Add test to verify same file 'extends' optimization
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2019-10-09 11:36:17 +06:00
aiordache
60dcf87cc0 update alpine version to 3.10.1
Signed-off-by: aiordache <anca.iordache@docker.com>
2019-08-20 12:10:26 +02:00
Ulysses Souza
cd098e0cad Pin test images on a non rolling tag
Mainly busybox:latest to the current latest which is 1.31.0-uclibc

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-07-18 11:10:37 +02:00
Inconnu08
c37fb783fe replace sets with set literal syntax for efficiency
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-06-01 01:31:35 +06:00
Inconnu08
99e67d0c06 fix warning method is deprecated with tests
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-05-15 23:46:12 +06:00
Michael Irwin
d8e390eb9f Added test case to verify fix for #6525
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2019-03-07 15:30:11 +01:00
Peter Nagy (NPE)
e34d329227 adds --no-interpolate to docker-compose config
Signed-off-by: Peter Nagy <pnagy@gratex.com>
2019-03-04 13:03:35 +01:00
slowr
b09d8802ed Added additional argument (--env-file) for docker-compose to import environment variables from a given PATH.
Signed-off-by: Dimitrios Mavrommatis <jim.mavrommatis@gmail.com>
2019-02-26 16:38:54 +01:00
Djordje Lukic
ae0f3c74a0 Support for credential_spec
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-01-17 16:00:22 +01:00
Joffrey F
4bd93b95a9
Merge pull request #6406 from collin5/b5948
Error on duplicate mount points.
2019-01-02 10:11:50 -08:00
Collins Abitekaniza
47ff8d710c test create from config with duplicate mount points
Signed-off-by: Collins Abitekaniza <abtcolns@gmail.com>
2019-01-02 17:51:22 +03:00
Joffrey F
b7374b6271
Merge pull request #6390 from ulyssessouza/6369-override-networks-settings
Fix merge on networks section
2018-12-28 07:25:57 +09:00
Ulysses Souza
a2bcf52665 Fix merge on networks section
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2018-12-11 10:36:49 +01:00
Hiroshi Ioka
afc161a0b1 reject environment variable that contains white spaces
Signed-off-by: Hiroshi Ioka <hirochachacha@gmail.com>
2018-12-11 12:52:29 +09:00
Joffrey F
d5eb209be0 Fix parse_key_from_error_msg to not error out on non-string keys
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-05 14:02:13 -08:00
Joffrey F
db819bf0b2 Fix config merging for isolation and storage_opt keys
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-02 11:35:34 -07:00
Joffrey F
62057d098f Don't use dot as a path separator as it is a valid character in resource identifiers
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-16 17:21:57 -07:00
Joffrey F
9018511750
Merge pull request #6234 from zasca/tilda_src_paths
Improved expanding source paths of volumes
2018-10-08 18:51:40 +02:00
Alexander
9d7202d122 Squashed commit of the following:
commit d3fbd3d630099dc0d34cb1a93b0a664f633a1c25
Author: zasca <gorstav@gmail.com>
Date:   Wed Oct 3 11:27:43 2018 +0600

    Fix typo in function name, path separator updated

commit bc3f03cd9a7702b3f2d96b18380d75e10f18def0
Author: zasca <gorstav@gmail.com>
Date:   Tue Oct 2 11:12:28 2018 +0600

    Fix endswith arg in the test

commit 602d2977b4e881850c99c7555bc284690a802815
Author: zasca <gorstav@gmail.com>
Date:   Mon Oct 1 12:24:17 2018 +0600

    Update test

commit 6cd7a4a2c411ddf9b8e7d91194c60fb2238db8d7
Author: zasca <gorstav@gmail.com>
Date:   Fri Sep 28 11:13:36 2018 +0600

    Fix last test

commit 0d37343433caceec18ea15babf924b5975b83c80
Author: zasca <gorstav@gmail.com>
Date:   Fri Sep 28 10:58:57 2018 +0600

    Unit test added

commit fc086e544677dd33bad798c773cb92600aaefc51
Author: zasca <gorstav@gmail.com>
Date:   Thu Sep 27 20:28:03 2018 +0600

    Improved expanding source paths of volumes

    defined with long syntax when paths starts with '~'

    Signed-off-by: Alexander <a.gorst.vinia@gmail.com>
2018-10-05 14:52:56 +06:00
Antony MECHIN
bbcfce4029 tests.unit.config: Make sure volume order is preserved.
Signed-off-by: Antony MECHIN <antony.mechin@docker.com>
2018-09-26 15:57:27 +02:00
Antony MECHIN
879f7cb1ed tests.unit.config: Make make_service_dict working dir argument optional.
Signed-off-by: Antony MECHIN <antony.mechin@docker.com>
2018-09-26 10:26:55 +02:00
Joffrey F
9f9122cd95 Don't convert slashes for UNIX paths on Windows hosts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-09-19 11:36:51 -07:00
Joffrey F
9c2ffe6384 Avoid overriding external = False in serializer
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-07-09 15:28:32 -04:00
Joffrey F
5aafa54667 iprange -> ip_range
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-05-01 17:11:14 -07:00
Joffrey F
fa6d837b49 Clearly define IPAM config schema for validation
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-23 19:08:55 -07:00
Joffrey F
7aa51a18ff Fix port serialization with external IP
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-30 18:02:06 -07:00