Commit Graph

7333 Commits

Author SHA1 Message Date
Mike Place
39cd8da399 Lint diff against salt-testing 2016-07-27 10:42:44 -06:00
Mike Place
443e5cdde2 Add timeout to ssh tests 2016-07-27 10:40:02 -06:00
Mike Place
2d3b95dec9 Merge pull request #34971 from cachedout/increase_timeout_grains_test
Increase timeout for grains test
2016-07-26 16:11:29 -06:00
Mike Place
82d271b43a Increase timeout for grains test 2016-07-26 16:10:30 -06:00
Johannes Scholz
775ea73578 fix unit tests 2016-07-26 19:46:14 +02:00
Mike Place
d80350cdcc Increase all run_script timeouts to 30s (#34956) 2016-07-26 10:54:45 -06:00
rallytime
8b295fe4ea Merge branch '2015.8' into '2016.3'
Conflicts:
salt/config/__init__.py
salt/utils/parsers.py
tests/integration/__init__.py
2016-07-25 14:13:44 -06:00
Ch3LL
617f5680e4 add windows path and add custom tar 2016-07-22 17:51:41 -06:00
Mike Place
8becec2f4f Backport #34906 2016-07-22 17:22:50 -06:00
rallytime
109b368d19 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-22 10:32:59 -06:00
Erik Johnson
1ca1367289 Fail git.latest states with uncommitted changes when force_reset=False (#34869)
* Add git.diff function

* Fail git.latest states with uncommitted changes when force_reset=False

Also, discard these changes when running the state if force_reset=True.

* Add integration test for case where there are uncommitted changes
2016-07-22 09:04:05 -06:00
Mike Place
b4be66dedf Fix wheel test
Fix random ordering bug
2016-07-21 13:54:32 -06:00
rallytime
15b4f5a8b3 Skip GCE unit tests - causes test suite to hang 2016-07-21 10:53:00 -06:00
rallytime
094731f4b6 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-20 12:32:08 -06:00
Justin Anderson
9abb6f91bb Skip mysql state test if mysqladmin is not available 2016-07-20 09:24:24 -06:00
Mike Place
62ef8fdb35 Merge pull request #34670 from isbm/isbm-osmajorrelease-grain-suse
Add "osmajorrelease" grain (2016.3)
2016-07-20 08:39:38 -06:00
Bo Maryniuk
110a422d5a Keep osmajorrelease as a string type for 2016.3 release 2016-07-19 17:52:08 +02:00
rallytime
3e032dc397 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-19 09:30:45 -06:00
Mike Place
10a1af9949 Remove unnedeed config test (#34751)
Refs #34607
2016-07-18 13:00:47 -06:00
Mike Place
46901c6e65 Disable test
There's a race condition in here somewhere. Disabling and tracking issue elsewhere.
2016-07-18 12:39:49 -06:00
Justin Anderson
b94e0dd95a ipset.long_range doesn't need a docstring 2016-07-18 10:32:32 -06:00
Mike Place
4625ee65b8 Remove unnedeed config test
Refs #34607
2016-07-18 09:12:18 -06:00
rallytime
cca9446c37 Various spelling fixes
Fixes #34630
2016-07-16 13:17:09 -06: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
0c566dce89 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-14 14:06:42 -06:00
Mike Place
64a154826a Revert "Modify lodaer global test to use populated dunders"
This reverts commit f45dbe8508df70ce3f563915318791614449b341.
2016-07-14 12:11:44 -06:00
Bo Maryniuk
208fd33b48 Add unit test for osmajorrelease grain 2016-07-14 18:05:12 +02:00
Nicole Thomas
bc63f25a6f Lint 34644 (#34651)
* Better error handling for __virtual__ in dockerng module

* Modify lodaer global test to use populated dunders

This prevents a number of errors in the error log and makes for a
more robust test IMHO

* Lint #34644
2016-07-13 18:58:54 -04:00
Mike Place
50360263c5 Adjust the mine test a little bit to give it a better chance of success (#34647) 2016-07-13 16:51:28 -04:00
Justin Anderson
dd1559a599 Check that mysqladmin exists before running mysql integration tests. 2016-07-13 11:08:26 -06:00
Mike Place
3e612c3794 Merge pull request #34618 from jtand/network_integration_fix
Network state integration test test=True
2016-07-13 10:30:15 -06:00
Megan Wilhite
f6dfbac5ca add num_cpus grain to freebsd (#34565)
* add num_cpus grain to freebsd

* fix pylint
2016-07-13 11:40:09 -04:00
Justin Anderson
445f8afc69 Fixes failing test on Suse Leap (#34621) 2016-07-12 18:48:06 -04: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
rallytime
3026df346f Merge branch '2015.5' into '2015.8'
No conflicts.
2016-07-12 13:27:16 -06:00
Nicole Thomas
b90ae407f9 Add support for edge case when Cmd and Entrypoint can't be blanked (#34593) 2016-07-12 15:18:53 -04:00
Justin Anderson
57df38e685 Update github IP for ssh state integration tests (#34592) 2016-07-12 15:17:41 -04:00
Nicole Thomas
efc2ab9d68 [2016.3] Avoid salt.utils circular imports when using "from" (#34585)
Also removes an unused import
2016-07-12 15:13:26 -04:00
Justin Anderson
34bcf9ccfc Changed network state test to use test=True 2016-07-12 12:40:40 -06:00
Nicole Thomas
2e1007254b Avoid circular imports when calling salt.utils functions (#34584) 2016-07-12 13:41:30 -04: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
Justin Anderson
b2616833b0 Some small changes 2016-07-11 14:35:25 -06:00
rallytime
815c8b38d5 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-08 10:34:32 -06:00
rallytime
f8a3622be7 Rename unit.states.boto_secgroup to unit.states.boto_secgroup_test 2016-07-07 21:29:36 -06:00
rallytime
ceefb6e34c Rename tests.unit.simple to tests.unit.simple_test
These tests are not getting run automatically in a ./runtests.py -u
or on Jenkins runs. This name changes allows them to run automatically.
2016-07-07 17:12:27 -06:00
Mike Place
6b8c76af83 Prevent many errors in the test suite in loader tests (#34521)
Pack in what the loader needs.
2016-07-07 17:03:45 -04:00
Ch3LL
c5035118bf add skip_verify option to archive.extracted 2016-07-07 14:42:27 -06:00
Mike Place
685df80929 Merge pull request #34518 from terminalmage/fix-pkg.latest-test
Fix pkg.latest integration test for non-LTS ubuntu
2016-07-07 13:29:13 -06:00
rallytime
27988dde48 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/configuration/minion.rst
2016-07-07 12:31:12 -06:00
Justin Anderson
ed59113e94 Change network state integration test to use test=True 2016-07-07 12:27:18 -06:00
Erik Johnson
4aef44ecdf Fix pkg.latest integration test for non-LTS ubuntu
This test uses ``pkg.list_upgrades`` to find a package which it assumes is
installed, to test ``pkg.installed`` with ``only_upgrade=True``. The
problem with that approach is that ``pkg.list_upgrades`` uses a dry-run
of an ``apt-get dist-upgrade`` to find the upgrades. On non-LTS Ubuntu
releases, a ``dist-upgrade`` results in upgrading to an entirely new
Ubuntu release, and new packages which would be installed by the
dist-upgrade (but are not currently installed) will be included in the
return data. This causes the test to fail when we attempt to run
``pkg.latest`` with ``only_upgrade=True`` on a package which is not
already installed.

This commit fixes the test by ensuring that our target package is
already installed, and continuing to iterate through the return data
from ``pkg.list_upgrades`` until a currently-installed package is found.
2016-07-07 12:51:01 -05:00
Nicole Thomas
3ebba020b6 Rename some unit test files by adding _test (#34503)
These two test files are currently not running automatically on Jenkins.
Renaming these files will add them to the full runtests.py run.
2016-07-07 12:05:08 -04:00
Justin Anderson
75299456be Use skipTest for network state integration test (#34489)
* Updated skipTest to check for debian or redhat

* Removed skipIf import
2016-07-06 13:43:09 -04:00
rallytime
2b307b7ea1 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/states/file.py
  - tests/unit/states/file_test.py
2016-07-06 09:12:25 -06:00
twangboy
78f7c530bb Remove unit tests, integration tests written 2016-07-05 15:12:34 -06:00
Justin Anderson
0460edb9e2 Arch linux does not have osrelease or osmajorrelease grains (#34453) 2016-07-05 15:34:41 -04:00
rallytime
91120dba01 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-07-05 09:58:52 -06:00
rallytime
55a91e22be Merge branch '2015.5' into '2015.8'
No conflicts.
2016-07-05 09:13:50 -06:00
Mike Place
8c72ee56e4 Merge pull request #34435 from cachedout/backport_config_dir_integration
Backport change to integraiton test suite
2016-07-05 08:24:53 -06:00
Mike Place
0e2c71a537 Backport change to integraiton test suite
Will avoid lint errors in earlier branches. Thanks to @terminalmage for pointing out my error.
2016-07-01 16:10:34 -06:00
rallytime
8398de0baf Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-30 16:08:57 -06:00
Mike Place
45b8fb10d7 Merge pull request #34373 from jtand/network_state_integration_test
Network state integration test
2016-06-30 08:05:44 -07:00
Erik Johnson
d6af1de0b7 Optimize pkg integration tests and add a couple new tests (#34377)
* Remove redundant usage of destructiveTest decorator

* Remove unnecessary SLS file

This simple state can be run using run_state

* Explicitly order tests

* Use run_state instead of invoking state.sls

* Ensure only one refresh_db done during pkg integration tests

* Add pkg.latest test for package without an epoch

* Optimize pkg.latest_version usage in pkg integration tests

* Clarify outcome when only_upgrade is used

* Add pkg.latest test with only_upgrade=True
2016-06-30 10:48:22 -04:00
rallytime
3149da1bcc Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-29 16:16:46 -06:00
Justin Anderson
1d24053e36 network.system sls file 2016-06-29 14:31:46 -06:00
Justin Anderson
4a9e6af542 network.routes sls file 2016-06-29 14:31:07 -06:00
Justin Anderson
76c90b2ef6 network.managed sls file 2016-06-29 14:30:23 -06:00
Justin Anderson
84a36369fa Added network state integration test 2016-06-29 14:28:36 -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
Nicole Thomas
94e094652c Back-port #34324 to 2015.8 (#34344)
* Add test to match against custom grains

* Lint

* Forgot to add custom grain
2016-06-28 16:35:32 -04:00
rallytime
f9ab8ba46d Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-28 14:26:24 -06:00
Erik Johnson
f6bd1ad47e Revert py3modernize lint changes (#34339)
* salt/__init__.py: revert py3modernize lint changes

* salt/cloud/clouds/vmware.py: revert py3modernize lint changes

* salt/modules/jboss7_cli.py: revert py3modernize lint changes

* salt/payload.py: revert py3modernize lint changes

* salt/serializers/yamlex.py: revert py3modernize lint changes

* salt/states/win_servermanager.py: use absolute imports

* salt/utils/args.py: revert py3modernize lint changes

* salt/utils/decorators/__init__.py: use __name__ instead of func_name

__name__ is py3-compatible and also works on builtins in py2, which
func_name does not.

* salt/utils/compat.py: revert py3modernize lint changes

* salt/utils/__init__.py: revert py3modernize lint changes

* salt/version.py: revert py3modernize lint changes

* tests/salt-tcpdump.py: revert py3modernize lint changes
2016-06-28 16:04:02 -04:00
Mike Place
80a659bb51 Merge pull request #34283 from sjorge/2016.3-mount-fstab
2016.3 mount vfstab support
2016-06-28 12:23:39 -07:00
Mike Place
046bdaa9f2 Merge pull request #34306 from ghedo/iptables_flush_table
Fix iptables.flush state: Do not force 'filter' table when flushing
2016-06-28 12:03:14 -07:00
Erik Johnson
b793426c23 Remove unnecessarily-disabled sanity check (#34325)
This was commented out for reasons having nothing to do with anything
else going on in 0c069dd. Uncommenting this sanity check so that we are
notified if we need to update our targets in the future.
2016-06-28 11:12:55 -04:00
Alessandro Ghedini
882c6c9c86 Do not force 'filter' table when flushing
The "table" argument is already part of the function signature, this means
that flush() will always force the "filter" table even when the user sets
a different one.
2016-06-28 15:40:50 +01:00
Ch3LL
693cc61aa4 add osmajorrelease to ubuntu and fix pylint 2016-06-27 16:32:21 -06:00
Ch3LL
2fc3e8a54b add osmajorrelease grain for raspbian 2016-06-27 14:45:09 -06:00
Jorge Schrauwen
b8c6948cd5 fixes broken rm_fstab test due to missing __grain__.kernel 2016-06-25 15:42:15 +02: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
rallytime
ae8ad9329c Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/renderers/gpg.py
  - tests/unit/renderers/gpg_test.py
2016-06-24 14:45:37 -06:00
Mike Place
65c5675a3f Merge pull request #34257 from rallytime/fix-34037
Use 'config_dir' setting instead of CONFIG_DIR in gpg renderer
2016-06-24 10:25:04 -07:00
rallytime
d7a5e9b10e Remove test that doesn't actually test anything 2016-06-24 09:10:13 -06: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
Mike Place
cb5399787c Merge pull request #34136 from meaksh/salt-suse-os-detection-2015.8
Fixed behavior for SUSE OS grains in 2015.8
2016-06-23 13:24:58 -07:00
Mike Place
3acda896f2 Merge pull request #34134 from meaksh/salt-suse-os-detection
Fixed behavior for SUSE OS grains in 2016.3
2016-06-23 13:24:51 -07: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
Mike Place
3669048654 Merge pull request #34077 from rallytime/grains-tests
Add some grains targeting tests
2016-06-21 09:06:30 -07:00
rallytime
b061b86946 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-06-20 17:22:07 -06:00
rallytime
2199bb8a78 Add integration tests for grains.append 2016-06-20 16:44:22 -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
Pablo Suárez Hernández
97f1958863 some cleanup and renaming 2016-06-20 15:47:34 +01:00
Pablo Suárez Hernández
23ce0b431b some cleanup and renaming 2016-06-20 15:39:19 +01:00
Pablo Suárez Hernández
548971bdc9 Fix for SUSE OS grains in 2015.8 2016-06-20 13:13:00 +01:00
Pablo Suárez Hernández
44eda2ad9f Fix for openSUSE Tumbleweed 2016-06-20 12:04:10 +01:00
Pablo Suárez Hernández
0d4a710d86 fixes for fopen mock and some os_release_map for SLES11SP3 2016-06-20 11:56:06 +01:00
Pablo Suárez Hernández
d6410a03b8 unit tests for SUSE os grains detection 2016-06-20 11:22:01 +01:00
Justin Findlay
6d0d52fa86 modules.pkg int tests: skip refresh_db upon error (#34072) 2016-06-17 09:35:47 -06:00
Pablo Suárez Hernández
d78d57b717 Test fixed: get OS grain from /etc/os-release if possible 2016-06-17 13:32:57 +01:00
Pablo Suarez Hernandez
d80e0532ff fix: osarch_mock 2016-06-17 13:32:57 +01:00
Pablo Suarez Hernandez
db00ec756d osarch mock for unit test 2016-06-17 13:32:57 +01:00
Pablo Suarez Hernandez
dabc5cab7e lint fix 2016-06-17 13:32:56 +01:00
Pablo Suarez Hernandez
9ac514724b testing if SUSE os grain is set from /etc/os-release 2016-06-17 13:32:56 +01:00
rallytime
37cfe70724 Add some grains targeting tests 2016-06-16 17:02:46 -06:00
rallytime
f6bfaede21 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/topics/installation/index.rst
  - salt/master.py
  - salt/modules/mac_brew.py
  - salt/modules/pacman.py
  - salt/modules/solarisips.py
  - salt/returners/postgres_local_cache.py
  - salt/states/apache_module.py
  - salt/utils/minions.py
  - tests/unit/acl/client_test.py
2016-06-16 16:10:41 -06:00
rallytime
60561ac6fc Add a test to check for disconnected minion messaging 2016-06-16 14:07:05 -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
Nicole Thomas
f546a00dc9 Merge pull request #34025 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
2016-06-15 15:41:00 -04:00
rallytime
77f44f3087 Merge branch '2015.5' into '2015.8'
Conflicts:
  - salt/modules/aptpkg.py
  - salt/modules/ebuild.py
  - salt/modules/zypper.py
  - salt/states/pkg.py
  - tests/integration/output/output.py
2016-06-14 15:47:35 -06:00
Nicole Thomas
871f7966ce Lint fix for #34000 (#34005) 2016-06-14 11:12:14 -04:00
Mike Place
f758e42172 Fix incorrectly written test (#34000)
This should be using the test suite method of generating opts
2016-06-14 11:10:21 -04:00
Bo Maryniuk
fe300ccf73 Lintfix 2016-06-14 09:39:04 +02:00
Mike Place
9bd2317992 Merge pull request #33951 from jfindlay/gem_tests
modules.gem int tests: more fixes
2016-06-13 17:46:43 -07:00
Mike Place
53baae6eb1 Merge pull request #33984 from jfindlay/disk_capacity
Add docs and tests to disk state
2016-06-13 17:43:38 -07:00
Mike Place
fa5efb6a69 Merge pull request #33985 from rallytime/more-batch-tests
Write some more simple batch command tests
2016-06-13 17:38:05 -07:00
rallytime
3e7ab8c7b3 Write some more simple batch command tests 2016-06-13 16:25:19 -06:00
Bo Maryniuk
96423076b1 Add unit test for file tree 2016-06-14 00:25:08 +02:00
Justin Findlay
6cbe31e6c2 states.disk: rewrite unit tests 2016-06-13 16:13:40 -06:00
Bo Maryniuk
8975036b27 Add get_unmanaged_files test 2016-06-14 00:05:34 +02:00
Justin Findlay
6080846cce acl.ClientACL: add unit tests (#33684) 2016-06-13 16:00:35 -04:00
Justin Findlay
2eb633ccad modules.gem int tests: only check known installed gems 2016-06-13 11:33:25 -06:00
Justin Findlay
9f3e18b037 modules.gem int tests: (un)install a non-core gem 2016-06-13 10:46:56 -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
Nicolas Delaby
f806c7e290 [boto_lambda] handle ommitted Permissions parameter (#33908)
* a bit of pep8

* Don't fail if `Permssions` is None
2016-06-10 13:31:22 -04:00
Mike Place
378dd7ca06 Merge pull request #33888 from jfindlay/random_check
random.org checks
2016-06-10 08:45:07 -07:00
Justin Findlay
82f95429db modules.random_org unit tests: skip if random.org down 2016-06-08 20:46:20 -06:00
rallytime
b8e4706074 Merge branch '2015.5' into '2015.8'
Conflicts:
  - salt/modules/saltutil.py
  - salt/states/archive.py
2016-06-08 14:26:18 -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
01aaf3e2a9 Merge pull request #33771 from twangboy/win_dism
Additional functionality to win_dism.py
2016-06-08 06:58:20 -07: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
Nicolas Delaby
0d40e1c4f3 Add support for edge case when Cmd and Entrypoint can't be blanked 2016-06-08 10:46:24 +02: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
421dc97957 Fix/add unit tests for state 2016-06-07 12:52:01 -06:00
twangboy
8d66fac74c Add missing unit tests 2016-06-07 09:53:22 -06:00
Mike Place
1db559afe9 Merge pull request #33805 from jfindlay/pkg_tests
states.pkg int tests: skip if pkg mgr unavailable
2016-06-07 07:40:46 -07:00
Mike Place
3984b65486 Merge pull request #33808 from jfindlay/gem_tests
fix some problems with the gem module integration tests
2016-06-07 07:40:25 -07:00
Justin Findlay
f13f914755 states.service: add integration tests 2016-06-06 23:11:49 -06:00
Justin Findlay
f7c19a1a58 modules.gem int tests: relax version checks 2016-06-06 21:58:58 -06:00
twangboy
60f856f73d Fix unit tests for module 2016-06-06 18:33:29 -06:00
Justin Findlay
0c069ddc95 states.pkg int tests: skip if pkg mgr unavailable 2016-06-06 17:44:43 -06:00
Justin Findlay
6af47d2ba7 modules.gem int tests: remove pkgs before testing install 2016-06-06 17:32:17 -06:00
Justin Findlay
90aee79c39 states.service.mod_watch: update unit test 2016-06-06 10:54:16 -06:00
Mike Place
7fdfbe9a28 Merge pull request #33691 from jtand/gem_integration_test
Gem integration test
2016-06-06 04:13:23 -07:00
Dan Slimmon
f87bc347fd Fixed ACL user comparison. Resolves #33754. 2016-06-04 15:14:00 +00:00
Mike Place
a5684ed123 Merge pull request #33670 from rallytime/fix-33605
Handle non-ascii package names in state.format_log
2016-06-03 09:16:52 -07: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
Justin Anderson
ff2dae103d ubuntu doesn't install default gems when ruby is installed 2016-06-03 08:54:51 -06: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
Justin
504df9a65a Fixed lint error 2016-06-03 04:28:42 -06:00
Justin Findlay
87e018af2a states.test.configurable_test_state: add unit tests 2016-06-02 17:20:36 -06:00
Justin Anderson
0cb1bfa0d3 Removed extra : 2016-06-02 16:35:40 -06:00
Justin Anderson
ebee8a89af glance.warn_until shouldn't be checked for a doc string 2016-06-02 16:30:36 -06:00
Justin Anderson
86f59b3e80 Made more pythonic 2016-06-02 14:37:05 -06:00
Justin Anderson
2f36f34981 Fixed salt.util import. Added status check to make sure external resource is available 2016-06-02 14:32:08 -06:00
rallytime
59bd51f4c8 Update test to correct iteration 2016-06-02 14:32:21 -04:00
Justin Anderson
400a71ec33 Removed redundancies 2016-06-02 11:16:23 -06:00
Justin Anderson
91db411bea A couple lint fixes 2016-06-02 09:03:10 -06:00
Justin Anderson
c97f3319b9 Add check for gem binary 2016-06-02 08:56:09 -06: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
rallytime
a580d1c6e0 Add unit test for format_log change 2016-06-02 09:26:39 -04:00
twangboy
6c7b21676a Fix lint and tests 2016-06-01 17:10:55 -06:00
Justin Anderson
210aceb402 Refactored tests to not use return messages 2016-06-01 16:57:37 -06:00
Mike Place
c8dc70b96a Merge pull request #33685 from jfindlay/get_url_test
modules.cp.get_url: add test for https://
2016-06-01 15:25:41 -07: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
Justin Anderson
9d437bd45d Removed artifact from testing 2016-06-01 15:32:41 -06:00
Justin Anderson
134e1fa888 Fixed typos, and added destructiveTest decorator 2016-06-01 15:25:18 -06:00
Justin Anderson
37bc3ad8fd Fixed typo, uninstalled to uninstall 2016-06-01 15:16:15 -06:00
Justin Findlay
2b5035fdc0 modules.cp.get_url: add test for https:// 2016-06-01 15:10:12 -06:00
Justin Anderson
5b23b91ac6 Integration test for gem module 2016-06-01 15:09:55 -06:00
rallytime
e68097445c Revert "Track down more unicode instances and add a test"
This reverts commit 9729aed262.

This isn't the right approach here. This fix needs to be more narrow.
2016-06-01 16:44:05 -04:00
rallytime
9729aed262 Track down more unicode instances and add a test 2016-06-01 13:47:29 -04:00
Mike Place
e92d6e214f Merge pull request #33646 from jfindlay/mac_tests
Fix more tmp paths on MacOS
2016-06-01 09:36:33 -07:00
Justin Findlay
c53a727c18 tests.runtests: use globally-determined tempdir
This way, the the test logs will use the same temp dir as the rest of
the test suite.  On MacOS, for example, `$TMPDIR` is set to a path that
is too long for unix sockets on the system, so the `SYS_TEMP_DIR` is set
to `/tmp` to override this.
2016-05-31 13:27:50 -06:00
Justin Findlay
8295b48459 test.integration: use hard /tmp on MacOS
Otherwise, the tests will not work as `$TMPDIR` produces a path that is
too long for unix sockets on the platform.
2016-05-31 13:27:50 -06: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
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
twangboy
79bc7195dc Fix unit tests 2016-05-27 11:33:52 -06: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
Mike Place
d052908729 Merge pull request #33501 from meaksh/zypper-download-check-signature-2015.8
unit tests for rpm.checksum() and zypper.download()
2016-05-26 07:34:27 -07: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
Justin Findlay
0ed3598fc9 modules.mac_brew int tests: add latest_version test 2016-05-25 22:15:12 -06:00
Justin Findlay
8789c2d06d modules.mac_brew int tests: add list_upgrades,info_installed 2016-05-25 22:05:01 -06:00
Justin Findlay
be381e0fc9 modules.mac_brew int tests: move decorators to class
Also remove unneeded system grains code.
2016-05-25 22:05:01 -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
Mike Place
70eb7b66f3 Merge pull request #33487 from jtand/glance_doc_fixes
Add docstring examples to glance.py and nova.py [2015.8]
2016-05-25 09:47:25 -07:00
Pablo Suárez Hernández
6b6febb211 unit tests for rpm.checksum() and zypper.download() 2016-05-25 17:08:16 +01:00
Blaine Chatman
7599b18995 fix jobs.list_jobs failing with search_target 2016-05-24 17:56:45 -07:00
Justin Anderson
ebf1256545 Don't need to check swift.head due to it having no body 2016-05-24 15:26:28 -06:00
Justin Anderson
59e90064e6 modules.swift.head does not have a body. Should not be checked for a docstring right now. 2016-05-24 14:58:32 -06:00
Mihai Dincă
c8b4f338d8 Make --gpg-auto-import-keys a global param when calling zypper (#33432) 2016-05-23 14:15:29 -07:00
Nicole Thomas
0c4e38ced4 Fix the saltutil.wheel function and add integration tests (#33414)
* Fix the saltutil.wheel function and add integration tests

Fixes #32446

* Provide a more useful message when command is run on non-local minion
2016-05-23 14:11:16 -07:00
rallytime
35ad788470 Merge branch '2015.8' into '2016.3'
Conflicts:
  - conf/minion
  - doc/ref/configuration/minion.rst
  - salt/modules/boto_elb.py
  - salt/modules/sudo.py
  - salt/states/boto_elb.py
  - salt/transport/zeromq.py
2016-05-19 16:22:36 -06:00
Nicole Thomas
4fdb097c01 Update job_cache and keep_jobs docs to be more specific to their behavior (#33328)
* Update job_cache and keep_jobs docs to be more specific to their behavior

Also fixed a bug discovered when investigating job_cache/keep_jobs functionality
where the jid directory and files were removed by the cache cleaner, but not the
original jid clash detection directory created in /var/cache/salt/master/jobs/.

Fixes #29286

* Add testcase for the changes in the local_cache.clean_old_jobs func

* Mark tests as destructive

* Put destructive test decorator in correct location
2016-05-19 09:32:32 -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
C. R. Oldham
8387657d9a Prevent salt-cloud from hanging when spinning up new Vultr instances (#33272)
* better support for named images, locations, sizes

* better support for named images, locations, sizes

* Tests for Vultr driver

* Add sleep so test instance will be old enough to delete as part of the test

* Lint.
2016-05-16 13:11:29 -07:00
rallytime
32779b8d71 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/x509.py
2016-05-16 10:47:12 -06:00
Erik Johnson
855bed36c1 Check rendered YAML for invalid keys (#33213)
* Check rendered YAML for invalid keys

PyYAML will for some reason allow improper YAML, specifically double
curly-braces like ``{{ }}``, to be formed into an unhashable dict (that
is, one with a dict as a key). This commit will change the YAML renderer
such that the rendered data is recursively checked for keys that are
dicts, and raises an SaltRenderError if such a key is encountered.

Resolves #33073.

* Fix smtp returner test

This test was using jinja placeholders but was not passing the template
through the jinja renderer. This commit adds the use of the jinja
renderer to this test to fix the failure caused by the addition of
verification of the loaded YAML inthe previous commit.
2016-05-13 09:22:43 -07:00
rallytime
679200aeb2 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/scripts.py
2016-05-12 16:52:27 -06:00
Nicole Thomas
730bec1eef [2015.8] Merge forward from 2015.5 to 2015.8 (#33207)
* Fix file.managed for Windows (#33181)

* Revert back to import string_types

For some reason, there is a problem with the following
code when run from the file.py module:
```
from salt.ext import six
comment = 'This is a string'
isinstance(comment, six.string_types)
```
When run from within the python shell it works fine.

* Add six import

* Fix some lint

* Use correct six import

* Changed it back to explicit import

* Additional comments specific to 2015.5

* Fix file.managed for real

* Move comment to clarify purpose

* update 2015.5.11 release notes (#33197)

* Add pip installed and removed test (#33178)

* Resolve issue with pkg module on Mint Linux (#33205)

Closes #32198
2016-05-12 13:54:47 -07:00
Justin Anderson
a09e1b6335 Add pip installed and removed test (#33178) 2016-05-12 08:31:41 -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
449176f06e Merge branch '2015.5' into '2015.8'
No conflicts.
2016-05-10 11:58:55 -06:00
Justin Anderson
8b1e34fb17 Skipping salt-call --local test 2016-05-10 10:48:18 -06:00
rallytime
92e0c17645 Merge branch '2015.8' into '2016.3'
No conflicts.
2016-05-09 13:55:06 -06:00
rallytime
0fd5e9d157 Merge branch '2015.5' into '2015.8'
Conflits:
  - salt/minion.py
  - tests/integration/states/file.py
2016-05-06 12:04:06 -06:00
Justin Anderson
d4928c5a22 Use saltstack repo in buildpackage.py on CentOS 5 (#33080) 2016-05-06 08:27:31 -07: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
Megan Wilhite
61d126cb98 add test for installing package while using salt-call --local (#33025)
* add test for installing package while using salt-call --local

* fix pylint
2016-05-05 07:17:12 -07:00
Mike Place
e9c94a4141 Skip Unicode test if the system does not have a filesystem encoding set (#33057)
In the case where a user does not have the LANG env set,
Python can't figure out how to encode Unicode during a popen call.

I could not find any combination of tricks, including setting the encoding
or the locale or the environment variable itself in the call to popen that
would mitigate this issue. This may well be a bug in the Python stdlib itself.
2016-05-05 07:06:07 -07:00
Nicole Thomas
111701c8bb [2015.8] Merge forward from 2015.5 to 2015.8 (#33054)
* 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

* Whitespace...
2016-05-05 07:05:55 -07:00
Justin Anderson
1066063a19 File and User test fixes for 2015.8 on Fedora23 (#33056)
* Fix failing user present test

* Fix file_test.test_symlink failure on 2015.8
2016-05-05 07:05:10 -07:00
Justin Anderson
6d3e4e8935 File and User test fixes for 2015.5 on Fedora23 (#33055)
* Fix file_test.test_symlink on 2015.5

* Fix failing user present test
2016-05-05 07:00:59 -07:00
Megan Wilhite
d48b2b8b52 test pillar.items output (#33060) 2016-05-05 06:51:27 -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
Megan Wilhite
f8757631b2 Saltfile with pillar tests (#33045)
* add file.managed with pillar data tests

* do not require git for other tests
2016-05-04 14:37:57 -06:00
Justin Findlay
186352a8b8 fix dimensiondata, gce unit test certs on MacOS (#33020) 2016-05-04 09:09:02 -07:00
Justin Anderson
28ba98c613 Skip some tests related to #32902 (#32995) 2016-05-03 08:55:23 -07: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
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
Megan Wilhite
c57a2b8f3b Fix user present tests (#32895)
* fix user present tests for mac

* add setup and teardown methods

* add destructive and root decorators

* forgot teardown decorators

* fix pylint
2016-04-29 10:40:54 -06:00
Justin Anderson
fa7e32afcc Fixing failures in gce_test and dimensiondata_test (#32921)
* Fixing failures in gce_test and dimensiondata_test

* Fixed lint
2016-04-28 14:15:22 -06: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
Ch3LL
3520d496ba add /Users directory for mac minion in user present test 2016-04-26 15:32:11 -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
Nicole Thomas
02c681311f Merge pull request #32844 from rallytime/merge-2015.8
[2015.8] Merge forward from 2015.5 to 2015.8
2016-04-26 11:38:08 -06:00
Justin Findlay
5a4398a746 netapi.rest_cherrypy: use unsalted PW on MacOS (#32850) 2016-04-26 11:04:25 -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
rallytime
1fc9de1d04 Add 'file.source_list' mock to archive state unit tests 2016-04-26 10:39:43 -06:00
Justin Findlay
aac1ae35c5 fix some shell tests for MacOS (#32852)
* auth.pam int test: use unhashed pw for MacOS

* shell tests: strip whitespace from shell return

Similar to 2f1c0cf.

* modules.mac_user.delete: update example for int test

integration.shell.call.CallTest.test_user_delete_kw_output expects this
exact string to be in the doc for user.delete:
```
salt '*' user.delete name remove=True force=True
```
2016-04-26 09:47:35 -06:00
rallytime
9064d3bbfb Merge branch '2015.5' into '2015.8'
Conflicts:
  - salt/cloud/clouds/vmware.py
  - salt/modules/file.py
  - salt/states/archive.py
2016-04-25 15:45:17 -06:00
Nicole Thomas
f9ffcb697a [2016.3] Merge forward from 2015.8 to 2016.3 (#32784)
* json encode arguments passed to an execution module function call

this fixes problems where you could pass a string to a module function,
which thanks to the yaml decoder which is used when parsing command line
arguments could change its type entirely. for example:

__salt__['test.echo')('{foo: bar}')

the test.echo function just returns the argument it's given. however,
because it's being called through a salt-call process like this:

salt-call --local test.echo {foo: bar}

salt thinks it's yaml and therefore yaml decodes it. the return value
from the test.echo call above is therefore a dict, not a string.

* Prevent crash if pygit2 package is requesting re-compilation of the e… (#32652)

* Prevent crash if pygit2 package is requesting re-compilation of the entire library on production systems (no *devel packages)

* Fix PEP8: move imports to the top of the file

* Move logger up

* Add log error message in case if exception is not an ImportError

* align OS grains from older SLES with current one (#32649)

* Fixing critical bug to remove only the specified Host instead of the entire Host cluster (#32640)

* yumpkg: Ignore epoch in version comparison for explict versions without an epoch (#32563)

* yumpkg: Ignore epoch in version comparison for explict versions without an epoch

Also properly handle comparisions for packages with multiple versions.

Resolves #32229

* Don't attempt downgrade for kernel and its subpackages

Multiple versions are supported since their paths do not conflict.

* Lower log level for pillar cache (#32655)

This shouldn't show up on salt-call runs

* Don't access deprecated Exception.message attribute. (#32556)

* Don't access deprecated Exception.message attribute.

To avoid a deprecation warning message in logs.
There is a new function salt.exceptions.get_error_message(e) instead.

* Fixed module docs test.

* Fix for issue 32523 (#32672)

* Fix routes for redhat < 6

* Handle a couple of arguments better (Azure) (#32683)

* backporting a fix from develop where the use of splay would result in seconds=0 in the schedule.list when there was no seconds specified in the origina schedule

* Handle when beacon not configured and we try to enable/disable them (#32692)

* Handle the situation when the beacon is not configured and we try to disable it

* a couple more missing returns in the enable & disable

* Check dependencies type before appling str operations (#32693)

* Update external auth documentation to list supported matcher. (#32733)

Thanks to #31598, all matchers are supported for eauth configuration.
But we still have no way to use compound matchers in eauth configuration.
Update the documentation to explicitly express this limitation.

* modules.win_dacl: consistent case of dacl constants (#32720)

* Document pillar cache options (#32643)

* Add note about Pillar data cache requirement for Pillar targeting method

* Add `saltutil.refresh_pillar` function to the scheduled Minion jobs

* Minor fixes in docs

* Add note about relations between `pillar_cache` option and Pillar Targeting
to Master config comments with small reformatting

* Document Pillar Cache Options for Salt Master

* Document Minions Targeting with Mine

* Remove `saltutil.refresh_pillar` scheduled persistent job

* Properly handle minion failback failure. (#32749)

* Properly handle minion failback failure.

Initiate minion restart if all masters down on __master_disconnect like
minion does on the initial master connect on start.

* Fixed unit test

* Improve documentation on pygit2 versions (#32779)

This adds an explanation of the python-cffi dep added in pygit2 0.21.0,
and recommends 0.20.3 for LTS distros. It also links to the salt-pack
issue which tracks the progress of adding pygit2 to our Debian and
Ubuntu repositories.

* Pylint fix
2016-04-25 15:26:09 -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
rallytime
ce72851861 Merge branch '2014.7' into '2015.5'
Conflicts:
  - salt/netapi/rest_tornado/__init__.py
  - salt/netapi/rest_tornado/saltnado.py
2016-04-22 10:24:06 -06:00
Seth House
2775edc176 Saltnado /run fix (#32590)
* Revert "Verify auth in saltnado run (#32552)"

This reverts commit b19c5a5ce7.

* Call runner.cmd_async instead to enforce eauth

* Check for both token or user/pass before giving to Salt

* Remove comment as we're now enforcing auth here

* Lint and functionality fix courtesy of Mike P.

* Don't fail the whole request if there's an eauth problem
2016-04-22 10:10:47 -06:00
Dmitry Kuzmenko
1d6d234417 Properly handle minion failback failure. (#32749)
* Properly handle minion failback failure.

Initiate minion restart if all masters down on __master_disconnect like
minion does on the initial master connect on start.

* Fixed unit test
2016-04-22 09:15:55 -06:00
Erik Johnson
67d0c81184 Support remote sources in a source list (#32691)
* Support remote sources in a source list

This commit modifies the source_list check so that remote sources
(http(s), ftp, etc.) are not fetched more than once. To do so, it
adds the use of ``__context__`` in ``cp.cache_file`` and
``file.source_list`` to prevent multiple fetches of a single file in the
same salt run.

* Update tests

Added __context__ to test cases to reflect usage of __context__, and
also added file.source_list to mocked funcs for archive.extracted unit
test.
2016-04-21 08:37:38 -06:00
Anthony Shaw
1183106e75 Fix line endings 2016-04-20 01:32:49 +10:00
Anthony Shaw
d2abe56a20 Added some unit tests for GCE and Dimension Data modules 2016-04-19 08:18:25 +10:00
Justin Anderson
f6861768f4 Skipping boto test on OpenSuse (#32624) 2016-04-18 09:57:51 -06:00
Knut Auvor Grythe
d432e4b990 Add support for unicode in all GECOS fields (#32630)
* Add support for unicode in all GECOS fields

* Stop exposing sdecode from salt.modules.useradd

* Slight rephrase of comment

* Fix lint errors
2016-04-18 08:56:40 -06:00
Shane Lee
97111bdc9b Fix mac_service and mac_system modules (#32587)
* Fix mac_service module

* Add integration tests for new functions

* Start will not enable the service beforehand

* Remove unused variables
2016-04-15 15:49:44 -06:00
Ronald van Zantvoort
c25dffe7a9 Deprecate 'user' and 'group' in state cmd (#32613)
* Remove unused 'group' argument

* Fix unit testing of cmd.mod_run_check without group arg

* Deprecate 'user/group' in cmd.run

* Deprecate 'user'/'group' in cmd.script

* Deprecate 'user' in cmd.wait

* Deprecate 'user'/'group' in cmd.wait_script

* Fix mod_run_check without 'group'

* Push deprecation back one release
2016-04-15 13:30:56 -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
Nicole Thomas
1834bdefe3 Merge pull request #32531 from ticosax/support-no-volumes
[dockerng] Fix support of dockerng.volume_present when no volume is on present.
2016-04-13 08:42:12 -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
Bo Maryniuk
214f01e963 Bugfix: salt-key crashes if tries to generate keys to the directory w/o write access (#32436)
* Raise an exception if keys are tried to be written to the directory that has no write access permissions

* Show an reasonable error message instead of a traceback crash.

* Fix the unit tests
2016-04-13 08:15:37 -06:00
Nicolas Delaby
958b2ec749 Fix support of dockerng.volume_present when no volume is on present.
fixes #32493
2016-04-13 15:47:13 +02: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
rallytime
4f03f2311f Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/salt.py
  - salt/modules/win_pkg.py
  - salt/transport/tcp.py
2016-04-11 14:33:21 -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
Justin Findlay
117d641830 tests.integration: fix 4230c8a 2016-04-08 16:54:00 -06:00
Justin Findlay
fa8d030ab7 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.
2016-04-08 16:00:48 -06:00
Justin Anderson
116c91e293 Changed the target file in file.symlink test (#32443) 2016-04-08 16:00:15 -06:00
Nicole Thomas
8d44aa3f08 Merge pull request #32429 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
2016-04-08 10:56:12 -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
rallytime
9531ea6ef5 Merge branch '2015.5' into '2015.8'
Conflicts:
  - doc/topics/highavailability/index.rst
  - salt/loader.py
  - salt/modules/service.py
  - salt/states/cmd.py
  - tests/unit/states/cmd_test.py
2016-04-07 16:10:32 -06:00
Nicole Thomas
0809126d8e Merge #32293 with test fixes (#32418)
* Fix issue #11497

* Remove check for working directory presence in tests
2016-04-07 14:55:25 -06:00
Justin Anderson
6f98bd50eb Update glusterfs_test to be inline with #32312 2016-04-07 14:38:21 -06:00
Justin Anderson
28ea60f28e Fixes test failure where Fedora 23 has /etc/grub.conf by default 2016-04-07 11:40:12 -06:00
Justin Anderson
65614b7f0f Updated salt.spec bash_completion 2016-04-07 09:16:47 -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
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
Erik Johnson
fbbf5935aa Add missing spm manpage and bash_completion file
Also remove duplicate entries for master/minion conf templates
2016-04-04 16:53:56 -05:00
Erik Johnson
80f7c31d53 buildpackage.py: add salt.bash to SOURCES 2016-04-04 16:53:56 -05:00
Erik Johnson
969519b37e Remove unnecessary cd command 2016-04-04 16:53:56 -05:00
Erik Johnson
ead5c3d6bc Fix missing endif 2016-04-04 15:25:46 -05:00
Mike Place
234a5c365c Merge pull request #32283 from jtand/user_preset_test_fix
Changed /tmp/ to /home/ user.present test
2016-04-04 12:02:08 -06:00