Commit Graph

80092 Commits

Author SHA1 Message Date
Pedro Algarvio
99bc71dc4e
Proper mocking. 2017-03-28 19:04:01 +01:00
Pedro Algarvio
14db38979c
Proper mocking. Py3 Compat. 2017-03-28 19:04:01 +01:00
Pedro Algarvio
5d79bdb642
Python 3 compat 2017-03-28 19:04:01 +01:00
Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage 2017-03-28 19:03:59 +01:00
Pedro Algarvio
7c9460b719
Reduce complexity while still allowing multiple loader modules to be mocked
This also goes in par with the effort to reduce memory usage since we no
longer have any class attributes attached to the test classes.
2017-03-28 19:02:51 +01:00
Pedro Algarvio
608402359f
Proper mocking. Windows compat. 2017-03-28 19:02:51 +01:00
Pedro Algarvio
e7768705f9
Allow passing different loader_module_globals per loader_module 2017-03-28 19:02:51 +01:00
Pedro Algarvio
93ad2cc428
Proper mocking. Code is mocked! Runs on non windows too. 2017-03-28 19:02:51 +01:00
Pedro Algarvio
5c13f7b2bb
Proper mocking. 2017-03-28 19:02:50 +01:00
Pedro Algarvio
cb532fb9ef
Code cleanup. Proper mocking. 2017-03-28 19:02:50 +01:00
Pedro Algarvio
f23596cbd1
Proper mocking. Py3 Compat. 2017-03-28 19:02:50 +01:00
Pedro Algarvio
9b1e55aa85
Import the full module namespace to avoid import shadowing.
https://github.com/saltstack/salt/pull/39996#issuecomment-287857698
2017-03-28 19:02:47 +01:00
Pedro Algarvio
ff8cb0455f
Account for a timeout when resolving the future 2017-03-28 19:00:54 +01:00
Pedro Algarvio
f2b51cc22f
Always decode the response body to unicode 2017-03-28 19:00:53 +01:00
Pedro Algarvio
276f2dbb5f
More salt.loader import fixes 2017-03-28 19:00:53 +01:00
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
eaddf737f3
Add missing import and solve cycle import error. 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
30f62f22ec
Simplify the mock mixin required work
This approach does not require the user to call `super().setUp()`
2017-03-28 19:00:51 +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
9731451a58
Use tests.support.unit instead 2017-03-28 19:00:50 +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
9d11993f38 Merge pull request #40263 from deuscapturus/boto_elbv2
Add boto_elbv2 states and modules for de/registering targets and chec…
2017-03-28 11:15:38 -06:00
Mike Place
ebb925c843 Merge pull request #40359 from sergeizv/prevent-unbound-local-error
Fix potential unbound local error
2017-03-28 11:12:07 -06: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
08d18152ba Merge pull request #40358 from mirceaulinic/patch-7
Add conf_proxy cross reference
2017-03-28 11:05:24 -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
Sergei Zviagintsev
25bdc70b2b Fix potential unbound local error
If the condition is false, the 'state' var will not be defined and
referencing it in the subsequent code will produce UnboundLocalError.
Use dict.get() to initialize the 'state' variable.
2017-03-28 17:31:26 +02:00
Mircea Ulinic
240178d241 Add conf_proxy cross reference 2017-03-28 18:24:02 +03:00
Mike Place
9187df8a33 Merge pull request #40222 from cloudflare/terms-list
Many improvements and changes for the netacl modules
2017-03-28 09:10:27 -06:00
Theodore Cowan
5dfcb853ce make error message useful for boto_elbv2.target_group_exists 2017-03-27 23:13:27 -06:00
Nicole Thomas
863a9b96fb Merge pull request #40302 from cloudflare/nitorgen-doc
Add NAPALM section in Nitrogen release notes
2017-03-27 20:45:46 -06:00
Adam Mendlik
6c6e8d17bc Update unit test for Saltify with credential verification 2017-03-27 19:20:38 -06:00
Adam Mendlik
f1c5991971 Add documentation for saltify credential verification mode 2017-03-27 18:41:38 -06:00
Adam Mendlik
1f9f0e47f7 Allow saltify cloud provider to verify credentials
When deploy=False in the cloud configuration, saltify will
attempt to log on to the system and return True on success,
False on failure.
2017-03-27 18:41: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