Commit Graph

2822 Commits

Author SHA1 Message Date
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
rallytime
8928436bdd Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/pillar/__init__.py
2017-01-30 09:06:27 -07:00
rallytime
b0631ce005 [PY3] Fix timezone module unit tests
When writing to a file, the string needs to be converted to bytes first.
2017-01-27 12:15:39 -07:00
rallytime
fdaa5ac1b0 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/master.py
  - salt/pillar/__init__.py
  - salt/utils/__init__.py
2017-01-26 14:09:37 -07:00
Nicole Thomas
a6c6e47842 Handle changing "is_default" value in moto package for boto test mock (#38973) 2017-01-26 12:05:30 -07:00
rallytime
3f74d697b9 Merge branch '2016.11' into 'develop'
Conflicts:
  - pkg/windows/build_pkg.bat
  - salt/modules/archive.py
2017-01-20 12:07:19 -07:00
rallytime
315b2c8712 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/win_system.py
  - tests/unit/modules/win_system_test.py
2017-01-18 14:16:45 -07:00
twangboy
d57a51f9f9 Fix tests for get_hostname 2017-01-18 11:27:50 -07:00
rallytime
5b43a252c9 Merge branch '2016.11' into 'develop'
Conflicts:
  - conf/master
  - doc/topics/installation/ubuntu.rst
  - salt/modules/pillar.py
  - salt/netapi/rest_tornado/saltnado.py
  - salt/states/influxdb_user.py
  - salt/utils/minions.py
  - salt/utils/openstack/nova.py
2017-01-17 09:50:06 -07:00
Mike Place
8093f72e9d Merge pull request #38687 from eradman/vmware_provisioning
Try to resolve guest IP if VMware Tools is not installed
2017-01-16 19:17:35 -07:00
Mihai Dinca
cfa22b4716 Allow changing baseurl with pkg.mod_repo(zypper) 2017-01-16 17:04:24 +01:00
Eric Radman
755c8901ec Fix pylint errors C0326 and C0303 2017-01-16 02:29:48 -05:00
Mike Place
67383b01e1 Merge pull request #38717 from rallytime/py3-test-fixes
A couple of Python 3 compatibility fixes
2017-01-14 22:44:28 -07:00
rallytime
4e1e45d640 Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-13 14:45:36 -07:00
Alexandru Bleotu
27aec059e6 Added tests for modules.vsphere.disconnect 2017-01-13 12:10:21 +00:00
Alexandru Bleotu
4b11697d40 Added tests for modules.vsphere.get_service_instance_via_proxy 2017-01-13 12:10:20 +00:00
rallytime
6a14ddeaef [vsphere_test.py] Exception.message has been removed in Python 3
Access the message from the Exception('exception message',) object.
2017-01-12 15:21:56 -07:00
Ch3LL
47f8b68e0b fix unit.modules.file_test 2017-01-09 15:01:52 -07:00
rallytime
7a668e9749 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/pillar.py
2017-01-09 11:59:43 -07:00
Jonathan Ballet
2c8845aaa0 add test for pillar.get() + default value 2017-01-06 10:20:13 -05:00
Jonathan Ballet
c2f98d2f04 ticket 38558: add unit test, deepcopy() only if necessary 2017-01-06 10:19:57 -05:00
zwo-bot
9fadb13524 Fix #38558 - pillar.get with default= ...,merge=true influence subsequent calls of pillar.get (#38579)
* added deepcopy of default if merge=True

* ticket 38558: add unit test, deepcopy() only if necessary

* add test for pillar.get() + default value
2017-01-06 10:10:19 -05:00
rallytime
c47f34f535 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/chocolatey.py
  - salt/modules/htpasswd.py
  - salt/modules/img.py
  - salt/modules/smartos_virt.py
  - salt/modules/virtualenv_mod.py
  - salt/modules/xapi.py
  - salt/modules/zypper.py
  - salt/state.py
2017-01-04 15:34:41 -05:00
Mike Place
1895eb7533 Merge pull request #38529 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-01-04 10:06:56 -07:00
Pablo Suárez Hernández
68d5475c1f Fixing Snapper unit tests for SUBVOLUME support 2017-01-04 08:59:51 +00:00
rallytime
9ad362fbde Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/states/kapacitor.py
2017-01-03 10:17:18 -05:00
rallytime
85f470207c Merge branch '2016.3' into '2016.11'
No conflicts.
2017-01-03 10:13:06 -05:00
Daniel Wallace
048b9f6b9d add test 2016-12-29 17:08:24 -06:00
James Payor
d905c0730e Fixes for the behaviour of rabbitmq list_* module functions (all return lists/dicts as appropriate now). Fix bug in plugin_is_enabled and add list_{available, enabled}_plugins. 2016-12-29 19:40:07 +11:00
twangboy
e96bfe8fa2 Change OSX/OS X to macOS where possible 2016-12-28 14:49:46 -07:00
Daniel Wallace
7b7c6b3878 file.line fail with mode=delete
If the file is empty, it also fails, fix that.
2016-12-28 11:51:45 -06:00
Mike Place
34621930aa Merge pull request #38420 from rallytime/module-deprecations
Removed various deprecation notices from salt/modules/* files
2016-12-27 09:09:58 -07:00
rallytime
a2927226ea Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/modules/all/salt.modules.napalm_route.rst
  - doc/ref/modules/all/salt.modules.napalm_snmp.rst
  - doc/ref/modules/all/salt.modules.napalm_users.rst
  - doc/ref/states/all/salt.states.netsnmp.rst
  - doc/ref/states/all/salt.states.netusers.rst
  - salt/states/cron.py
2016-12-22 12:15:06 -07:00
rallytime
0a27f941f7 Removed various deprecation notices from salt/modules/* files
Added docs to the release notes for all of these changes.

The affected modules are:

- htpasswd
- img
- smartos_virt
- virt
- virtualenc_mod
- xapi
- zypper
2016-12-22 11:57:26 -07:00
George Macon
dca24b270e Use --all when calling pip.py
Fixes #38253.
2016-12-20 11:48:00 -05:00
rallytime
8f80916432 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/topics/cloud/index.rst
  - salt/states/cron.py
2016-12-19 14:00:52 -07:00
Mike Place
86c53b8efd Merge pull request #38172 from rallytime/win-deprecations
Remove support for deprecation options/functions in win* files
2016-12-19 07:33:05 -07:00
Adam Mendlik
8bfcd5bcd5 Adjust alternatives test for updated error message 2016-12-18 10:04:24 -07:00
Oleksandr Porunov
786cb5412e Change assertTrue to assertFalse in tests 2016-12-16 15:40:20 +02:00
Oleksandr Porunov
0e7f35e7b8 Change s3 tests. Add additional checks into the s3 module 2016-12-16 10:29:09 +02:00
rallytime
a9f90b881a Remove suport for the "win_repo", "win_repo_mastercachefile", and "win_gitrepos" options
The "winrepo_dir", "winrepo_cachefile", and "winrepo_remotes"  options should be used instead,
respectively.
2016-12-15 13:14:47 -07:00
Arthur Wikström
23d69c4ffe Updated expected test results for mac_package 2016-12-14 14:11:49 +01:00
rallytime
fe1e24909e Merge branch '2016.11' into 'develop'
No conflicts.
2016-12-13 11:29:16 -07:00
rallytime
6a327d1367 Merge branch '2016.3' into '2016.11'
No conflicts.
2016-12-13 10:19:47 -07:00
Mike Place
8f5c6e5df9 Merge pull request #38180 from alexbleotu/vsphere_decorators-gh
Vsphere decorators gh
2016-12-13 00:43:51 -07:00
rallytime
bdb807fc7c Skip test_cert_info tls unit test on pyOpenSSL upstream errors
The 16.0.0 version of pyOpenSSL has an upstream error in it that
causes a stacktrace in our test suite. The upstream issue has
been fixed in pyOpenSSL in 16.1.0 and upwards, but 16.0.0 is still
available.

This fix skips the test when the specific error generated by the
upstream bug is encountered during the test.
2016-12-12 14:21:41 -07:00
rallytime
29f45c192c Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/cloud/clouds/ec2.py
  - salt/modules/grains.py
2016-12-12 11:23:57 -07:00
Alexandru Bleotu
ded7ff9adb Fixed pylint 2016-12-12 05:56:13 -05:00
Mike Place
8355adc535 Merge pull request #38158 from cachedout/issue_38094
Fix type problem in grains.filter_by
2016-12-09 14:24:40 -07:00
Mike Place
e8196e23c2
Lint, remove set literal 2016-12-09 11:37:44 -07:00
Alexandru Bleotu
bef16be61d Removed unnecessary call to salt.modules.vsphere._get_proxy_target from test 2016-12-09 11:58:00 -05:00
Alexandru Bleotu
a7f250b7a0 Added tests for modules.vsphere.test_vcenter_connection 2016-12-09 07:55:44 -05:00
Alexandru Bleotu
cd47cf754c Added tests for modules.vsphere.gets_service_instance_via_proxy decorator 2016-12-09 07:55:44 -05:00
Alexandru Bleotu
f94ead0ad3 Added tests for modules.vsphere.supports_proxies decorator 2016-12-09 07:55:43 -05:00
Alexandru Bleotu
c9e70743d3 Added tests for modules.vsphere._get_proxy_connection_details 2016-12-09 07:55:43 -05:00
Alexandru Bleotu
7edf6101c1 Added tests for modules.vsphere.get_proxy_type 2016-12-09 07:55:30 -05:00
Alexandru Bleotu
1f0bdf83e9 Updated authors of tests for modules.vsphere 2016-12-09 07:55:30 -05:00
rallytime
4998b8d116 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/peer.rst
  - doc/topics/reactor/index.rst
2016-12-07 16:31:11 -07:00
Mike Place
9f4ebb3c18
Fix type problem in grains.filter_by
Closes #38094
2016-12-07 11:25:19 -07:00
Nicole Thomas
ae754e1069 Mock config.option call return for iptables unit test (#38131)
Refs #31662
2016-12-07 11:19:46 -07:00
Mike Place
fd06bab673 Merge pull request #38043 from MTecknology/2016.11
Debian networking fix
2016-12-07 10:32:17 -07:00
rallytime
d513a60189 Do not allow libcloud to be injected as a mock value in the libcloud_dns_test
Other tests rely on importing libcloud, which should
not be a mock value.
2016-12-05 16:55:18 -07:00
Michael Lustfield
82d2b89e0c Rolling back unit test.
Sorry, I just don't have the time to learn all of this right now.
2016-12-02 20:26:00 -06:00
Michael Lustfield
b3edbcfd05 Adding larger and more complete debian_ip unit test. 2016-12-02 18:59:27 -06:00
Michael Lustfield
b6b1adc091 Typo: missing closing parenthesis 2016-12-02 14:57:12 -06:00
Michael Lustfield
32a1374748 Corrects expected return value
Tests were failing because _parse_interfaces is returning the correct data per mocked data. The assertion was expecting the iface line to have been stripped.
2016-12-02 13:34:31 -06:00
Mike Place
faf94a10a0 Merge pull request #38030 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2016-12-01 15:03:32 -07:00
Erik Johnson
ac2f4e3ab9 Update systemd module unit tests to reflect new masking behavior 2016-12-01 14:21:33 -06:00
rallytime
0eab0ee8a6 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/releases/2016.11.0.rst
2016-12-01 12:14:33 -07:00
Daniel Wallace
9caf0b406d use sleep from path for docker.sls_build
sleep sometimes is found in /bin/sleep, like in ubuntu.  We should just
depend on the PATH variable being correct, and finding sleep, instead of
explicitly saying /usr/bin/sleep
2016-11-30 10:17:30 -06:00
Mike Place
c8380cf2c9 Merge pull request #37953 from m03/another-set-of-aptpkg-tests
Additional aptpkg module unit tests
2016-11-30 09:02:21 -07:00
m03
8d5ce68b55 Address config.get in autoremove and upgrade 2016-11-29 12:48:02 -08:00
m03
001d1b615f Additional aptpkg module unit tests 2016-11-29 08:18:08 -08:00
Mike Place
c25a306759 Merge pull request #37647 from americanexpress/cron-non-root
Revising cron for OS agnostic support of cron when running non-root
2016-11-29 07:33:48 -07:00
Mike Place
9cab761320 Merge pull request #37909 from thusoy/invalid-timezone
Throw error when setting invalid timezone
2016-11-28 14:04:35 -07:00
rallytime
dfedd1185a Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/grains/core.py
  - salt/modules/ddns.py
  - salt/templates/rh_ip/network.jinja
2016-11-28 11:08:19 -07:00
Tarjei Husøy
316d581354 Throw error when setting invalid timezone
Closes #37685.
2016-11-28 09:21:52 -08:00
m03
2aeaf553c8 Add tests 2016-11-28 07:33:01 -08:00
rallytime
3dfed6b841 Adjust linux_acl unit test argument ordering 2016-11-23 17:02:23 +00:00
Moe
40af1857be Add more aptpkg unit tests (#37793)
* Add more aptpkg unit tests

* Add test_refresh_db
2016-11-21 09:19:42 -07:00
Benjamin J Cane
27c532b34c Adding spacing for pylint 2016-11-18 16:26:54 -07:00
Benjamin J Cane
16222e1d05 Revising logic to account for cron.deny 2016-11-18 15:46:57 -07:00
Benjamin J Cane
8c84fd2013 Merge remote-tracking branch 'salt-upstream/develop' into cron-non-root 2016-11-17 15:40:42 -07:00
m03
8cb794addb Add initial aptpkg unit tests 2016-11-13 09:10:37 -08:00
Benjamin J Cane
61afd6e69f Revising for PEP8 checks 2016-11-11 14:11:16 -07:00
Benjamin J Cane
cf7585c9ab Removing blank line for PEP compliance 2016-11-11 13:08:10 -07:00
Benjamin J Cane
e188e12bc9 Fixing merge conflict with latest from develop 2016-11-11 12:21:27 -07:00
Benjamin J Cane
405c3336aa Revising cron state & module for OS agnostic support of cron when running as non-rootSquashed commit of the following:
commit d5003a44230f7bb6878057023726ba7135c9909c
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date:   Fri Nov 11 10:22:21 2016 -0700

    Revising cron state & module for OS agnostic support of cron when running as non-root

    commit c9c20fc34670e1b371c505d8b7959ea00ae0a36e
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Thu Nov 10 15:47:04 2016 -0700

        Re-adding removed comment

    commit 4058bf3f609aeec11e0ff2a91191eba16556abf0
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Mon Nov 7 11:08:20 2016 -0700

        Adding user to error message and fixing key error if there is no updates

    commit 768e28e43585451a241979d048d5ac704f4f8f60
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 23:24:13 2016 -0700

        Added try/except on group identification and refactored success messaging

    commit d575189b17c1b75ef6d43b9ca821fb66aa142531
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 23:23:38 2016 -0700

        Added try/except on group identification and refactored success messaging

    commit 13a8207e5bc99044a3dfca4412e34ba9884d44a8
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 17:21:18 2016 -0700

        Resolving group permissions issues when managing non-root crontabs

    commit 89a7d1e04f21f1cbd93b83052cf47ba7a7225d72
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 12:32:55 2016 -0700

        Adding unit tests for OS specific cron command string rules

    commit b2a00009fda987474c40cee3f2ed8affe5f07f5b
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Wed Nov 2 09:10:06 2016 -0700

        Fixing cron.file when running as non-root

    commit ba27b18b01f304e541af8b6c7107596f34651123
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Oct 28 10:58:03 2016 -0700

        Removed OS specific logic to always run crontab commands as owner of cron
2016-11-11 10:36:48 -07:00
rallytime
7b2341bbfd Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/releases/releasecandidate.rst
  - salt/modules/file.py
  - salt/states/file.py
  - salt/utils/network.py
2016-11-10 15:59:51 -07:00
Mike Place
403b469aea Merge pull request #37601 from eradman/random_org
Skip random.org tests for any communication failure
2016-11-11 10:52:25 +13:00
Eric Radman
671cebfa30 Skip random.org tests for any communication failure
This test connects to random.org, which may throws the following error
on one network I manage:

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Other errors are possible, such as `socket.error`.  Since it is
difficult to anticipate the failure mode, skip these tests if https
communication provokes any exception.

Also, this is not a unit test--it's more of a system test. My
recommendation that we recategorize this as an integration test where
global IPv4 routing can more reasonably expected.
2016-11-10 07:48:24 -05:00
Eric Radman
b19440418d Fixes to unit tests (#37586)
Add skipIf pyvmomi is not installed

    NameError: global name 'vmodl' is not defined
    NameError: global name 'vim' is not defined

Fix skipIf typo for OpenBSD

    >>> import sys
    >>> sys.platform
    'openbsd6'

Avoid warning from glusterfs.py:

    Use specific 'len(elem)' or 'elem is not None' test

Enable boto_secgroup_test tests that work now:

    test skipped due to error in moto return - fixed in
    cc01669643
2016-11-09 13:58:08 -07:00
rallytime
f44e14b63c Merge branch 'carbon' into '2016.11'
Conflicts:
  - salt/modules/file.py
2016-11-09 12:56:58 -07:00
Nicole Thomas
2e8e56ca69 [PY3] Change log.warn statements to log.warning (#37531)
* [PY3] Change log.warn statements to log.warning

log.warn is deprecated in Python 3. This change removes the
occurance of deprecation warnings for using log.warn. For example:

```
17:24:23 [WARNING ] /testing/salt/utils/verify.py:522: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
17:24:23   log.warn('Insecure logging configuration detected! Sensitive data may be logged.')
17:24:23
17:24:23 [WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
```

* Tweak unit.utils.verify_test to using warning instead of warn
2016-11-08 13:06:54 -07:00
rallytime
5ead1425d7 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/releases/releasecandidate.rst
  - salt/modules/win_servermanager.py
2016-11-08 13:04:33 -07:00
Nicole Thomas
453319b50a Don't pass the vpc id to boto.vpc.create_internet_gateway func (#37556)
That function's namespace looks like this:
```
def create_internet_gateway(self, dry_run=False):
```
So when we pass in the vpc_id opbject in the test, the check later
in the function sets `dry_run=True` since the vpc_id opbject exists.

This later throws JSONResponseErrors because the `DryRun` flag is
set. This error raising functionality was added in the most recent
version of moto, which exposed this bug.

This fixes the three boto_vpc_test unit state tests. We'll see if
other tests need to be addressed in other files on a full test run.
2016-11-08 12:48:26 -07:00
rallytime
2e68da3e52 Merge branch '2016.11' into 'develop'
Conflicts:
  - doc/topics/cloud/vmware.rst
  - salt/cloud/clouds/vmware.py
2016-11-07 08:22:17 -07:00
rallytime
3b56f8bce1 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/topics/event/master_events.rst
2016-11-07 08:13:57 -07:00
Mike Place
be93710fee Merge pull request #37452 from rallytime/fix-31135
file.line with mode=replace on an empty file should return False, not stacktrace
2016-11-06 14:55:11 +13:00
Mike Place
9e4e936f4f Merge pull request #37473 from m03/fix-167-logrotate-state_2
Fix #167 - Add logrotate state module
2016-11-06 14:45:15 +13:00
rallytime
ce4b82fdee Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/archive.py
  - salt/modules/status.py
  - salt/states/file.py
  - tests/unit/modules/status_test.py
2016-11-04 13:51:46 -06:00
rallytime
4132929832 Merge branch 'carbon' into '2016.11'
No conflicts.
2016-11-04 13:38:34 -06:00
m03
466efd3f55 Change test str to int for consistency 2016-11-04 09:43:02 -07:00
Erik Johnson
a3f38e5a9f Update file.extract_hash unit tests
These tests now not only test the new functionality added for matching
on source URI and source_hash_name, but also test non-specific hash_type
lookups, specific hash_type lookups, and failed specific hash_type
lookups (i.e. requesting a hash type not present in the file).
2016-11-04 11:25:54 -05:00
Pablo Suárez Hernández
4ae036055d Fix unit test for Zypper dist-upgrade in Carbon 2016-11-04 09:36:41 -06:00
rallytime
94a00c66eb Write a unit test demonstrating stack trace in #31135
Here is the stack trace that happens when running file.line with
mode=replace on a file that exists, but is empty, as described in
the bug report:

unit.modules.file_test.FileModuleTestCase.test_replace_line_in_empty_file  .................................................
   Traceback (most recent call last):
     File "/root/SaltStack/salt/tests/unit/modules/file_test.py", line 593, in test_replace_line_in_empty_file
       mode='replace'))
     File "/root/SaltStack/salt/salt/modules/file.py", line 1523, in line
       for line in body.split(os.linesep)])
   TypeError: expected a character buffer object
2016-11-03 14:57:10 -06:00
rallytime
4080cb4f12 Merge branch '2016.3' into 'carbon'
No conflicts.
2016-11-03 08:54:32 -06:00
Pablo Suárez Hernández
ffc596f215 Including resolver params for Zypper debug-solver
Now '--no-allow-vendor-change' and '--from' parameters are included
into the zypper --debug-solver call before performing a dry-run dist-upgrade.
2016-11-03 08:34:26 +00:00
Mike Place
60b5085696 Merge pull request #37315 from svenauhagen/feature/iptables
iptables changes for match recent
2016-11-03 13:16:49 +13:00
Mike Place
f00dc3e382 Remove trailing whitespace 2016-11-03 13:16:41 +13:00
rallytime
c31f879f8b Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/cloud/clouds/vmware.py
2016-11-02 11:33:21 -06:00
Nicole Thomas
8679ce4510 Back-port #37321 to 2016.11 (#37409)
* status.uptime - avoid nawks srand, causes problems on smartos

* status.uptime - remove docs comment that no longer applies

* status.uptime - optimize a tiny it and get rid of the need for a shell

* status.uptime - actually remove the now redudent line too

* status.uptime - readded fallback to uptime binary, atleast we get something on the BSDs too now

* status.uptime - support python pre 2.7 as per damon-atkins

* status.uptime - want OpenBSD support

* status.uptime - want freebsd support, removed fallback once again so we are consistant

* status.uptime - want NetBSD support

* status.uptime - fold @jfindlay  work for OSX into mine, tweak mine based on his work

* status.uptime - push tests from @jfindlay with updates SunOS test

* status.uptime - remove cmd.run_all as it was replaced by sysctl.get

* status.uptime - attempt to fix sunos test

* Figured out why there was a cmd.run mock  was there.

* add note for SunOS, so we do not forget

* Update version added tag
2016-11-02 09:50:30 -06:00
Erik Johnson
3014afd517 Overhaul archive.extracted state
This fixes a number of annoyances with the archive.extracted state.
Rather than re-state the changes again here, they can be observed in the
carbon release notes, where they have been documented.
2016-11-01 19:35:57 -05:00
rallytime
e082ff538b Fix failing test now that we're raising a CommandExecutionError
Also adds a test to check that the CommandExecutionError is raised
when the filename is not present.
2016-11-01 15:51:09 -06:00
rallytime
fd380c79b9 Add test case to reproduce dnsmasq.set_config failure in #34263 2016-11-01 14:31:14 -06:00
rallytime
e57fb947c6 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/modules/status.py
2016-11-01 12:56:04 -06:00
Sven Auhagen
7c6ff77c98 Fix name_, for loop and add test cases 2016-11-01 19:32:49 +01:00
Mike Place
d69142a3a7
Fix status test
Correctly raise expected exception
2016-11-01 12:06:20 +13:00
rallytime
ba5583938b Update mac_package unit tests: remove --no-compress flag 2016-10-31 16:13:48 -06:00
Mike Place
eaafb29ff2 Merge pull request #37321 from sjorge/carbons-status-uptime
Carbons status uptime
2016-11-01 00:29:17 +13:00
Super-User
d73c748907 Figured out why there was a cmd.run mock was there. 2016-10-31 09:57:05 +01:00
Super-User
9d05c6aaaa status.uptime - attempt to fix sunos test 2016-10-31 08:31:19 +01:00
m03
4c6317fdc7 Better return data from logrotate module 2016-10-30 01:29:52 -07:00
Super-User
b12d19e339 status.uptime - push tests from @jfindlay with updates SunOS test 2016-10-30 00:17:48 +02:00
rallytime
8d3957f250 Merge branch 'carbon' into 'develop'
Conflicts:
  - salt/cloud/clouds/vmware.py
  - salt/modules/boto_ec2.py
  - salt/modules/cmdmod.py
  - salt/modules/win_lgpo.py
2016-10-28 11:58:41 -06:00
rallytime
e4dc059959 Update Carbon versionadded tags to 2016.11.0 in tests/* 2016-10-27 10:04:13 -06:00
rallytime
a9da340759 Merge branch 'carbon' into 'develop'
No conflicts.
2016-10-25 10:40:15 -06:00
Pablo Suárez Hernández
32f44b43ee Fix Zypper module and tests for Carbon 2016-10-25 11:08:00 +01:00
rallytime
027e2212c9 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/modules/status.py
  - salt/modules/win_status.py
  - salt/modules/zypper.py
  - salt/utils/network.py
  - tests/unit/transport/zeromq_test.py
2016-10-24 09:29:53 -06:00
Mike Place
c5d81a8ade Merge pull request #37158 from jfindlay/mac_skip_uptime
add mock for `status.uptime` unit test
2016-10-24 12:13:53 +09:00
rallytime
8fff95b3b4 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/gpg.py
  - salt/modules/zypper.py
2016-10-21 16:09:17 -06:00
Justin Findlay
094eac06eb modules.status.uptime unit test: mock on linux 2016-10-21 15:50:42 -06:00
Pablo Suárez Hernández
01b0a6917c Minor pylint fixes 2016-10-20 11:33:11 +01:00
Pablo Suárez Hernández
7dbb0bd252 Unit tests fixes 2016-10-20 10:59:48 +01:00
Pablo Suárez Hernández
a092a974da Refactor: Cleanup and pylint fixes 2016-10-19 14:57:03 +01:00
Pablo Suárez Hernández
1331ae5c72 Unit tests for zypper upgrade and dist-upgrade 2016-10-19 13:21:55 +01:00
Mike Place
d97f649557 Merge pull request #37066 from Unity-Technologies/feature/powercfg_schemes
Allowed for specifying the scheme for powercfg
2016-10-19 11:39:02 +09:00
rallytime
bab91dbe91 Don't compare a (0,) object to None in skipIf
We should check to make sure the version is > 0 to run the test
2016-10-18 10:22:31 -06:00
rallytime
ec7626d6ea Revert "Spelling fix: the module is named dockerng, not just docker."
This reverts commit 94f72813c27299994e6522480bab760ca9f22878.
2016-10-18 09:49:07 -06:00
rallytime
fe2a6dbc7f Spelling fix: the module is named dockerng, not just docker. 2016-10-18 09:49:07 -06:00
rallytime
a45b75cd9c Pylint fix: remove extra comma 2016-10-18 09:49:07 -06:00
rallytime
beed75ef39 Just use nested with statements so the test will work on all Pythons 2016-10-18 09:49:07 -06:00
rallytime
5e2f20ad37 Maintain two different tests for Py2 vs 3 in dockerng_test file 2016-10-18 09:49:07 -06:00
Mike Place
4b6838baf9 Fix Docker test for Py3
Move to Py3-compat nested context manager approach.

Fix bug in thin generation where non-abs paths were not avoided.
2016-10-18 09:49:07 -06:00
Daniel Hobley
a133a2466e Allowed for specifying the scheme for powercfg 2016-10-18 09:49:07 +02:00
Mike Place
202414c88b Merge pull request #37024 from gtmanfred/hashutil
add the ability to verify github webhook hmac signatures
2016-10-18 10:55:28 +09:00
twangboy
b3b688e298 Fix tests 2016-10-17 13:31:55 -06:00
rallytime
6d0cedcadd Merge branch 'carbon' into 'develop'
No conflicts.
2016-10-17 09:06:12 -06:00
Daniel Wallace
a7f8ca0a84 add the ability to verify github webhook hmac signatures 2016-10-17 07:57:47 -05:00
rallytime
112dc5d9c1 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/cli/salt.py
  - salt/client/__init__.py
  - salt/modules/archive.py
  - tests/integration/modules/pkg.py
2016-10-14 12:03:08 -06:00
Zhi Han
3ddddd82b7 Fix mac_package wildcard install error on mac 2016-10-13 21:29:40 -04:00
Amir Pakdel
d7cfcf4135 Whitespace bugfix in linux acl.getfacl (#36827)
* Whitespace bugfix in linux acl.getfacl

It is a trivial fix

* Whitespace bugfix in linux acl.setfacl

Also updated tests

* Linting
2016-10-13 15:14:09 -06:00
Thomas S Hatch
6b782c15e1 Merge pull request #36755 from terminalmage/issue36671
systemd.py: check retcode for service availability in systemd >= 231
2016-10-13 13:41:50 -06:00
Nicole Thomas
a2206e805f Merge pull request #36938 from wanparo/develop
acl.delfacl: fix position of -X option to setfacl
2016-10-13 08:53:34 -06:00
rallytime
29d299d23b Adjust linux_acl unit test argument ordering 2016-10-12 10:57:42 -06:00
rallytime
55fe0aa2e4 Merge branch 'carbon' into 'develop'
No conflicts.
2016-10-11 17:22:12 -06:00
rallytime
b196c9336a Merge branch '2016.3' into 'carbon'
No conflicts.
2016-10-11 13:54:09 -06:00
rallytime
c09b9d6e6a Merge branch '2015.8' into '2016.3'
No conflicts.
2016-10-10 10:21:04 -06:00
rallytime
d07f5612ee Merge branch 'carbon' into 'develop'
No conflicts.
2016-10-10 10:18:02 -06:00
Erik Johnson
7c78d6f419 Add unit tests for systemd scope usage 2016-10-07 17:35:09 -05:00
rallytime
2e34277b65 Add '--no-psqlrc' option to new-to-carbon postgres unit test 2016-10-07 16:10:57 -06:00
rallytime
f73bdf55c2 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/cloud/clouds/vultrpy.py
  - salt/modules/ini_manage.py
  - salt/states/glance.py
2016-10-07 09:51:21 -06:00
Mike Place
1284de27fc Merge pull request #36789 from maximeguillet/fix-psqlrc-pg9.6
Fix behavior of psql -c option with postgresql 9.6
2016-10-06 20:24:51 +09:00
Maxime Guillet
b59c23bef1 Fix one remaining postgresql tests linked to #36787. 2016-10-05 17:05:10 +02:00