Commit Graph

2426 Commits

Author SHA1 Message Date
Mike Place
b11fd8ef6a Merge pull request #34484 from dmacvicar/docker_images
[WIP] Creating Docker images with pure Salt and running Salt commands inside containers
2016-07-15 16:17:59 -06:00
Bo Maryniuk
e5c3195fa3 Update test data for 'registerrelease' and 'productline' fields 2016-07-15 17:14:27 +02:00
Bo Maryniuk
96021e257c Update test data for 'registerrelease' and 'productline' fields 2016-07-15 17:13:58 +02:00
Bo Maryniuk
5ed5142fbc Update test data for 'registerrelease' and 'productline' fields 2016-07-15 17:12:03 +02:00
rallytime
bb2c43b52a Merge branch '2016.3' into 'develop'
No conflicts.
2016-07-14 14:10:10 -06:00
Mike Place
eadae09e0a Merge pull request #34563 from rallytime/py3-state-unit-tests
Py3 fixes for running unit tests in the unit/states/ directory.
2016-07-14 08:28:49 -06:00
Anthony Shaw
7786c0020c Libcloud DNS module fix (#34628)
* add test module

* add broken test

* fix typo in config dictionary

* remove call to unused function, add called_with assertion
2016-07-13 11:47:20 -04:00
Anthony Shaw
4c61769024 add test module 2016-07-13 13:46:04 +10:00
Justin Anderson
445f8afc69 Fixes failing test on Suse Leap (#34621) 2016-07-12 18:48:06 -04:00
rallytime
49f40e9d99 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/conf.py
  - doc/topics/reactor/index.rst
  - tests/integration/__init__.py
2016-07-12 16:13:56 -06:00
rallytime
f734afd0b0 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/aptpkg.py
  - tests/integration/__init__.py
2016-07-12 14:29:35 -06:00
Justin Anderson
7dd8035c62 Gate docker unit test to check for docker (#34591)
* Gate docker unit test to check for docker

* Change skipIf to check if docker-py is installed, not version check
2016-07-12 13:33:31 -04:00
Pablo Suárez Hernández
c00991bc1e Fix for pylint: W1699 2016-07-12 15:38:28 +01:00
Pablo Suárez Hernández
5213ddeab9 Fix in inline comments 2016-07-12 15:10:25 +01:00
Duncan Mac-Vicar P
b60f76b836 pylint: W1699(incompatible-py3-code) 2016-07-12 15:44:01 +02:00
Pablo Suárez Hernández
867bfbf353 Variable renaming. Pylint fixes 2016-07-12 14:03:52 +01:00
Duncan Mac-Vicar P
cfdb1c3928 typo 2016-07-12 14:38:22 +02:00
Duncan Mac-Vicar P
1f77336a1d test that fix /tmp is not used 2016-07-12 14:37:47 +02:00
Pablo Suárez Hernández
5c06e91417 pylint: some fixes 2016-07-12 12:24:04 +01:00
Pablo Suárez Hernández
39e8ff0f25 pylint fixes 2016-07-12 11:03:09 +01:00
Pablo Suárez Hernández
0a9dbfc33a unit test for snapper.diff with binary file 2016-07-12 09:02:31 +01:00
rallytime
9f5e275f2e When writing strings to tmp files, use bytes for Python 3 2016-07-11 16:07:35 -06:00
rallytime
e6f875cd62 Remove izip import from unit.modules.boto_apigateway_test.py
Use six compatible version of zip instead
2016-07-11 14:26:06 -06:00
Pablo Suárez Hernández
964d5cbf03 fix diff unit test while creating text file 2016-07-11 16:15:11 +01:00
Pablo Suarez Hernandez
f77551b883 more unit tests 2016-07-11 16:47:49 +02:00
rallytime
c539333924 Use six.moves.StringIO() 2016-07-08 09:30:58 -06:00
rallytime
1f4a75f268 Move StringIO import to use six for tests.unit.modules.zypper_test.py 2016-07-07 19:27:30 -06:00
Duncan Mac-Vicar P
59d8ce480e implement keyword arguments for dockerng.call 2016-07-06 14:11:17 +02:00
Duncan Mac-Vicar P
d3ee81c561 testcase for call 2016-07-06 11:49:39 +02:00
Bo Maryniuk
d1c2d5aaaa Lintfix 2016-07-06 10:09:14 +02:00
Bo Maryniuk
88ab5f4755 Fix Python3 compat (StringIO) 2016-07-06 10:09:14 +02:00
Bo Maryniuk
f1d0961e69 Fix boolean comparison 2016-07-06 10:09:14 +02:00
Bo Maryniuk
f275378e24 Add unit test for update an object 2016-07-06 10:09:14 +02:00
Bo Maryniuk
6174f4ad4a Fix imports 2016-07-06 10:09:14 +02:00
Bo Maryniuk
bf9ba65489 Add unit test for deleting objects 2016-07-06 10:09:14 +02:00
Bo Maryniuk
1ce88be0ef Add unit test for criteria matcher 2016-07-06 10:09:14 +02:00
Bo Maryniuk
a20019d859 Add unit test for "matches" criteria selector 2016-07-06 10:09:14 +02:00
Bo Maryniuk
844eefd758 Add unit test for "less than" criteria selector 2016-07-06 10:09:14 +02:00
Bo Maryniuk
fac88ac41b Add unit test for "equals" criteria selector 2016-07-06 10:09:14 +02:00
Bo Maryniuk
1dfe81bfe6 Add unit test for "more than" criteria selector 2016-07-06 10:09:14 +02:00
Bo Maryniuk
99848659c9 Add unit test on getting objects 2016-07-06 10:09:14 +02:00
Bo Maryniuk
bc1a8b7e45 Accept content in Writer 2016-07-06 10:09:14 +02:00
Bo Maryniuk
c4c2ac7e70 Add object storing unit test 2016-07-06 10:09:14 +02:00
Bo Maryniuk
8e537ccc9e Reset data in Writable 2016-07-06 10:09:14 +02:00
Bo Maryniuk
c744aa1caf Add unit test for database listing 2016-07-06 10:09:14 +02:00
Bo Maryniuk
f7dc2b9c84 Add unit test for object validation 2016-07-06 10:09:14 +02:00
Bo Maryniuk
234e342aa7 Add unit test for object serialization 2016-07-06 10:09:14 +02:00
Bo Maryniuk
0a177297f4 Rename Writable class 2016-07-06 10:09:14 +02:00
Bo Maryniuk
8927d6fef6 Rename "TestEntity" as it accidentally picked by PyTest 2016-07-06 10:09:14 +02:00
Bo Maryniuk
4c7e4d36b7 Fix docstring 2016-07-06 10:09:14 +02:00
Bo Maryniuk
1df6b0a6a9 Add test creating table 2016-07-06 10:09:14 +02:00
Bo Maryniuk
54e5655e11 Add unit test for database close 2016-07-06 10:09:14 +02:00
Bo Maryniuk
f9c40170e5 Add initial tests for fsdb 2016-07-06 10:09:14 +02:00
Bo Maryniuk
eff3f4ef66 Fix broken tests: add os.mkdir mocking 2016-07-06 10:09:14 +02:00
Bo Maryniuk
e85343df9b Add licence to the inspector collector unit test 2016-07-06 10:09:14 +02:00
Duncan Mac-Vicar P
4e7e72e9c4 test return value 2016-07-06 09:37:14 +02:00
Duncan Mac-Vicar P
8aadb33d44 first version of building docker images 2016-07-06 09:14:49 +02:00
Pablo Suarez Hernandez
dc4e51a040 some pylint fixes 2016-07-05 10:04:00 +02:00
Pablo Suarez Hernandez
dd3827e818 snapper module unit tests 2016-07-04 16:27:26 +01:00
Erik Johnson
20ed2c6bcf Remove repr formatting flag in places where it is used solely for quoting (#34183)
* salt/cloud/__init__.py: remove repr formatting

* salt/cloud/clouds/azurearm.py: remove repr formatting

* salt/cloud/clouds/ec2.py: remove repr formatting

* salt/cloud/clouds/profitbricks.py: remove repr formatting

* salt/loader.py: remove repr formatting

* salt/modules/win_file.py: remove repr formatting

* salt/modules/zypper.py: remove repr formatting

* salt/pillar/consul_pillar.py: remove repr formatting

* salt/renderers/pyobjects.py: remove repr formatting

* salt/returners/sentry_return.py: remove repr formatting

* salt/states/bower.py: remove repr formatting

* salt/states/cabal.py: remove repr formatting

* salt/states/cmd.py: remove repr formatting

* salt/states/composer.py: remove repr formatting

* salt/states/win_network.py: remove repr formatting

* salt/states/eselect.py: remove repr formatting

* salt/states/file.py: remove repr formatting

* salt/states/htpasswd.py: remove repr formatting

* salt/states/memcached.py: remove repr formatting

* salt/states/npm.py: remove repr formatting

* salt/states/pip_state.py: remove repr formatting

* salt/states/pkg.py: remove repr formatting

* salt/states/pkgrepo.py: remove repr formatting

* salt/states/supervisord.py: remove repr formatting

* salt/states/timezone.py: remove repr formatting

* salt/states/virtualenv_mod.py: remove repr formatting

* salt/states/dockerio.py: remove repr formatting

* salt/states/win_system.py: remove repr formatting

* salt/utils/nb_popen.py: remove repr formatting

* salt/utils/cloud.py: remove repr formatting

* Add pylint disable due to legit usage of repr flag

See https://github.com/saltstack/salt-pylint/pull/6

* Fix composer tests

These tests needed to be updated because quoting was changed in the
state module in 9dc9146. There was an unnecessary !r used for the
exception class there, which means that instead of the exception class
being passed through the formatter and coming out with the equivalent
value of err.__str__(), we get a repr'ed instance of the exception class
(i.e.  SaltException('',)) in the state output.

The unit test was asserting that we have that repr'ed instance of
SaltException in the output, a case of writing the test to confirm the
badly-conceived output in the state. This has also been corrected.

* salt/cloud/clouds/azurearm.py: lint fixes

* salt/modules/boto_s3_bucket.py: lint fixes

* salt/modules/minion.py: lint fixes

* salt/modules/reg.py: lint fixes

* salt/modules/testinframod.py: lint fixes

* salt/modules/win_iis.py: lint fixes

* salt/pillar/csvpillar.py: lint fixes

* salt/utils/win_functions.py: lint fixes

* salt/states/nxos.py: lint fixes

* salt/returners/mongo_future_return.py: lint fixes

* tests/integration/__init__.py: lint fixes

* tests/unit/context_test.py: lint fixes

* tests/integration/states/file.py: lint fixes

* tests/integration/utils/test_reactor.py: lint fixes

* tests/integration/utils/testprogram.py: lint fixes

* tests/unit/__init__.py: lint fixes

* tests/integration/shell/minion.py: lint fixes

* tests/unit/modules/boto_apigateway_test.py: lint fixes

* tests/unit/modules/boto_cognitoidentity_test.py: lint fixes

* tests/unit/modules/boto_elasticsearch_domain_test.py: lint fixes

* tests/unit/modules/k8s_test.py: lint fixes

* tests/unit/modules/reg_win_test.py: lint fixes

* tests/unit/states/boto_apigateway_test.py: lint fixes

* tests/unit/states/boto_cognitoidentity_test.py: lint fixes

* tests/unit/states/boto_elasticsearch_domain_test.py: lint fixes
2016-06-29 16:30:18 -04:00
rallytime
cc83fa151a Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/status.py
  - salt/utils/__init__.py
  - tests/unit/modules/boto_vpc_test.py
  - tests/unit/modules/mount_test.py
  - tests/unit/states/boto_vpc_test.py
2016-06-28 17:34:27 -06:00
rallytime
c87a108a12 Don't forget the pylint disables for range 2016-06-28 16:52:37 -06:00
rallytime
359e8ca2ce Pylint fixes 2016-06-28 16:04:47 -06:00
Jorge Schrauwen
b8c6948cd5 fixes broken rm_fstab test due to missing __grain__.kernel 2016-06-25 15:42:15 +02:00
rallytime
c2b52ccf9c Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/states/ipset.py
2016-06-24 16:03:11 -06:00
Jorge Schrauwen
c3667203bf add test for vfstab 2016-06-24 23:33:39 +02:00
Jorge Schrauwen
80e9d1d278 set __grains__ for fstab unit test 2016-06-24 23:28:53 +02:00
Jorge Schrauwen
a09055cba7 Fix for #14915 (#34254)
* mount.swaps now works on solarish like systems

* mount.swapon / mount.swapoff supported on solarish platforms

* mount.active (and internal consumers) now work on all solarish platforms

* unit-tests - mount_tests should set kernel grain
2016-06-24 10:32:48 -04:00
rallytime
8cec6f3fb4 Fixup test failure 2016-06-23 09:38:49 -06:00
rallytime
8479c45728 Merge branch '2016.3' into 'develop'
No conflicts.
2016-06-21 17:29:44 -06:00
rallytime
318c2ed6a1 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/salt.py
  - salt/modules/grains.py
  - tests/unit/modules/boto_vpc_test.py
2016-06-21 16:03:31 -06:00
rallytime
8e36e90966 Merge branch '2015.5' into '2015.8'
Conflicts:
  - tests/unit/modules/boto_vpc_test.py
2016-06-21 14:47:23 -06:00
Thomas S Hatch
3dbf7119ce Merge pull request #34088 from Unity-Technologies/osx/mac_defaults_absent
Osx/mac defaults absent
2016-06-20 13:30:40 -06:00
Justin Anderson
b7ac6c735a Moved imports to top, out of _get_moto_version function 2016-06-20 13:20:43 -06:00
Justin Anderson
02f9ba99ba Updated version check. Moved check into it's own function 2016-06-20 10:33:13 -06:00
Justin Anderson
d445026c56 Updated test to work with new moto version. Changed strings to unicode 2016-06-20 09:26:39 -06:00
rallytime
0f92f3420d Change 'Suse' to 'SUSE' in inspect_collector_test
This is needed due to the change in #33564
2016-06-17 10:56:42 -06:00
Daniel Hobley
182373344e Moved to using run_all in the absent function
- Fixed unit tests
2016-06-17 16:13:38 +02:00
joelc
ec31f7a7d4 Adds delete functionality to mac_defaults 2016-06-17 08:25:42 -05:00
rallytime
d957c29704 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/master.py
  - salt/utils/parsers.py
2016-06-16 17:08:39 -06:00
Thomas S Hatch
73ff11585e Merge pull request #33987 from isbm/isbm-inspectlib-cleanup
inspectlib cleanup
2016-06-15 16:09:31 -06:00
Bo Maryniuk
fe300ccf73 Lintfix 2016-06-14 09:39:04 +02:00
Bo Maryniuk
96423076b1 Add unit test for file tree 2016-06-14 00:25:08 +02:00
Bo Maryniuk
8975036b27 Add get_unmanaged_files test 2016-06-14 00:05:34 +02:00
rallytime
c57bcebaf8 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/states/boto_lambda.py
2016-06-13 11:18:53 -06:00
Bo Maryniuk
be5f12fcaf Add initial unit test for inspectlib.collector.Inspector 2016-06-13 18:17:28 +02:00
rallytime
b4ab322ce1 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/saltutil.py
2016-06-10 13:41:53 -06:00
rallytime
f078d57b57 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/rabbitmq.py
  - salt/modules/win_servermanager.py
  - salt/state.py
  - salt/states/boto_s3_bucket.py
  - salt/states/pip_state.py
  - salt/states/win_servermanager.py
  - tests/unit/modules/win_servermanager_test.py
  - tests/unit/states/dockerng_test.py
2016-06-09 13:06:10 -06:00
Nicole Thomas
08a584b3e5 Merge pull request #33711 from rallytime/merge-develop-3
[develop] Merge forward from 2016.3 to develop
2016-06-09 14:12:48 -04:00
Justin Findlay
82f95429db modules.random_org unit tests: skip if random.org down 2016-06-08 20:46:20 -06:00
rallytime
595d4f2ac3 Fixup new groupadd tests for syntax change in 2016.3 2016-06-08 12:42:52 -06:00
rallytime
c5b4ec0b0f Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/salt.py
  - salt/modules/groupadd.py
  - salt/states/service.py
2016-06-08 11:20:18 -06:00
Mike Place
f7b3d0eda0 Merge pull request #33839 from cachedout/fix_pkgresource_test_stacktrace
Fix another unit test stacktrace in pkg_resource
2016-06-08 06:32:55 -07:00
Mike Place
5f081ef31c Merge pull request #33840 from cachedout/remove_matcher_unit_tests
Remove matcher tests
2016-06-08 06:31:41 -07:00
Mike Place
6297448377 Remove matcher tests
These all assert directly against mock objects. They're pointless.
2016-06-07 16:36:01 -06:00
Mike Place
435547a747 Fix another unit test stacktrace in pkg_resource 2016-06-07 15:55:52 -06:00
Mike Place
453fb1ac91 Fixing more stupid unit tests
This time win_servermanager
2016-06-07 15:33:12 -06:00
twangboy
9be45fe37a Fix some more lint 2016-06-07 13:17:29 -06:00
twangboy
8d66fac74c Add missing unit tests 2016-06-07 09:53:22 -06:00
twangboy
60f856f73d Fix unit tests for module 2016-06-06 18:33:29 -06:00
Mike Place
11e39e7203 Merge pull request #33712 from meaksh/fix-for-groupadd-module-failures-in-SLE11-2015.8
Fix for groupadd execution module failures in SLES11 systems
2016-06-03 09:13:06 -07:00
Pablo Suárez Hernández
ab738416ba pylint fix 2016-06-03 13:57:13 +01:00
Pablo Suárez Hernández
bf27e5d36e test_members cleanup 2016-06-03 13:25:05 +01:00
Pablo Suárez Hernández
ba815dbf76 improvements on groupadd unit tests 2016-06-03 13:17:13 +01:00
Mike Place
64c7dd7032 Merge pull request #33626 from evonzee/feature/issue-15749
Feature/issue 15749
2016-06-02 11:23:36 -07:00
rallytime
9220ea0729 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/conf.py
  - salt/minion.py
  - salt/modules/mac_brew.py
  - salt/modules/pkgng.py
  - salt/states/apache_module.py
  - salt/states/ini_manage.py
  - salt/states/win_servermanager.py
2016-06-02 10:13:34 -04:00
rallytime
b7accb0b3b Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/utils/aws.py
  - salt/utils/s3.py
2016-06-02 10:01:43 -04:00
twangboy
6c7b21676a Fix lint and tests 2016-06-01 17:10:55 -06:00
Mike Place
5e022ff29c Merge pull request #33581 from dincamihai/2015.8
Call zypper refresh after adding/modifying a repository
2016-06-01 15:25:11 -07:00
Pablo Suárez Hernández
f9b6858cf9 unit tests for udev execution module
tests improvements
2016-06-01 12:23:30 +01:00
rallytime
cd05d2bed1 Fix zypper test 2016-05-31 13:43:09 -04:00
Nicole Thomas
74a7b78e00 Merge branch '2015.8' into '2016.3'
Conflicts:
  -   -   -   -   -   -   -   -   - doc/conf.py
2016-05-31 11:02:20 -04:00
eric vz
c4f9de2d24 fix broken pacman module tests 2016-05-31 08:17:33 -05:00
eric vz
b49f9d5a19 one last, sad piece of lint 2016-05-31 01:03:15 -05:00
eric vz
7e0f1c0841 Fix (hopefully) the last linter issues 2016-05-31 00:34:13 -05:00
eric vz
803f219160 Clean up linter warnings 2016-05-31 00:07:31 -05:00
eric vz
bf25b8118e switch pacman.group_info to return an array instead of a set so it's useful on command line 2016-05-30 23:08:59 -05:00
eric vz
94c6378c6e Implement group_diff for pacman 2016-05-30 16:56:53 -05:00
eric vz
e89a43d1d0 Implement a basic group_info 2016-05-30 16:39:16 -05:00
eric vz
fa2fe986e6 Add pacman group_list and unit test 2016-05-30 15:33:59 -05:00
eric vz
595beadda7 formatting 2016-05-30 14:13:56 -05:00
eric vz
9e6013c4b7 move helper into a lambda 2016-05-30 14:13:36 -05:00
eric vz
0179d4d849 Add unit tests for pacman list packages 2016-05-30 09:37:17 -05:00
Mihai Dinca
788730ea72 DRY test 2016-05-30 13:52:46 +02:00
Mihai Dinca
1d3769ccfa Improve zypper_patcher_config looks 2016-05-30 13:52:45 +02:00
Mihai Dinca
42d8d4195c Assert only gpgautoimport: True works 2016-05-30 13:51:54 +02:00
Mihai Dinca
80bfbe5c52 Reduce dicts and lists to one line where possible 2016-05-30 10:47:41 +02:00
Mihai Dinca
1d5d6d7d60 Update test method names to pass pylint 2016-05-30 10:05:07 +02:00
Dan Slimmon
180099ae9f Wrote test for broken server connection 2016-05-30 03:23:18 +00:00
anthony-shaw
83461e0940
fixes for docs in servicenow module and more tests 2016-05-29 21:03:33 +10:00
Mihai Dinca
c7ae5907ee Call zypper refresh after adding/modifying a repository
Calling `zypper --gpg-auto-import-keys refresh` is required after
adding/modifying a repository because `--gpg-auto-import-keys` doesn't
do anything when called with `zypper ar` or `zypper mr`.
Without calling `zypper --gpg-auto-import-keys refresh` here, calling
`zypper ref` after adding/removing would still ask for
accepting/rejecting the gpg key.
2016-05-27 16:17:10 +02:00
Pablo Suárez Hernández
eaaef25c79 lint issue fixed 2016-05-26 08:26:24 +01:00
Justin Findlay
2781377b17 modules.mac_brew: update unit tests 2016-05-25 22:15:12 -06:00
rallytime
a5e0141eda Merge branch '2015.8' into '2106.3'
Conflicts:
  - salt/beacons/__init__.py
  - salt/modules/saltutil.py
  - salt/modules/zypper.py
  - salt/states/grains.py
  - salt/states/pkgrepo.py
  - salt/states/service.py
2016-05-25 13:44:21 -06:00
Stefan Schweer
a6c9f2b120 added missing whitespaces 2016-05-25 19:56:00 +02:00
Pablo Suárez Hernández
6b6febb211 unit tests for rpm.checksum() and zypper.download() 2016-05-25 17:08:16 +01:00
Stefan Schweer
169dec76b7 improved tests 2016-05-25 10:23:14 +02:00
Stefan Schweer
f84740957a rebased on develop 2016-05-25 10:22:10 +02:00
Mihai Dincă
c8b4f338d8 Make --gpg-auto-import-keys a global param when calling zypper (#33432) 2016-05-23 14:15:29 -07:00
Mike Place
a4abcc3d03 Remove rabbitmq unit tests (#33451)
* Remove completely pointless RabbitMQ unit test

Why would we even write tests to check to see if a mocked object
returns a string and then assert against that string?! This is absurd.

* Spurious print
2016-05-23 13:57:22 -07:00
Erik Johnson
8b3497b129 Catch exception raised from invalid verify_options (#33317)
* Catch exception raised from invalid verify_options

This fails the state gracefully in these cases.

Refs: 6b97161293 (r63577507)

* Raise an exception when package verification fails

* Catch failed package verification commands

Also, since pkg.verify is run separately on each targeted package, don't
add errors for each failure, just add one error to what we report.

* Update rpm test_verify test to reflect change from cmd.run to cmd.run_all
2016-05-19 12:13:30 -06:00
Andreas Lutro
8abf303183 Add support for kapacitor 0.13 (#33352)
* add support for kapacitor 0.13

* update kapacitor tests
2016-05-19 11:03:03 -07:00
Nicole Thomas
7a7018261e Server Density agentv2 support (#32772) (#33303)
* Added support for the agentv2

* Updated os field to match the SD API requirement

* filename is an absolute path on official installations

* Install script URL uses a redirect now, so we should instruct curl to follow them

* Added a missing import

* Updated the settings for the v2 agent

* Fixed pep8 issues

* select v2 agent for the test
2016-05-17 09:50:36 -07:00
Őry, Máté
0de5410d18 postgres.db_create: fix handling of empty string (#33261)
* modules.postgres: fix handling of empty string in db_create

The code responsible for collecting the parameters used in the CREATE
DATABASE query works unexpectedly in case for values which are evaluated
to False as bool, but are not None.

This caused queries with missing rvalues like this one (lc_collate=""):
2016-05-13 16:04:05,243 [salt.loaded.int.module.cmdmod][ERROR   ][2990]
stderr: ERROR:  syntax error at or near "OWNER"
LINE 1: ..._production" WITH ENCODING = 'utf8' LC_COLLATE =  OWNER =
"g...

Please note that proper escaping or a different approach would be needed
here.

* modules.postgres: handle trivial sqli in db_create

* modules.postgres: fix OrderedDict usage

* modules.postgres: quote TABLESPACE too in db_create
2016-05-16 09:27:40 -07:00
Moe
3b50a7b98d Fix list_values, add test (#33264) 2016-05-16 07:31:19 -07:00
rattlesnack
05e763c53c Gentoo/OpenRC service management enhancements (#33260)
* gentoo service enhancements

* fixing command examples
making sure enabled handles multiple runlevel

* unused import removed

* replacing collection.OrderedDict with salt.utils.odict.OrderedDict

* set replaced with list
2016-05-16 07:26:24 -07:00
Nicole Thomas
457d9dd4f5 [develop] Merge forward from 2016.3 to develop (#33193)
* Add run_on_start docs to schedule.rst (#32958)

Fixes #22580

* Backport #33021 manually to 2015.5 (#33044)

* Saltfile with pillar tests (#33045)

* add file.managed with pillar data tests

* do not require git for other tests

* Fix minor document error of test.assertion (#33067)

* test pillar.items output (#33060)

* File and User test fixes for 2015.5 on Fedora23 (#33055)

* Fix file_test.test_symlink on 2015.5

* Fix failing user present test

* add test for installing package while using salt-call --local (#33025)

* add test for installing package while using salt-call --local

* fix pylint

* ssh docs: install py-2.6 for RHEL 5

* Bugfix: Restore boolean values from the repo configuration

* Add test data for repos

* Add repo config test

* Bugfix (follow-up): setting priority requires non-positive integer

* modules.npm: do not log npm --version at info level (#33084)

* salt-cloud: fix ipv6-only virtual machines (#32865)

* salt-cloud: fix ipv6-only virtual machines

* fix hostname for rsync fallback in scp_file function

* use 4 spaces instead of 2

* remove global variable, use direct socket call instead

* Use saltstack repo in buildpackage.py on CentOS 5 (#33080)

* Lower display of msgpack failure msg to debug (#33078)

Closes #33074

* cloud.query needs to define mapper.opts (#33098)

* clarify docs that map is designed to be run once. is not stateful (#33102)

* Moved _finger_fail method to parent class.

Method _finger_fail method from SAuth to AsyncAuth class to make method available
in both class and fix an issue where _finger_Fail is called inside AsyncAuth.

* Fix 33058 (#33099)

* Fix servermanager module

- Added check for 2008 version of windows
- Added Import-Module ServerManager to _pshell_json.
  Apparently this needs to run each time we issue a
  servermanager command.

* Fix list_available

* salt.utils.gitfs: fix formatting for warning messages (#33064)

* salt.utils.gitfs: fix formatting for warning messages

When git_pillar support was added to salt.utils.gitfs, the
recommendation globals had string formatting placeholders added to them,
but the locations where these values are referenced do not call
``.format()`` to properly replace them. This commit fixes that
oversight.

* Remove more gitfs and master-specific wording from log messages

* Add a check that the cmdline of the found proc matches (#33129)

* Doc mock decorators (#33132)

* Add mock function for mocking decorators

* Mock the stdlib user module because importing it will open the repl

* Fix broken parsing of usermgmt.conf on OpenBSD (#33135)

When creating a new user, if a group of the same name already exists,
the usermgmt.conf file is consulted to determine the primary group.
It's in these cases that the parsing bug is triggered.

This code change addresses several of the existing issues:

- The previous split statement explicitly specified a single space.
  Since a config line may have any number of spaces and/or tabs
  surrounding the entries, the resulting array's elements may be
  incorrect.

- According to the man pages for usermgmt.conf, the "group" config
  entry accpets a single parameter -- so we shouldn't iterate.

- The "val[1]" was returning the 2nd letter of each word and not the
  second word on the config line as intended.

* Move salt-ssh thin dir location to /var/tmp (#33130)

* Move salt-ssh thin dir location to /var/tmp

Closes #32771

* Remove performance penelty language

* If cache_jobs: True is set, populate the local job cache when running salt-call (#33100)

* If cache_jobs: True is set, populate the local job cache

Fixes #32834

Allows a masterless minion to query the job cache.

* Refactor cache_jobs functionality to be DRY

* Skipping salt-call --local test

* Back-port #31769 to 2015.8 (#33139)

* Handle empty acl_name in linux_acl state

Calls to setfacl interpret an empty group or user name to mean to be the
owner of the file they're operating on. For example, for a directory
owned by group 'admin', the ACL 'default:group::rwx' is equivalent to
'default:group:admin:rwx'.

The output of the getfacl execution module returns ACLs in the format of
'group:admin:rwx' instead of 'group::rwx'. This commit changes the
acl.present state to look for the owner of the file if the acl_name
paremeter is empty.

* Fix acl.present/acl.absent changing default ACLs

The behaviour of the acl.present and acl.absent is to check the data
structure returned by getfacl contains a key by the name of acl_type.

However, this data structure does not contain any default ACLs if none
exist, so this check will fail. We omit the check if a default ACL was
passed into the state functions.

Unfortunately, the call to modfacl may fail if the user passes in an
acl_type such as 'default:random'. In this case the state will appear to
succeed, but do nothing.

This fixes the state module to allow setting default ACLs on files which
have none.

* Fix regression in 2016.3 HEAD when version is specified (#33146)

Resolves #33013.

* Hash fileclients by opts (#33142)

* Hash fileclients by opts

There was an issue whereby the cache of the fileclient was being overwritten
by dueling minion instances in multimaster mode. This protects them by hashing
by the id of opts.

Closes #25040

* Silly typo!

* Remove tests which do not test any actual functionality or are too tightly coupled to the implementation

* Strip ldap fqdn (#33127)

* Add option to strip off domain names on computer names that come from LDAP/AD

* Add strip_domains option for ldap.

* Add documentation for auth.ldap.minion_stripdomains.

* [2015.5] Update to latest bootstrap script v2016.05.10 (#33155)

* [2015.8] Update to latest bootstrap script v2016.05.10 (#33156)

* [2016.3] Update to latest bootstrap script v2016.05.10 (#33157)

* add 2015.5.11 release notes (#33160)

* add 2015.8.9 release notes (#33161)

* Pip fix (#33180)

* fix pip!!

* make it work with old pip as well

* Added resiliency

* Don't need to check, just get the right name

* [2015.5] Update to latest bootstrap script v2016.05.11 (#33185)
2016-05-12 07:53:39 -07:00
rallytime
c6f18fac3f Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/minion.py
2016-05-10 15:13:24 -06:00
Mike Place
033bef2ed2 Hash fileclients by opts (#33142)
* Hash fileclients by opts

There was an issue whereby the cache of the fileclient was being overwritten
by dueling minion instances in multimaster mode. This protects them by hashing
by the id of opts.

Closes #25040

* Silly typo!

* Remove tests which do not test any actual functionality or are too tightly coupled to the implementation
2016-05-10 15:04:52 -06:00
rallytime
92e0c17645 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-05-09 13:55:06 -06:00
Nicole Thomas
b6cf601722 Merge pull request #33103 from rallytime/merge-develop
[develop] Merge forward from 2016.3 to develop
2016-05-09 13:24:25 -06:00
Mike Place
3690598301 Remove poorly written test (#33124)
This tests nothing at all. Removing with extreme prejudice.
2016-05-09 10:06:18 -07:00
rallytime
ced033c0a4 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/topics/releases/2016.3.0.rst
  - salt/scripts.py
  - salt/states/glusterfs.py
2016-05-06 16:05:58 -06:00
rallytime
180c03ca24 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/salt.py
  - salt/modules/zypper.py
  - salt/scripts.py
  - salt/states/boto_elb.py
  - tests/integration/states/user.py
  - tests/unit/states/file_test.py
2016-05-06 09:20:05 -06:00
Mike Place
6d604926d3 Merge pull request #33088 from isbm/isbm-zypper-fix-booleans
Bugfix: Restore boolean values from the repo configuration
2016-05-06 08:13:27 -07:00
Megan Wilhite
2c6326f14a fix tests for file.blockplace to remove newline (#33082) 2016-05-06 08:44:20 -06:00
Bo Maryniuk
79a46e091c Add repo config test 2016-05-06 12:57:52 +02:00
Bo Maryniuk
222b8369ca Add test data for repos 2016-05-06 12:57:36 +02:00
Mike Place
fb89877cf2 Merge pull request #32892 from isbm/isbm-zypper-env-variables
Resolve Zypper locks on asynchronous calls
2016-05-05 07:34:59 -07:00
Shane Lee
280d10af01 rewrite win_service.py (#32998)
* Rewrite service.get_all

* Add service.info

* Add try/except for service not found

* Simplify raise error

* Add lookup dicts for service.info

* Fix lookup dictionaries

* Add Description to service.info

* Add additional status details

* Add service.modify function

* Fix _get_service_handles function

* Fix modify function, transition others

* Modified enable, disable, enabled, and disabled

* Fix service.disable

* Add documentation

* Find mismatched case service names

* Fix some lint

* Fix unit tests

* Fix lint in win_service_test

* Skip tests that will fail when WINAPI not available
2016-05-05 07:20:55 -07:00
Justin Findlay
a78bbd0544 Update mac_assistive module for El Capitan (10.11) (#33047)
* modules.mac_assistive int tests: wrap args in list

* modules.mac_assistive.install: match schema on El Capitan

* modules.mac_assistive: remove redundant LooseVersion

* modules.mac_assistive unit tests: mock __grains__
2016-05-04 15:34:03 -06:00
rallytime
16c9ce70ad Merge branch '2016.3' into 'develop'
No conflicts.
2016-05-02 12:58:24 -06:00
rallytime
c12b9a5094 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-05-02 10:50:27 -06:00
Justin Anderson
00fbeaba5f Fix boto_secgroup_test (#32986) 2016-05-02 10:46:19 -06:00
Anthony Shaw
af7593ae53 Introduce a lightweight unit test runner for execution modules (#32792)
* Added servicenow execution module

* Fixed up the linting

* Fix docstrings

* Setup basic unit test runner

* Setup basic loader mock and wrapper for declaring dependent packages

* Updated unit test runner and setup my first test example

* Update the servicenow module after a bad merge commit

* Code comments for the base unit test runners

* Fix linting issues

* remove empty line endings
2016-04-29 13:36:17 -07:00
Justin Findlay
cc854f1464 update pip state and integration tests for newer pip versions (#32905)
* modules.virtualenv_mod: use correct pip bootstrap url

* modules.pip: raise error on mirrors arg

* states.pip: run mirrors test on < 7.0.0

* update pip integration test states to not use mirrors

* modules.pip: run mirrors tests on pip < 7.0.0
2016-04-29 10:49:29 -07:00
Bo Maryniuk
c55b0fab58 Test DOM parsing 2016-04-27 15:43:35 +02:00
Bo Maryniuk
c54e928e4f Add exception handling test 2016-04-27 15:43:17 +02:00
Bo Maryniuk
6a98f523ac Add Zypper caller test suite 2016-04-27 15:21:00 +02:00
Bo Maryniuk
7e1712dd80 Fix tests according to the new calling model 2016-04-27 14:35:22 +02:00
Bo Maryniuk
3a30b7fbcd Remove an obsolete test case 2016-04-27 14:34:54 +02:00
Bo Maryniuk
6e5877a2ee Add Zypper Call mock 2016-04-27 14:34:31 +02:00
rallytime
cbf42a8407 Merge branch '2016.3' into 'develop'
Conflicts:
  - conf/master
  - doc/ref/configuration/master.rst
  - salt/cli/batch.py
  - salt/cli/daemons.py
  - salt/config/__init__.py
  - salt/minion.py
  - salt/modules/aptpkg.py
  - salt/modules/beacons.py
  - salt/states/archive.py
  - salt/states/cmd.py
  - salt/utils/gitfs.py
  - tests/unit/states/cmd_test.py
2016-04-26 14:42:26 -06:00
rallytime
80fcdfb9d8 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/topics/targeting/grains.rst
  - salt/cli/daemons.py
  - salt/exceptions.py
  - salt/minion.py
  - salt/modules/schedule.py
  - salt/scripts.py
  - salt/states/archive.py
2016-04-26 12:07:42 -06:00
Damon Atkins
cf4826aad4 Windows Registry Unicode Support and PY2 character encoding (module.reg) (#32835)
* reg.py
* Start at PY3 support, however not tested against PY3
* Change to Unicode including from __future__ import unicode_literals
* If PY2 converts all parameter input unicode to local encoding i.e. Unicode to String
* If PY3 stays as Unicode as PY3 uses Windows Wide Char
* Supports non-asiic characters i.e. > 126
* All output is Unicode, before most of it was Unicode output
* Added a safty check to recursive delete to try and prevent a mistake like removing all of SOFTWARE
* Fixed all the pylint errors
* add _ prefix to internal functions
* Provided unit test see reg_win_test.py
reg_win_test.py
* All tests currently make real changes to the registry
* All changes are performed under SOFTWARE\SaltStackTest under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER
* Their is still room for more tests to be developed
* Test target the new Unicode features of reg.py e.g. Copyright, Tradmark and Register characters
* General the values set in the registy contain date/time and then checked that they are the current date/time to make sure they are not left over from old tests

* Update test unit to only run the tests on windows.
Removed some code which was commented out which is not required

* chmod 644 tests/unit/modules/reg_win_test.py
2016-04-26 11:07:04 -06:00
Nicole Thomas
eb8fb6b9df Back-port #31139 to 2015.8 (#32868)
* Evaluate %h and %u before deciding if the ssh config path is absolute

Since %h is the user's home directory, it's not very useful unless it
appears at the beginning of the path.  However, putting it at the
beginning of the path does not have the expected effect: %h/.ssh
will become /home/someuser/home/someuser/.ssh, since "%h/.ssh" is
identified by Python as a non-absolute path, causing the user's
home directory to be tacked on the front.

* Improved ssh_auth path expansion test
2016-04-26 10:44:01 -06:00
Knut Auvor Grythe
478856815c Support unicode in all GECOS fields on FreeBSD (#32794)
* Support unicode in all GECOS fields on FreeBSD

* Revert erroneous change

* Add unit tests
2016-04-25 15:19:13 -06:00
Alejandro Bednarik
5b59840373 Rsync synchronized updates. (#32739)
Aadded --dry-run option which is also used for test mode
taking adventage of this option in rsync.

Update state documentation to follow Salt standards

Finally synchronized was not working, See #32478. Changes cmd.run to cmd.run_all make this works.
Tests updated
2016-04-25 10:54:33 -06:00
Carlos Perelló Marín
9d028262f4 Server Density agentv2 support (#32772)
* Added support for the agentv2

* Updated os field to match the SD API requirement

* filename is an absolute path on official installations

* Install script URL uses a redirect now, so we should instruct curl to follow them

* Added a missing import

* Updated the settings for the v2 agent

* Fixed pep8 issues

* select v2 agent for the test
2016-04-22 12:50:03 -06:00
Justin Anderson
f6861768f4 Skipping boto test on OpenSuse (#32624) 2016-04-18 09:57:51 -06:00
rallytime
efe3ec82da Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/ref/configuration/master.rst
  - salt/modules/glusterfs.py
  - salt/modules/service.py
  - tests/unit/modules/glusterfs_test.py
2016-04-13 16:10:33 -06:00
rallytime
b77993d9a1 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/configuration/minion.rst
  - doc/topics/targeting/grains.rst
  - salt/crypt.py
  - salt/scripts.py
  - salt/states/dockerng.py
  - salt/states/pkg.py
2016-04-13 09:42:54 -06:00
Nicolas Delaby
5d73d54ed2 Enhance dockerng.wait() to control success on exit_code and on already stopped containers (#32475) 2016-04-13 08:16:26 -06:00
Eric Radman
bae492ad8f Fix tests that assert CommandExecutionError (#32485)
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
2016-04-12 08:41:25 -06:00
Bo Maryniuk
492ebfc184 Isbm zypper list products sles11 crash (#32505)
* Check for EOL aggregate and fix time_t attribute

* Update SLE11 SP3 data

* Update SLE12 SP1 data

* Adjust test values according to the testing data
2016-04-12 08:14:19 -06:00
Nicole Thomas
216d9fdc9a [develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute

* remove reference to master_alive_check

* Fixes saltstack/salt#28262

* Resolve memory leak in authentication

* outputter virt_list does not exist anymore

* Update proxmox documentation

* Fix documentation on boto_asg and boto_elb modules and states

* modules.win_timezone: don't list all zones in debug log

* Correcty index glusterfs bricks

Fixes issue #32311

* Cleaner deprecation process with decorators

* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix

* Fixes saltstack/salt#28262 for 2015.5 branch

* Update master config docs

* Improve git_pillar documentation/logging

* Add note about different behavior of top file in git_pillar

* Make log entry for a missing pillar SLS file more accurate for git_pillar

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* Update glusterfs_test to be inline with #32312

* Fix salt-cloud paralell provisioning

Closes #31632

* Ignore Raspbian in service.py __virtual__ (#32421)

* Ignore Raspbian in service.py __virtual__

This prevents more than one execution module from trying to load as the
service virtual module.

Refs: #32413

* pack __salt__ before loading provider overrides

We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides

* Fix broken __salt__ dict in provider override

Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.

* Merge #32293 with test fixes (#32418)

* Fix issue #11497

* Remove check for working directory presence in tests

* Fix Domainname introspection

Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.

* Add pgjsonb_queue to queue doc index

* Pylint fixes

* Pass parser options into batch mode

Resolves #31738

* Changed the target file in file.symlink test (#32443)

* Argument name in docs should match actual arg name (#32445)

Fixes #31851

* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)

Updates 0edd532, 8f558a5.

When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.

My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.

* Issue #28706: Fix state user.present behavior. (#32448)

- As mentionned in issue #28706, state user.present no longer remove
      user from groups if the keyword 'groups' with empty value '[]' is not
      explicitly set, salt will assume current groups are still wanted.

* tests.integration: fix 4230c8a

* Move the tables of virtual modules to individual documentation pages

* Add new doc pages to toctree

* Add external ref to windows package manager docs

* Improve docstrings

* Add documentation on virtual module provider overrides to the module docs

* Clarify the scope of the provider param in states.

* Add link to provider override docs to all package providers

* Add link to provider override docs to all service providers

* Add link to provider override docs to all user providers

* dd link to provider override docs to all shadow providers

* Add link to provider override docs to all group providers

* Backport 31164 and 31364 (#32474)

* Don't send REQ while another one is waiting for response.

The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.

* Fixed zeromq ReqMessageClient destroy

* Add link to provider override docs to opkg.py

This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.

* Add documentation for some master/minion configs (#32454)

Refs #32400

Adds docs for:

- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal

* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)

* Automatically detect MySQL password column

* Fix changing password in MySQL 5.7

* Fix lint test

* Fix unit tests (?)

They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.

* Additional unit test fix

* Only unsub if we have a jid

Closes #32479
2016-04-11 17:07:15 -06:00
Neil Williamson
4372dc3816 Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column

* Fix changing password in MySQL 5.7

* Fix lint test

* Fix unit tests (?)

They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.

* Additional unit test fix
2016-04-11 11:07:44 -06:00
Nicole Thomas
49af98b7a7 Merge pull request #32431 from rallytime/merge-develop
[develop] Merge forward from 2016.3 to develop
2016-04-08 11:17:28 -06:00
rallytime
d942c38cb1 Removed useless slack_notify unit tests 2016-04-08 11:13:14 -06:00
Eric Radman
2d9f8ab27e Skip PAM test on OpenBSD (#32439)
Will always fail since OpenBSD does not have have PAM
2016-04-08 10:19:41 -06:00
rallytime
7f8eb751a0 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/cli/daemons.py
  - salt/modules/win_servermanager.py
  - tests/unit/modules/win_servermanager_test.py
2016-04-08 10:09:03 -06:00
rallytime
59b804d230 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/pkgng.py
  - salt/modules/status.py
  - salt/states/boto_asg.py
  - salt/states/boto_elb.py
2016-04-07 16:28:59 -06:00
Justin Anderson
ec284fdff4 Fix issue that #32420 exposed in timezone_test 2016-04-07 16:19:27 -06:00
Eric Radman
b220b4dd98 Unbreak timezone test for Gentoo (#32420)
Gentoo and Debian both use use /etc/timezone

See https://wiki.gentoo.org/wiki/System_time
2016-04-07 14:55:51 -06:00
Justin Anderson
6f98bd50eb Update glusterfs_test to be inline with #32312 2016-04-07 14:38:21 -06:00
Bo Maryniuk
0d9a06b8c6 Cleaner deprecation process with decorators
* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix
2016-04-06 12:55:45 -06:00
rallytime
093d833ff1 Merge branch '2016.3' into 'develop'
Conflicts:
  - pkg/osx/build.sh
2016-04-05 15:38:58 -06:00
rallytime
760f479424 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/daemons.py
  - salt/config/__init__.py
  - salt/scripts.py
  - salt/state.py
  - tests/unit/config/config_test.py
2016-04-05 15:09:27 -06:00
Justin Anderson
73118d0149 Deleted win_servermanger_test.py 2016-04-04 12:48:05 -06:00
Benjamin Drung
8cada9573f Fix typos of retrieve 2016-04-04 14:27:41 +02:00