Commit Graph

22 Commits

Author SHA1 Message Date
twangboy
df0958e699
Fix decorator, fix asserts for Windows 2018-01-08 14:53:18 -07:00
Benedikt Werner
449535edbd
Fix masterapi AutoKey test 2017-12-05 18:18:27 +01:00
Benedikt Werner
6900e6ece1
Merge branch 'develop' into accept-minions-from-grains 2017-11-17 19:35:53 +01:00
Nicole Thomas
a5bb896ff1
Merge pull request #44340 from gracinet/42713_mine.get_back_compat
Backwards compat for mine.get on pre-Nitrogen minions
2017-11-13 16:49:51 -05:00
Georges Racinet
5c01c74fbc
Merge branch 'develop' of github.com:saltstack/salt into 42713_mine.get_back_compat
... and fixed conflict
2017-11-08 18:09:04 +01:00
Georges Racinet
728c9b65a5
Unit test for backwards compatibility of mine.get
Could not find calls to RemoteFuncs in unit tests, therefore started a
new one, hope it's in the appropriate place.

The test replaces the caceh by its own (very limited) one. It's quite
possible it could be improved by reusing another one meant for unit tests.
2017-11-08 18:02:29 +01:00
Benedikt Werner
4a63798e84
Fixed linting 2017-11-01 01:01:22 +01:00
Benedikt Werner
7bb85f417f
Merge branch 'develop' into develop 2017-10-31 23:15:03 +01:00
Benedikt Werner
82d6cb72f0
Merge branch 'develop' into accept-minions-from-grains 2017-10-31 13:55:11 +01:00
Benedikt Werner
4c5259da3a
Fix syntax error in unit test 2017-10-30 17:30:21 +01:00
Benedikt Werner
23d3c71a55
Fix unit test 2017-10-30 17:27:28 +01:00
Benedikt Werner
51ce80ce50
Fix style 2017-10-29 14:02:38 +01:00
Benedikt Werner
d06d031227
Moved autosign grains integration tests to its own file 2017-10-29 14:02:37 +01:00
Benedikt Werner
8f2693237c
Fixed and improved autoaccept grains docs 2017-10-29 14:02:36 +01:00
Benedikt Werner
46d0979b94
Fixed autosign grains unit test 2017-10-29 14:02:36 +01:00
Benedikt Werner
244b8c2049
Fix masterapi unit test 2017-10-29 14:02:18 +01:00
Benedikt Werner
2bd1ae6501
Added unit test for check_autosign_grains 2017-10-29 13:54:05 +01:00
Benedikt Werner
11920372b3
Moved patch function outside of class to fix linting 2017-10-20 14:21:45 +02:00
Benedikt Werner
295b5d4834
Added tests and doc 2017-10-20 06:02:08 +02:00
rallytime
74acaad46e
Refactor publish func in master/masterapi to use check_authentication
In a previous PR, the runner and wheel functions in master.py and masterapi.py
were refactored to reduce common code via the salt.auth.check_authentication
method.

The publish function also can utilize the check_authentication function in
master.py and masterapi.py.

Consolidation of this code will help us be able to differentiate between
authorization and authentication errors in the future.
2017-10-17 12:27:13 -04:00
rallytime
846af152b2
Update mocked values in some master/masterapi unit tests
The addition of checking for the `auth_list` in PR #43467 requires
that the mocked return of `get_auth_list` actually contains something
in the list. These mock calls need to be updated so we can check
for the SaltInvocationErrors.
2017-09-25 12:54:32 -04:00
rallytime
b93392dfb7 Return a SaltInvocationError when passing incorrect function pattern
When calling an incorrectly formatted wheel or runner function, we should
be raising a SaltInvocationError with a hint to check function syntax rather
that raising an Eauth authentication error.

This PR does several things:

- Adds a dictionary error return when the function syntax passed through to
`utils.minions.CkMinions.spec_check` does not match the expected `module.function`
syntax
- Handles the return of this new dictionary error (instead of previous `False` return)
wherever the spec_check function is called. This is handled up the stack in
`master.py` and `masterapi.py`.
- Reworks the runner and wheel functions in `master.py` and `masterapi.py` to
help make those functions more DRY (see `salt.auth.check_authentication` function).
- Adds tests for all of these changes (written before the runner and wheel functions
were moved to use the new salt.auth.check_authentication function)  to help prevent
regressions.
- Fixes a couple of places where unit tests exposed potential stacktraces.
- Adjusts one previous unit test concerning the dictionary error change from spec_check
2017-09-05 17:08:50 -04:00