Commit Graph

5452 Commits

Author SHA1 Message Date
Pedro Algarvio
8325a58a35
Proper mocking but I'm lost as to what is actually being tests here 2017-03-28 19:00:53 +01:00
Pedro Algarvio
a894eebf31
Code cleanup. Proper mocking!!! 2017-03-28 19:00:53 +01:00
Pedro Algarvio
5216ff0932
Code cleanup. Proper mocking 2017-03-28 19:00:52 +01:00
Pedro Algarvio
278275cf37
Fix StringVersion and LooseVersion. Add unit tests. 2017-03-28 19:00:52 +01:00
Pedro Algarvio
ea81540cce
Code cleanup. Proper mocking. 2017-03-28 19:00:52 +01:00
Pedro Algarvio
fb9c15ad07
Proper mocking. Code cleanup. 2017-03-28 19:00:52 +01:00
Pedro Algarvio
ccea1fb6a4
Proper mocking. Removed destructive tests decorator.
Creating or deleting files under a temporary directory does not apply as
a destructive test
2017-03-28 19:00:52 +01:00
Pedro Algarvio
1f7a0aa65b
Proper mocking 2017-03-28 19:00:51 +01:00
Pedro Algarvio
87e9f5e676
Mock patching. The right way. 2017-03-28 19:00:51 +01:00
Pedro Algarvio
b25b26e23d
Cleanup test attributes once finished 2017-03-28 19:00:51 +01:00
Pedro Algarvio
6f79dd6af3
Not an integration test 2017-03-28 19:00:51 +01:00
Pedro Algarvio
993c488ea7
Cleanup attributes 2017-03-28 19:00:50 +01:00
Pedro Algarvio
6b22c6419f
Fixed tests not written for py3
The tests happened to work because py2 does not default to absolute
imports, contrary to py3.
Additionally, with py3 absolute imports we must remove imported libs
from `sys.modules`(not salt loader modules)
2017-03-28 19:00:50 +01:00
Pedro Algarvio
7219a35656
These are not integration tests 2017-03-28 19:00:50 +01:00
Mike Place
d7e745a53a Merge pull request #40281 from terminalmage/rename-docker
Rename docker execution module to avoid shadowing in the loader
2017-03-28 11:06:08 -06:00
Mike Place
d8cabca9a6 Merge pull request #40349 from ferringb/develop
ticket #40348: fix pillar include key nested support
2017-03-28 11:04:19 -06:00
Mike Place
b6032215e9 Merge pull request #40299 from amendlik/saltify-authtest
Saltify authtest
2017-03-28 10:17:02 -06:00
Erik Johnson
774a3f1147 Rename docker execution module to avoid shadowing in the loader
With the merging of #39996, salt/modules/docker.py now imports
salt.utils.docker. However, our loader appends the module dir (in
this case salt/modules/) to sys.path temporarily for the length of the
loading process. So, as the docker execution module tries to import
salt.utils.docker, when salt.utils.docker attempts to do an "import
docker", and docker-py is *not* installed, this results in
salt/modules/docker.py (the docker execution module) being loaded in its
place, which results in tracebacks in the minion log.

Renaming the docker execution module keeps this import shadowing from
occurring. Note that we don't need to do this for the placeholder
salt/states/docker.py as it does not import salt.utils.docker.
2017-03-28 10:50:47 -05:00
Adam Mendlik
6c6e8d17bc Update unit test for Saltify with credential verification 2017-03-27 19:20:38 -06:00
Mike Place
75565df5da Merge pull request #39884 from Juniper/develop
unit tests for junos specific code
2017-03-27 18:35:58 -06:00
Brian Harring
80ebd77d67 ticket 40348: fix pillar include key nested support
Extend pillar include support so that nesting is possible
for the key directive.

Given the following pillar files:

foo1.sls:
include:
- foo:
    key: two:levels

foo2.sls:
foon: blah

After this commit, it'll result in the following pillar data:

two:
  levels:
    foon: blah

Currently, it results in the following data which is far less useful
for usage, and in ability to be addressed:

two:levels:
  foon: blah
2017-03-27 17:19:24 -07:00
Mike Place
e15e65dc9f Merge pull request #40276 from skizunov/develop2
rabbitmq: Do not use `__context__` for persistent globals
2017-03-27 17:37:26 -06:00
Nicole Thomas
74cc74d784 Merge pull request #40246 from tonybaloney/fix_libcloud_dns_bug
Fix libcloud_dns state module bug
2017-03-27 08:49:13 -06:00
vnitinv
a9acd532d1 fix lint in test_junos.py 2017-03-27 11:33:42 +05:30
rajvidhimar
f629feaabd Take care of import error and add condition to skip tests if PyEZ is not installed 2017-03-26 17:27:32 +05:30
Anthony Shaw
ee0daa1b64
remove unused imports 2017-03-25 11:44:55 +11:00
vnitinv
146f8abc4c sync with upstream 2017-03-24 12:18:14 +05:30
Anthony Shaw
10c84303db
fix unit tests 2017-03-24 15:13:03 +11:00
Anthony Shaw
605a12dbc0
linting 2017-03-24 14:05:19 +11:00
Sergey Kizunov
64d224ad02 rabbitmq: Do not use __context__ for persistent globals
The rabbitmq module was using `__context__` to store paths of
rabbitmq executables. `__context__` may be cleared but the module
still could remain in use, in which case it would fail to work
correctly. Move the paths of the rabbitmq executables to their own
global variables so that they are not affected by the lifespan of
`__context__`.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2017-03-23 14:46:36 -05:00
Mike Place
e462a04d70 Merge pull request #40200 from DSRCorporation/features/zh864_auth_redesign
E-Auth refactoring
2017-03-23 13:32:20 -06:00
rallytime
62b31d7620 Pylint fixes 2017-03-23 10:00:20 -06:00
Anthony Shaw
1efd5a19fb
linting 2017-03-23 22:12:12 +11:00
Anthony Shaw
065e45188d
fix up tests 2017-03-23 20:18:41 +11:00
rallytime
235a768872 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/returners/influxdb_return.py
  - salt/states/dockerng.py
  - salt/utils/schedule.py
  - tests/unit/modules/test_docker.py
  - tests/unit/states/dockerng_test.py
  - tests/unit/utils/test_schedule.py
2017-03-22 17:44:08 -06:00
Dmitry Kuzmenko
37b35a19c7 Bugs and tests fixes. 2017-03-22 16:00:51 +03:00
rajvidhimar
2868755128 Remove usage of nose in junos unit tests 2017-03-22 17:08:19 +05:30
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
Nicole Thomas
82cee58e72 Merge pull request #40194 from terminalmage/fix-docker-test-imports
Change imports for dockerng tests
2017-03-21 13:34:54 -06:00
Erik Johnson
6caedb0de8 Change imports for dockerng tests
This should fix path issues in the test suite.
2017-03-21 11:56:29 -05:00
Mike Place
d9cb222aa8 Merge pull request #40034 from sp1r/fix-pillar-scheduling
Disallow modification of jobs from pillar with schedule execution module
2017-03-21 10:36:33 -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