Commit Graph

5384 Commits

Author SHA1 Message Date
Erik Johnson
5ad476936d Overhaul Docker support
This does the following:

- Splits states for container/volume/image/network management into four
  separate state modules.

- Preserves backward compatibility by making ``docker.image_present``
  invoke ``docker_image.present``, etc.

- Changes how Salt detects that a container needs to be replaced.
  Instead of comparing each passed argument to the named container's
  configuration, it creates a temporary container, and compares that
  container to the named container. If the two differ, then the older
  container is removed, and the new one is renamed and started, becoming
  the named container.

- Removes the unit tests for container management and replaces them with
  integration tests.

- Adds unit tests for the new salt.utils.docker
2017-03-21 16:53:19 -05:00
rallytime
a6a7538fe4 Pylint fix 2017-03-21 13:39:34 -06:00
rallytime
2222e1cae9 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/napalm_network.py
  - tests/integration/states/test_archive.py
  - tests/integration/states/test_file.py
  - tests/unit/modules/test_docker.py
2017-03-21 10:19:52 -06:00
Bo Maryniuk
9e5bf58e42 Fix test: underscore alias is found 2017-03-21 10:49:18 +01:00
Bo Maryniuk
bceb6d0f56 Add with_deprecated test misconfiguration 2017-03-21 10:48:54 +01:00
Bo Maryniuk
54416ed2e8 Add with_deprecated test with opt-in policy configured 2017-03-21 10:47:26 +01:00
Bo Maryniuk
9f8bb257df Add with_deprecated test with opt-in policy by default 2017-03-21 10:46:53 +01:00
Bo Maryniuk
66dff82062 Fix unit test: log messages has been changed 2017-03-21 09:29:48 +01:00
Bo Maryniuk
52125c732b Pylint: W1699 2017-03-20 22:31:54 +01:00
Bo Maryniuk
fa8bd76c8b Fix unit test for a deprecation decorator policy 2017-03-20 22:31:54 +01:00
Bo Maryniuk
717c39bb4c Add unit test for batch call 2017-03-20 22:31:53 +01:00
Bo Maryniuk
88dc91f9a7 Add unit test for typed returns 2017-03-20 22:31:53 +01:00
Bo Maryniuk
af81a00130 Add unit test for None returns 2017-03-20 22:31:53 +01:00
Bo Maryniuk
88c6e9485b Add docstring to the unit test 2017-03-20 22:31:53 +01:00
Bo Maryniuk
4fa3793bee Add unit test for module.xrun call with the correct unnamed arguments 2017-03-20 22:31:53 +01:00
Bo Maryniuk
796b0e2690 Add unit test to call a function with an unexpected keywords 2017-03-20 22:31:53 +01:00
Bo Maryniuk
2314b49f54 Add unit test to call function with a proper arguments 2017-03-20 22:31:53 +01:00
Bo Maryniuk
3ab7d6c458 Refactor unit tests for reusing constants 2017-03-20 22:31:53 +01:00
Bo Maryniuk
3d63165f16 Add unit test for missing args 2017-03-20 22:31:53 +01:00
Bo Maryniuk
33a16d69cc Add xrun unit test for module is ran in a test mode 2017-03-20 22:31:53 +01:00
Bo Maryniuk
6bbf7232a1 Add test for module is not available 2017-03-20 22:31:53 +01:00
Bo Maryniuk
803b3ce637 Fix existing tests by proper patching and reusing existing constants 2017-03-20 22:31:53 +01:00
Mike Place
461e15f0f4 Merge pull request #40158 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-03-20 14:34:22 -06:00
rallytime
f32d8a8683 Don't try to run the dockerng unit tests if docker-py is missing 2017-03-20 13:34:15 -06:00
rallytime
f4d4768a6d Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/utils/__init__.py
2017-03-20 11:08:28 -06:00
Ivan Babrou
af1545deed
Use the first address if cannot connect to any
This fixes #39995. The previous work happened in #39289.
2017-03-18 21:09:16 -07:00
Nicole Thomas
08d6b96171 Merge pull request #39977 from bodhi-space/infra4506
INFRA-4506 - various fixes as detailed below
2017-03-14 15:52:32 -06:00
rallytime
f6cd372358 Update boto_asg state file unit test mocks to account for changes in #3997 2017-03-14 14:05:20 -06:00
Mike Place
51fb191157 Merge pull request #39841 from rafaelcaricio/telegram-beacon
Telegram beacon
2017-03-14 13:30:37 -06:00
Mike Place
9495664f0f Merge pull request #40002 from s0undt3ch/features/py3
Minor Py3 test module fix
2017-03-14 12:44:36 -06:00
Nicole Thomas
dd2bcb7c26 Merge pull request #39888 from ni3mm4nd/module_grains
Add function for matching key/value grains
2017-03-14 11:36:40 -06:00
Nicole Thomas
350edbe7e6 Remove unused import in test_core.py 2017-03-14 10:28:42 -06:00
Jan Kadlec
a797a58ee6 Change function name to equals 2017-03-14 17:15:52 +01:00
Daniel Wallace
b839193443 Use linux_distribution from distro if not in platform
http://bugs.python.org/issue1322

python 3.7 is deprecating the platform.{linux_distribution,dist}
functions.  They are being moved to the `distro` module on pypi.  This
adds support for using the distro module if platform does not have the
needed functions.
2017-03-14 10:09:47 -05:00
Pedro Algarvio
7e58bde7d0
We need to compare lists under Python3 not dict_keys vs list 2017-03-14 02:17:30 +00:00
Jan Kadlec
ea7faa0935 Rename function key_value_match to is 2017-03-11 07:35:24 +01:00
rallytime
9ddf032e8e Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/minion.rst
  - salt/beacons/status.py
  - salt/modules/saltutil.py
  - salt/utils/schedule.py
  - tests/integration/modules/test_beacons.py
  - tests/unit/beacons/inotify_beacon_test.py
2017-03-10 14:57:31 -07:00
Mike Place
899e037f0a Merge pull request #39932 from rallytime/cp-beacon-fixes
Cherry-pick the beacon fixes made in #39930 to 2016.11
2017-03-09 17:21:08 -07:00
Nicole Thomas
c2d4d17589 Merge pull request #39770 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-03-09 15:00:17 -07:00
rallytime
4a52cca926 Pylint fixes 2017-03-09 14:55:33 -07:00
Pedro Algarvio
be06df9b64 Remove *args, **kwargs. Not needed, not useful. 2017-03-09 13:11:07 -07:00
Pedro Algarvio
4a242829ee These tests aren't even using mock!
Conflicts:
  - tests/unit/beacons/inotify_beacon_test.py
2017-03-09 13:10:43 -07:00
Pedro Algarvio
6408b123e7 These tests are not destructive
Conflicts:
  - tests/unit/beacons/inotify_beacon_test.py
2017-03-09 13:09:32 -07:00
Pedro Algarvio
8f5fc49fcc
Add test case for the status beacon. Refs #38121
Tests proper handling of both the old configuration format and the new one
2017-03-09 19:33:13 +00:00
Pedro Algarvio
d56d6059f0
Remove *args, **kwargs. Not needed, not useful. 2017-03-09 19:31:14 +00:00
Pedro Algarvio
17c9490a45
These tests aren't even using mock! 2017-03-09 19:31:14 +00:00
Pedro Algarvio
38ceeb6f19
These tests are not destructive 2017-03-09 19:31:13 +00:00
Nicole Thomas
2f0f7cd224 Merge pull request #39897 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-03-09 09:03:46 -07:00
Pedro Algarvio
50e49f1353 Merge pull request #39907 from gtmanfred/listen
Move stuff to make it available for salt-ssh
2017-03-09 09:33:46 +00:00
Daniel Wallace
587b7fc7f3 fix test 2017-03-08 18:53:19 -06:00