Commit Graph

2685 Commits

Author SHA1 Message Date
Erik Johnson
28564da966 Implement no_block for service.running/service.dead (systemd only) 2017-02-24 15:14:09 -06:00
Daniel Wallace
89101fa342 allow sls_build to be used with states 2017-02-24 11:47:13 -06:00
Pedro Algarvio
0e1e133169
Fix a weird import issue
```
ImportError: Failed to import test module: unit.modules.docker_test
Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/loader.py", line 252, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib64/python2.7/unittest/loader.py", line 230, in _get_module_from_name
    __import__(name)
  File "/testing/tests/unit/modules/docker_test.py", line 39, in <module>
    class DockerTestCase(TestCase):
  File "/testing/tests/unit/modules/docker_test.py", line 103, in DockerTestCase
    @skipIf(_docker_py_version() < (1, 4, 0),
  File "/testing/tests/unit/modules/docker_test.py", line 34, in _docker_py_version
    return docker_mod.docker.version_info
AttributeError: 'module' object has no attribute 'version_info'
```
2017-02-24 09:11:23 +00:00
Pedro Algarvio
5d0110d98b
Code cleanup 2017-02-24 00:49:33 +00:00
Pedro Algarvio
ae46b0da3a
Code cleanup 2017-02-24 00:49:32 +00:00
Pedro Algarvio
5576f6ed33
Gate it! 2017-02-23 23:19:42 +00:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00
Pedro Algarvio
9bb56da613
Fix skipIf call and _docker_py_version 2017-02-23 12:55:52 +00:00
Pedro Algarvio
1416dd2e9a
We must compare tuples 2017-02-23 10:40:59 +00:00
Pedro Algarvio
e48ea8fa1b
Don't use assert_called_once() or assert_not_called().
These worked in Py2 but not in Py3.
A read of http://engineroom.trackmaven.com/blog/mocking-mistakes/ specially the section "Mocking the unexpected" will enlighten one.
2017-02-23 10:40:58 +00:00
rallytime
2595ac383d Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/docker.py
  - salt/states/docker.py
2017-02-22 16:24:36 -07:00
rallytime
c613d19e76 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/dockerng.py
  - salt/states/dockerng.py
2017-02-21 13:59:14 -07:00
Erik Johnson
ec2b617a5d Fixes for docker tests
These tests were failing because of improper mocking. The mocks were
assigned to the __salt__ dunder but we should have been patching the
attributes of the docker execution module directly.
2017-02-18 21:58:25 -06:00
Erik Johnson
c673d06f48 Rename dockerng state/execution module to docker 2017-02-18 21:58:25 -06:00
Erik Johnson
6e24dd85c4 Remove dockerio state/module (moved to salt-contrib) 2017-02-18 21:58:24 -06:00
Mike Place
179e143272 Merge pull request #39385 from curiositycasualty/develop
modules.file: Return true when a symlink is already in desired state
2017-02-17 15:24:53 -07:00
Pedro Algarvio
a8e32cf076
**kwargs ordering is different under Py3 2017-02-17 20:48:56 +00:00
Pedro Algarvio
f921c1e131
Sort before asserting since the order changes between py2 and py3 2017-02-17 20:48:56 +00:00
Pedro Algarvio
9503045b05
Use tempfile.gettempdir() since that depends on current user and distro setup 2017-02-17 20:48:56 +00:00
Pedro Algarvio
20a4d7bb39
Under Py3, stat.S_ISLNK() expects an integer. Mock it. 2017-02-17 20:47:55 +00:00
Mihai Dinca
9d13422ac1 OpenSCAP module 2017-02-17 13:50:29 +01:00
rallytime
dda39d4e63 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/minion.py
  - salt/modules/file.py
  - salt/modules/grains.py
  - salt/utils/gitfs.py
2017-02-16 12:18:46 -07:00
rallytime
2acb188ac9 Change `path` value from a tuple to a list
The type of the ``path`` value changed in #38188.

This updates the type in the unit test, as well as rearranges some
of the imports to be more standardized with ``ensure_in_syspath``.
2017-02-15 15:39:53 -07:00
rallytime
6d78adbf08 Merge branch '2016.3' into '2016.11'
Conflicts:
  - doc/topics/tutorials/gitfs.rst
  - salt/fileserver/roots.py
  - salt/loader.py
2017-02-15 10:35:02 -07:00
Mike Place
1ecc9d1315 Add newline for lint 2017-02-14 11:26:23 -07:00
Mihai Dinca
91383c5a19 Add cp.push test 2017-02-14 17:16:28 +01:00
Isa
72d2188cbb return true when symlinks already in desired state 2017-02-13 18:10:28 -08:00
mephi42
6570392abd Support globbing in sources parameter of salt.modules.archive (#32356)
Add globbing support to tar, zip and rar.
Update tests to show bad return value on error.
2017-02-14 00:02:19 +01:00
Michael Calmer
17521fb23c added unit test for dockerng.sls_build dryrun option (#39305) 2017-02-10 16:11:26 -07:00
rallytime
609e6e4b23 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/win_lgpo.py
  - salt/utils/aws.py
  - tests/unit/utils/schema_test.py
2017-02-09 10:29:40 -07:00
Nicole Thomas
05d4df4a0e Add __utils__ to sdb unit test (#39261)
Refs #39174
2017-02-09 08:52:16 -07:00
Nicole Thomas
84ff63875c [2016.11] Merge forward from 2016.3 to 2016.11 (#39234)
* Fix for #38697

* Lint fixes

* Added missing source_hash_name argument in get_managed function
Additional fix to  #33187
Customer was still seeing errors, this should now work.
Tested with 2015.8.13 and 2016.11.2

* [2016.3] Pylint fix (#39202)

* Ignore empty dicts in highstate outputter

Closes #37174

* Sort the return list from the fileserver.envs runner

* Fix the win_ip_test failures (#39230)

The changes made in #38793 changes the "get_all_ointerfaces" call
to be a list of DNS servers. This change adjusts the tests structure
from a string to a list and fixes the test failure.
2017-02-07 16:06:56 -07:00
Nicole Thomas
ef4e437bbc Fix the win_ip_test failures (#39230)
The changes made in #38793 changes the "get_all_ointerfaces" call
to be a list of DNS servers. This change adjusts the tests structure
from a string to a list and fixes the test failure.
2017-02-07 14:53:59 -07:00
Mike Place
b240468525 Merge pull request #39162 from meaksh/snapper-module-improvements
Adding more function to Snapper module
2017-02-06 11:33:52 -07:00
rallytime
88cc195a2a Merge branch '2016.11' into 'develop'
No conflicts.
2017-02-03 10:58:55 -07:00
rallytime
6504bb6b02 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/pillar.py
  - salt/states/archive.py
  - tests/integration/states/archive.py
2017-02-03 09:48:58 -07:00
Pablo Suárez Hernández
9d6a33f257 Adds 'snapper.create_config' unit tests 2017-02-03 15:41:58 +00:00
Pablo Suárez Hernández
d38ed505f8 Adds 'snapper.modify_snapshots' unit tests 2017-02-03 15:41:29 +00:00
Pablo Suárez Hernández
d5496ccc99 Adds 'snapper.delete_snapshots' unit tests 2017-02-03 15:41:29 +00:00
rallytime
eb61788f87 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/runners/all/index.rst
  - salt/modules/win_lgpo.py
  - salt/states/dockerio.py
2017-02-01 16:36:45 -07:00
Erik Johnson
646b9ea4e5 Don't abort pillar.get with merge=True if default is None (#39116)
* Don't abort pillar.get with merge=True if default is None

This prevents a SaltInvocationError from being raised if the default is
loaded from a import_yaml jinja macro and the file being loaded is empty
(which is an entirely valid use case). In these cases, the loaded
default would be None, which we don't want to cause an exception.

* Add test case for issue 39062
2017-02-01 15:07:31 -07:00
Mike Place
2f532ff9f8 Merge pull request #39080 from kraney/boto_lambda_envvar
Added Lambda environment variables support to boto_lambda modules/states
2017-01-31 13:20:40 -07:00
Mike Place
86b4b77bfe Merge pull request #39058 from sergeizv/fix-lvm-fullversion
Fix salt.modules.linux_lvm.fullversion
2017-01-31 12:01:12 -07:00
Winston Liu
c2d35d181f update botocore dependencies, skip if not met. 2017-01-31 10:49:34 -08:00
Sergei Zviagintsev
f4bf77a996 Fix test name (#39061)
Remove an unnecessary underscore character from the name of the
linux_lvm.lvdisplay test:

  test__lvdisplay -> test_lvdisplay
2017-01-31 10:20:13 -07:00
Sergei Zviagintsev
0f84ca2487 Add test for modules.linux_lvm.pvcreate on existing LVM PVs
If all the devices submitted to pvcreate() are already initialized as
LVM physical volumes, pvcreate() should return True and no futher
actions should be made.
2017-01-31 17:57:21 +01:00
Sergei Zviagintsev
3967992bfd Fix test for modules.linux_lvm.pvcreate
pvdisplay() would be called by pvcreate() twice: firstly to check
whether a device is already initialized for use by LVM and then to
ensure that the pvcreate executable did its job correctly. The test
replaces pvdisplay() with a mock that always returns True and thus
pvcreate() would think that a specified device is already initialized
and exit. In the other words, instead of testing physical volume
initialization the test simulates a case with all the submitted
devices already initialized.

Fix it by replacing pvdisplay with a mock that returns False on the
first call (thus pvcreate thinks that a device is not a PV yet) and True
on the second call (after the pvcreate executable is called).
2017-01-31 17:49:28 +01:00
Sergei Zviagintsev
fb7ef99838 Fix mock emulating lvm version
'lvm version' produces multiline output whereas test_version and
test_fullversion use mocks with single-line output. Use real-life
'lvm version' output in those mocks instead.
2017-01-31 16:22:38 +01:00
Winston Liu
dc8344f0c2 updated boto_lambda execution module with 'lambda environment variables' 2017-01-30 16:00:16 -08:00
Nicole Thomas
7fa89303a1 Merge pull request #39026 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-01-30 10:39:18 -07:00