Alexandru Bleotu
75764567c4
Added tests for salt.utils.pbm.get_storage_policies
2017-09-25 18:18:55 -04:00
Alexandru Bleotu
d8e0cbde9a
Added tests for salt.utils.pbm.get_policies_by_id
2017-09-25 18:18:50 -04:00
Alexandru Bleotu
e980407c54
Added tests for salt.utils.pbm.get_capability_definitions
2017-09-25 18:18:45 -04:00
Alexandru Bleotu
68f48d123a
Added tests for salt.utils.pbm.get_placement_solver
2017-09-25 18:18:39 -04:00
Alexandru Bleotu
6b2ddffb4c
Added tests for salt.utils.pbm.get_profile_manager
2017-09-25 18:18:34 -04:00
Alexandru Bleotu
dd54f8ab15
Added tests for salt.utils.vmware.get_new_service_instance_stub
2017-09-25 18:18:27 -04:00
Alexandru Bleotu
3c26d4e3be
Updated all list_differ tests to compare dicts so the key order is not assumed
2017-09-25 13:11:08 -04:00
Alexandru Bleotu
cdb028b794
Added key sorting to have deterministing string repr of RecursiveDictDiffer objects
2017-09-25 13:09:47 -04:00
rallytime
281cbbe048
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/cloud/clouds/libvirt.py
- salt/daemons/masterapi.py
- salt/modules/file.py
- salt/modules/yumpkg.py
- salt/states/archive.py
- salt/states/file.py
- salt/utils/files.py
- salt/utils/minions.py
2017-09-25 09:40:18 -04:00
Alexandru Bleotu
2d2f094810
Merge branch 'develop' into dvs_states-gh
2017-09-25 11:22:45 +01:00
Mike Place
cae79d2020
Merge pull request #43699 from rallytime/merge-develop
...
[develop] Merge forward from 2017.7 to develop
2017-09-24 19:27:17 -06:00
Alexandru Bleotu
847debab7a
Fix failing storage and listdiffer tests
2017-09-22 17:50:09 -04:00
rallytime
03ce4d81b7
Reactor Test: Fix incorrect merge conflict resolution
2017-09-22 15:01:11 -04:00
Alexandru Bleotu
3c7c202216
Fixed assert_has_calls in vmware.utils.dvs tests
2017-09-22 14:35:21 -04:00
Alexandru Bleotu
f811523e80
pylint
2017-09-22 14:35:14 -04:00
Alexandru Bleotu
d4d6ad99c2
Added tests for salt.utils.vmware.remove_dvportgroup
2017-09-22 14:31:48 -04:00
Alexandru Bleotu
d7474f8d30
Added tests for salt.utils.vmware.update_dvportgroup
2017-09-22 14:31:46 -04:00
Alexandru Bleotu
8a84f27adf
Added tests for salt.utils.vmware.create_dvportgroup
2017-09-22 14:31:41 -04:00
Alexandru Bleotu
b8bc8fd581
Added tests for salt.utils.vmware.get_uplink_dvportgroup
2017-09-22 14:31:34 -04:00
Alexandru Bleotu
82f6ae3688
Added tests for salt.utils.vmware.get_dvportgroups
2017-09-22 14:31:29 -04:00
Alexandru Bleotu
aa247b43b8
Added tests for salt.utils.vmware.set_dvs_network_resource_management_enabled
2017-09-22 14:31:24 -04:00
Alexandru Bleotu
f211874462
Added tests for salt.utils.vmware.update_dvs
2017-09-22 14:31:19 -04:00
Alexandru Bleotu
d31d98c2d3
Added tests for salt.utils.vmware.create_dvs
2017-09-22 14:31:14 -04:00
Alexandru Bleotu
4f09bf5e88
Added tests for salt.utils.vmware.get_network_folder
2017-09-22 14:31:08 -04:00
Alexandru Bleotu
3584a91692
Added tests for salt.utils.vmware.get_dvss
2017-09-22 14:31:03 -04:00
Alexandru Bleotu
173a697be2
Added comments and imports for dvs functions in salt.utils.vmware
2017-09-22 14:31:01 -04:00
Mike Place
75dd97ee50
Merge pull request #43645 from alexbleotu/cluster_states-gh
...
VMware cluster states + dependencies
2017-09-22 11:46:25 -06:00
rallytime
cbae45bec4
Lint: Remove extra line at end of file
2017-09-22 10:33:10 -04:00
rallytime
e0ae50e489
Merge branch '2017.7' into 'develop'
...
Conflicts:
- pkg/salt.bash
- salt/client/mixins.py
- salt/minion.py
- salt/modules/aptpkg.py
- salt/modules/boto_vpc.py
- salt/modules/win_pkg.py
- salt/utils/reactor.py
- tests/unit/utils/test_reactor.py
2017-09-22 10:24:04 -04:00
rallytime
fca4e5563a
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- salt/modules/win_pkg.py
- tests/unit/utils/test_parsers.py
2017-09-22 09:40:03 -04:00
Mike Place
e6dc4d64df
Merge pull request #43314 from twangboy/win_fix_unit.utils.test_verify
...
Fix `unit.utils.test_verify` for Windows
2017-09-21 16:26:12 -06:00
Nicole Thomas
f66eb1c5ad
Merge pull request #43588 from gtmanfred/do
...
digitalocean should be one word.
2017-09-21 09:25:38 -04:00
Daniel Wallace
2f3be5785b
there were more
2017-09-20 15:55:37 -06:00
Alexandru Bleotu
23f58c0ff3
Even more pylint
2017-09-20 17:07:17 -04:00
Alexandru Bleotu
a41b5072da
more pylint
2017-09-20 13:40:36 -04:00
Daniel Wallace
f54ddae6bb
fix do test where space was seperated by a newline
2017-09-20 09:57:57 -06:00
Jochen Breuer
96f39a420b
Fixed linting
...
Fix for "String format call with un-indexed curly braces".
2017-09-20 16:35:01 +02:00
Alexandru Bleotu
8cdaf01642
pylint
2017-09-20 09:40:22 -04:00
Alexandru Bleotu
4f4db431fa
Fixed tests for the ignore_unset_values change
2017-09-20 09:40:20 -04:00
Jochen Breuer
08fba98735
Fixed several issues with the test
...
* Removed redundant import.
* No longer inheriting from LogSettingsParserTests.
* Replaced test class description with somethin meaninful.
* Fixed identation.
I've also moved the class to the bottom, since all the classes inheriting
from LogSettingsParserTests are in the block above.
2017-09-20 15:37:24 +02:00
Jochen Breuer
3a089e450f
Added tests for pid-file deletion in DaemonMixIn
...
This is a follow up on this PR:
https://github.com/saltstack/salt/pull/43366
Since we can get an OSError durin PIDfile deletion with non-root users, it
would make sense to also test for this. So here are the two test cases.
One with an OSError and the other one without.
2017-09-20 14:34:30 +02:00
Alexandru Bleotu
14deb25379
Added tests for salt.utils.vmware.assign_license
2017-09-20 06:28:51 -04:00
Alexandru Bleotu
e0ae5ecd83
Added tests for salt.utils.vmware.get_assigned_licenses
2017-09-20 06:28:47 -04:00
Alexandru Bleotu
ca33adcee7
Added tests for salt.utils.vmware.add_license
2017-09-20 06:28:44 -04:00
Alexandru Bleotu
e660af495b
Added tests for salt.utils.vmware.get_licenses
2017-09-20 06:28:40 -04:00
Alexandru Bleotu
e844dbceeb
Added tests for salt.utils.vmware.get_license_assignment_manager
2017-09-20 06:28:37 -04:00
Alexandru Bleotu
9f566fbe9c
Added tests for salt.utils.vmware.get_license_manager
2017-09-20 06:28:33 -04:00
Alexandru Bleotu
643f38c98c
Added tests for salt.utils.vmware.rename_datastore
2017-09-20 06:28:21 -04:00
Alexandru Bleotu
51e881e5cf
Added tests for salt.utils.vmware.get_datastores
2017-09-20 06:28:18 -04:00
Alexandru Bleotu
457246a871
Added tests for salt.utils.vmware.get_storage_system
2017-09-20 06:28:14 -04:00
Alexandru Bleotu
f042334584
Added tests for list_diff
2017-09-20 06:28:03 -04:00
Alexandru Bleotu
81a02f49e8
Added tests for RecursiveDictDiffer
2017-09-20 06:28:00 -04:00
Alexandru Bleotu
0db8cbaa25
Added tests for utils.vsan._wait_for_tasks
2017-09-20 06:24:16 -04:00
Alexandru Bleotu
6a86104ec8
Added tests for salt.utils.vsan.reconfigure_cluster_vsan
2017-09-20 06:24:11 -04:00
Daniel Wallace
3bae894306
digitalocean should be one word.
...
Everything on their webpage is a reference to DigitalOcean
2017-09-19 12:47:16 -06:00
Alexandru Bleotu
55e0092519
Merge branch 'develop' into list_cluster-gh
2017-09-16 18:00:18 +01:00
Nicole Thomas
9a66d5cebc
Merge pull request #43495 from rallytime/move_arg_utils
...
Move 2 arg-related utility functions into salt.utils.args.py
2017-09-15 17:29:10 -04:00
Alexandru Bleotu
d9b5424aab
Merge branch 'develop' into list_cluster-gh
2017-09-15 20:04:33 +01:00
Alexandru Bleotu
4421744882
pylint on own code
2017-09-14 16:22:31 -04:00
Erik Johnson
792cc0eb54
Merge pull request #43203 from rallytime/fix-21969
...
Return a SaltInvocationError when passing incorrect function pattern for wheel/runner functions.
2017-09-14 12:17:48 -05:00
Alexandru Bleotu
d9d78fa35c
Added missing decorators in utils.vmware tests
2017-09-14 12:47:55 -04:00
Alexandru Bleotu
caf9a0578b
Added tests for utils.vmware.get_service_info
2017-09-14 12:47:53 -04:00
Alexandru Bleotu
2c3b4434f8
Added tests for utils.vsan.get_cluster_vsan_info
2017-09-14 12:47:48 -04:00
Alexandru Bleotu
e811eb9c85
Added tests for utils.vsan.get_vsan_cluster_config_system
2017-09-14 12:47:44 -04:00
Alexandru Bleotu
a2f84e6f39
Added tests for utils.vsan.vsan_supported
2017-09-14 12:47:41 -04:00
rallytime
acb98bbce2
Move salt.utils.argspec_report to salt.utils.args.py
2017-09-13 18:12:52 -04:00
rallytime
9df868930a
Move salt.utils.arg_lookup to salt.utils.args.py
2017-09-13 17:37:49 -04:00
Erik Johnson
4243a2211d
Rewrite the reactor unit tests
...
These have been skipped for a while now because they didn't work
correctly. The old tests have been scrapped in favor of new ones that
test both the old and new config schema.
2017-09-13 10:35:23 -05:00
Erik Johnson
575ce9eb73
Fix unicode handling on PR 43378
...
The strings passed to exceptions should not be unicode types, as this
can cause problems elsewhere when exception class instances are
referenced.
2017-09-12 16:37:15 -05:00
Nicole Thomas
1016f585f5
Merge pull request #43378 from terminalmage/git-configparser
...
Add a GitConfigParser class for manipulating git config files
2017-09-12 17:10:43 -04:00
Mike Place
68d2558988
Merge pull request #43096 from lyft/add-util-func-for-state-return-merging
...
Add utils function to merge state returns
2017-09-12 11:02:14 -06:00
Erik Johnson
626129f5a3
Import all of configparser into module for easier access to error classes
2017-09-12 11:37:13 -05:00
Erik Johnson
507c1b871e
Add a GitConfigParser class for manipulating git config files
...
This class is designed to be used for (among other things) gitfs and git_pillar, to enforce config settings which reside in a git config file without resorting to using the git CLI.
2017-09-12 11:37:13 -05:00
Mike Place
da16b6670a
Merge pull request #42752 from skizunov/develop4
...
Add config option to ensure jid is unique
2017-09-11 13:38:30 -06:00
twangboy
c0dc3f73ef
Use sys.platform instead of salt.utils to detect Windows
2017-09-11 12:22:06 -06:00
twangboy
e496d28cbf
Fix unit.utils.test_verify
for Windows
...
Use Windows api to get and set the maxstdio
Change messages to work with Windows
2017-09-11 12:22:06 -06:00
Sergey Kizunov
3c58717c58
Add config option to ensure jid is unique
...
Having a jid that is occasionally not unique (eg two processes creating
jobs at about the same time) causes problems in my usage due to
job tracking assuming unique jids. Add a config option called `unique_jid`
that will enforce unique jids, but will change the jid format by
appending an underscore and the process id.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2017-09-07 13:25:35 -05:00
Aneesh Agrawal
60d80e7cda
Add utils function to merge state returns
...
This makes it possible to merge the state return
for a subresource into a main state return.
This is useful for configuring e.g. alarms to go along with a resource.
2017-09-06 18:14:04 +00:00
rallytime
5701d54516
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/state.py
- salt/utils/gitfs.py
2017-09-06 09:39:27 -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
rallytime
8127bca9ed
Use __utils__ where possible for moved state utils
...
And update all references to new state names in salt.utils.state.py
2017-09-01 16:09:59 -04:00
rallytime
4a86f23bf1
Move state-related utils to salt.utils.state.py
...
Moves the following functions from `salt.utils` to `salt.utils.state`:
- gen_state_tag
- search_onfail_requisites
- check_onfail_requisites
- check_state_result
Original functions have a deprecation warning added and all references
in Salt code were updated to use the new function path, including moving
some unit tests.
2017-09-01 16:09:59 -04:00
Mike Place
0e262b8c0d
Merge pull request #43253 from rallytime/utils-color-moves
...
Move get_colors and get_color_theme to salt.utils.color.py
2017-09-01 12:44:40 -06:00
rallytime
26f52bd2b8
Move get_colors and get_color_theme to salt.utils.color.py
...
Moves the `get_colors` and `get_color_theme` out of `salt.utils.py`
and into a new file named `salt.utils.color.py`.
This PR moves the original functions, adds a deprecation warning to
the old function paths, and updates any references to the functions
in Salt code to the new location. This includes moving a test as well.
2017-08-29 17:33:01 -04:00
rallytime
26410c662f
Update some salt.utils.x paths for moved util functions
...
Through merge forwards, some of the old-style paths have made their
way into develop. This PR corrects some of these instances on the more
popular functions.
2017-08-29 16:24:47 -04:00
Erik Johnson
53bd3a3e23
Improve inheritance in salt.utils.gitfs
...
This makes the following changes:
1. Renames the valid_providers param in GitBase to git_providers,
allowing for a dictionary mapping provider names to their associated
classes. This allows for alternate providers to be used with a
GitBase subclass.
2. Renames the get_provider function to verify_provider to reduce
confusion with git_providers.
3. Uses super() to run a parent class' dunder init instead of invoking
the parent class directly.
2017-08-28 21:49:42 -05:00
rallytime
3d0d9110ac
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/pillar/git_pillar.py
- salt/utils/files.py
- salt/utils/process.py
- tests/unit/utils/test_which.py
2017-08-24 15:33:15 -04:00
Mike Place
03f652159f
Merge pull request #43123 from twangboy/win_fix_test_which
...
Fix `unit.utils.test_which` for Windows
2017-08-23 10:01:38 -06:00
rallytime
0eafc59f33
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/modules/win_groupadd.py
- salt/modules/yumpkg.py
- salt/state.py
- salt/utils/url.py
2017-08-23 10:07:01 -04:00
Nicole Thomas
0467a0e3bf
Merge pull request #43038 from twangboy/win_unit_utils_test_url
...
Fix `unit.utils.test_url` for Windows
2017-08-23 09:35:24 -04:00
twangboy
ed97cff5f6
Fix unit.utils.test_which
for Windows
...
This test wasn't really written with Windows in mind. Uses PATHEXT that
actually resembles a Windows environment. The test value has the correct
path seperator for Windows.
2017-08-22 16:59:22 -06:00
Nicole Thomas
177a4c366a
Merge pull request #42729 from DSRCorporation/features/19732_extended_ext_auth
...
Allow `external_auth` limit funs/args for runner/wheel modules.
2017-08-22 14:19:06 -04:00
rallytime
67cdfd28ad
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/cli/cp.py
- salt/modules/testinframod.py
- salt/states/jenkins.py
- tests/unit/utils/test_find.py
2017-08-22 09:07:26 -04:00
Dmitry Kuzmenko
7ec398eb72
Allow external_auth
limit funs/args for runner/wheel modules.
...
Example:
external_auth:
pam:
thatch:
- '@runner':
- 'mod.fun':
args: ['a', 'b']
kwargs:
aa: bb
2017-08-22 12:17:09 +03:00
Mike Place
19fc644c9b
Merge pull request #43024 from twangboy/win_unit_utils_test_find
...
Fix `unit.utils.test_find` for Windows
2017-08-21 16:38:09 -06:00
rallytime
84829a6f8c
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- salt/modules/jenkins.py
- salt/states/jenkins.py
2017-08-18 09:13:54 -04:00
twangboy
fbe54c9a33
Remove unused import six (lint)
2017-08-17 15:54:38 -06:00
twangboy
7f5ee55f57
Fix unit.utils.test_url
for Windows
...
Detect escaped urls in Windows
Unescape urls in Windows
Fix tests to deal with sanitized Windows paths
2017-08-17 14:20:25 -06:00
twangboy
b04d1a2f18
Fix unit.utils.test_find
for Windows
...
Fix skipIf statements
Use sys.maxsize instead of sys.maxint
2017-08-17 11:55:00 -06:00
Erik Johnson
4089b7b1bc
Use socket.AF_INET6 to get the correct value instead of doing an OS check
...
This builds on #43014 with a more future-proof solution.
2017-08-17 12:12:27 -05:00
Ch3LL
b8eee4401e
Change AF_INET6 family for mac in test_host_to_ips
2017-08-17 10:55:53 -04:00
rallytime
93c11d827a
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/engines/slack.py
- salt/minion.py
2017-08-17 09:30:50 -04:00
Erik Johnson
2b76029ded
Move 4 functions from salt.utils to salt.utils.versions
...
This moves the following functions from salt.utils to salt.utils.versions:
- warn_until
- kwargs_warn_until
- compare_versions (as salt.utils.versions.compare)
- version_cmp
2017-08-15 12:53:57 -05:00
Nicole Thomas
47ff9d5627
Merge pull request #42812 from terminalmage/yaml-loader-tests
...
Update custom YAML loader tests to properly test unicode literals
2017-08-15 13:50:22 -04:00
Erik Johnson
9d8486a894
Add test for custom YAML loader with unicode literal strings
2017-08-15 11:06:20 -05:00
Erik Johnson
a0118bcece
Remove bytestrings and use textwrap.dedent for readability
...
PyYAML works with and without bytestrings on PY3, and Python 3 can read
all of the test data as regular strings, so bytestrings are unnecessary
here.
This also adds use of textwrap.dedent to make the YAML easier to read,
so it can be indented away from the far left side of the line.
2017-08-15 11:05:48 -05:00
rallytime
78e744bda4
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/client/mixins.py
- salt/fileclient.py
- salt/modules/status.py
- tests/integration/states/test_npm.py
2017-08-14 14:21:17 -04:00
Daniel Wallace
c1f673eca4
use older name if _create_unverified_context is unvailable
2017-08-10 14:43:33 -06:00
rallytime
5d8d6225b5
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/modules/augeas_cfg.py
- salt/netapi/rest_cherrypy/app.py
- salt/runners/manage.py
- salt/states/boto_cfn.py
- salt/utils/cloud.py
- tests/integration/states/test_pkg.py
2017-08-10 14:47:14 -04:00
Erik Johnson
3184168365
Use explicit unicode strings + break up salt.utils
...
This PR is part of what will be an ongoing effort to use explicit
unicode strings in Salt. Because Python 3 does not suport Python 2's raw
unicode string syntax (i.e. `ur'\d+'`), we must use
`salt.utils.locales.sdecode()` to ensure that the raw string is unicode.
However, because of how `salt/utils/__init__.py` has evolved into the
hulking monstrosity it is today, this means importing a large module in
places where it is not needed, which could negatively impact
performance. For this reason, this PR also breaks out some of the
functions from `salt/utils/__init__.py` into new/existing modules under
`salt/utils/`. The long term goal will be that the modules within this
directory do not depend on importing `salt.utils`.
A summary of the changes in this PR is as follows:
* Moves the following functions from `salt.utils` to new locations
(including a deprecation warning if invoked from `salt.utils`):
`to_bytes`, `to_str`, `to_unicode`, `str_to_num`, `is_quoted`,
`dequote`, `is_hex`, `is_bin_str`, `rand_string`,
`contains_whitespace`, `clean_kwargs`, `invalid_kwargs`, `which`,
`which_bin`, `path_join`, `shlex_split`, `rand_str`, `is_windows`,
`is_proxy`, `is_linux`, `is_darwin`, `is_sunos`, `is_smartos`,
`is_smartos_globalzone`, `is_smartos_zone`, `is_freebsd`, `is_netbsd`,
`is_openbsd`, `is_aix`
* Moves the functions already deprecated by @rallytime to the bottom of
`salt/utils/__init__.py` for better organization, so we can keep the
deprecated ones separate from the ones yet to be deprecated as we
continue to break up `salt.utils`
* Updates `salt/*.py` and all files under `salt/client/` to use explicit
unicode string literals.
* Gets rid of implicit imports of `salt.utils` (e.g. `from salt.utils
import foo` becomes `import salt.utils.foo as foo`).
* Renames the `test.rand_str` function to `test.random_hash` to more
accurately reflect what it does
* Modifies `salt.utils.stringutils.random()` (née `salt.utils.rand_string()`)
such that it returns a string matching the passed size. Previously
this function would get `size` bytes from `os.urandom()`,
base64-encode it, and return the result, which would in most cases not
be equal to the passed size.
2017-08-08 13:33:43 -05:00
Erik Johnson
665de2d1f9
Fix domainname parameter input translation
...
Resolves #42538
2017-08-07 09:51:14 -05:00
rallytime
f20f3742cb
Merge branch '2017.7' into 'develop'
...
Conflicts:
- tests/unit/test_crypt.py
2017-08-07 10:43:06 -04:00
garethgreenaway
25094ad9b1
Merge pull request #42602 from garethgreenaway/42514_2017_7_superseded_deprecated_from_pillar
...
Use superseded and deprecated configuration from pillar
2017-07-31 11:53:06 -07:00
Gareth J. Greenaway
74bae13939
Small update to something I missed in the first commit. Updating tests to also test for pillar values.
2017-07-27 13:19:48 -07:00
Alexandru Bleotu
2218905cb7
Merge branch 'develop' into vmware_logs_and_no_permission_exc-gh
2017-07-25 23:38:01 +01:00
Mike Place
62abac6fbc
Merge pull request #42396 from rallytime/parse_docstring_util
...
Move parse_docstring from salt.utils to salt.utils.doc.py
2017-07-25 16:04:00 -05:00
Alexandru Bleotu
b2a2791534
Merge branch 'develop' into vmware_logs_and_no_permission_exc-gh
2017-07-24 20:30:58 +01:00
Erik Johnson
2fb986f5ca
Merge pull request #42367 from rallytime/files-util
...
Move file-related utilities out of init file and into salt.utils.files.py
2017-07-19 16:55:52 -05:00
rallytime
60d80fc06c
Move parse_docstring from salt.utils to salt.utils.doc.py
...
- Moves function to new location in salt.utils.doc.py
- Adds deprecation warning to salt.utils.parse_docstring
- Moves related unit test in test_utils.py to new test_doc.py file
2017-07-19 12:06:55 -06:00
rallytime
0f5dd79aa0
Lint fixes
2017-07-18 12:46:15 -06:00
rallytime
ccf790a83f
Update all references for moved functions to use "files" util
...
- fopen
- flopen
- fpopen
- safe_rm
- is_empty
- is_fcntl_available
2017-07-18 10:31:01 -06:00
rallytime
f59ecb7ffe
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/executors/sudo.py
2017-07-18 08:57:55 -06:00
Alexandru Bleotu
e783d6edd5
pylint
2017-07-18 06:44:34 -04:00
Alexandru Bleotu
c256eaef82
Renamed vmware_test folder to vmware to follow new naming standard
2017-07-17 13:12:34 -04:00
Alexandru Bleotu
62edc82d34
Added tests for catching vim.fault.NoPermission for all tested function in utils.vmware
2017-07-17 13:12:32 -04:00
Alexandru Bleotu
ec5532cdcf
Added no_permission tests to vmware functions
2017-07-17 13:12:30 -04:00
rallytime
8b35b367b3
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- salt/modules/win_pkg.py
- salt/states/dockerng.py
2017-07-05 09:14:30 -06:00
Erik Johnson
26f848e111
Mock socket.getaddrinfo in unit.utils.network_test.NetworkTestCase.test_host_to_ips
...
This will keep future IP address changes from impacting this test. It
also tests a host which returns an IPv6 address, and a host which cannot
be resolved.
2017-06-29 14:49:39 -05:00
Erik Johnson
9a50e7c1ca
Merge remote-tracking branch 'upstream/2017.7' into merge-develop
2017-06-28 22:10:50 -05:00
Erik Johnson
f13ddeb394
Merge remote-tracking branch 'upstream/2016.11' into merge-2017.7
...
Conflicts:
- doc/_themes/saltstack2/layout.html
- salt/auth/__init__.py
- salt/utils/schedule.py
2017-06-28 20:27:32 -05:00
Erik Johnson
fb6a93314f
Update IP address for unit.utils.network_test.NetworkTestCase.test_host_to_ips
...
The IP for saltstack.com changed, so this test needs to be updated.
2017-06-28 19:42:52 -05:00
rallytime
e512a29f08
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/modules/state.py
- salt/modules/yumpkg.py
- salt/modules/zypper.py
- salt/states/pkg.py
- salt/version.py
- tests/unit/config/test_config.py
- tests/unit/modules/test_zypper.py
2017-06-28 11:31:53 -06:00
Dmitry Kuzmenko
596ab0421d
Py3: pass Exception to side effect friendly for both mock<1.1 and mock>=1.1
2017-06-21 12:46:46 +03:00
Dmitry Kuzmenko
c25ebe3a6e
Py3: fix test for Py34. Fixed the etcd util error case handling.
2017-06-20 21:47:51 +03:00
Ed Pelc
a536111b83
add tests for single docker log_config option fix
2017-06-16 14:57:17 -06:00
Ed Pelc
7480bab798
add tests for single docker log_config option fix
2017-06-16 13:05:01 -04:00
rallytime
7fef4cf38f
Merge branch '2017.7' into 'develop'
...
Conflicts:
- salt/engines/slack.py
2017-06-15 10:57:27 -06:00
rallytime
16a2747d7d
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- pkg/windows/buildenv/salt.bat
- salt/modules/pillar.py
- salt/utils/openstack/nova.py
- tests/unit/cloud/clouds/test_dimensiondata.py
- tests/unit/cloud/clouds/test_gce.py
2017-06-14 13:31:42 -06:00
Loren Gordon
6e35673fe3
Preserves order when removing duplicates
2017-06-13 17:45:08 -04:00
Loren Gordon
18eda7084c
Updates list merge tests to check for sorted, unique lists
2017-06-13 17:45:08 -04:00
rallytime
57166fd892
Merge branch 'nitrogen' into 'develop'
...
No conflicts.
2017-05-24 15:30:44 -06:00
rallytime
616ac7289b
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- salt/config/__init__.py
- salt/modules/elasticsearch.py
- tests/integration/__init__.py
2017-05-23 10:36:41 -06:00
rallytime
718b0adc70
Merge branch 'nitrogen' into 'develop'
...
Conflicts:
- salt/modules/zypper.py
- tests/unit/utils/test_network.py
2017-05-23 09:05:13 -06:00
Mike Place
1ba95684a9
Merge pull request #41113 from cro/proxy_auto_test2
...
Rescue proxy_auto_tests PR from git rebase hell
2017-05-22 12:05:07 -05:00
rallytime
c6c1d30c48
Merge branch '2016.11' into 'nitrogen'
...
Conflicts:
- salt/modules/yumpkg.py
- salt/spm/__init__.py
- tests/unit/modules/test_zypper.py
- tests/unit/utils/test_network.py
2017-05-20 17:07:34 -06:00
Bo Maryniuk
5f01e748e0
Fix Lint
2017-05-17 08:42:38 +02:00
Bo Maryniuk
2a60eae826
Add unit test for hostname can be started from 127
2017-05-16 16:21:31 +02:00
Bo Maryniuk
5168ef8959
Add unit test for hostname can be started from 127
2017-05-16 16:18:14 +02:00
Bo Maryniuk
1b28c67047
Add unit test for utilising host name as "127"
2017-05-16 12:17:13 +02:00
Bo Maryniuk
d9c8324a6b
Unit test for accepting hosts names as 127
2017-05-16 12:07:32 +02:00
C. R. Oldham
19db038b99
Fix test--use proxy_config instead of minion_config
2017-05-12 14:01:54 -06:00
rallytime
f875ee3309
Merge branch 'nitrogen' into 'develop'
...
Conflicts:
- tests/integration/runners/test_runner_returns.py
2017-04-28 09:26:26 -06:00
Pedro Algarvio
d65742c066
Delete attributes
2017-04-28 13:36:44 +01:00
Pedro Algarvio
abe608d739
Drop @patch
usage
2017-04-28 13:36:42 +01:00
Pedro Algarvio
3bf84e2a4e
Rename classes in order not to be collected up by pytest
2017-04-28 13:33:34 +01:00
Pedro Algarvio
1d8f02f635
Drop @patch
usage. Py3 Compat.
2017-04-28 13:33:32 +01:00
Nicole Thomas
b735b8f574
Merge pull request #40603 from kiorky/fix40602
...
Fix #40602 : onfail_stop: test loop order is broken
2017-04-12 10:06:55 -06:00
Mike Place
5c2be60d7b
Space for lint
2017-04-11 16:46:38 -06:00
Ronald van Zantvoort
24adf57814
DNS2: pylint fixes
2017-04-11 14:52:16 +02:00
Ronald van Zantvoort
4e573a93e6
DNS2: Add some docs
2017-04-11 13:17:51 +02:00
Ronald van Zantvoort
fba643a64f
DNS2: Add nslookup tests
2017-04-11 13:11:35 +02:00
Ronald van Zantvoort
8e37eab1cb
DNS2: Raise ValueError on wrong DNS type plus testing
2017-04-11 11:03:19 +02:00
Ronald van Zantvoort
f9d3fbb379
DNS2: Re-add DNSSEC test, add tests for host
2017-04-11 09:02:53 +02:00
Mathieu Le Marec - Pasquet
80d9482248
Fix #40602 : onfail_stop: test loop order is broken
2017-04-10 10:22:03 +02:00
Ronald van Zantvoort
9dff676f8f
DNS2: bugfixes, cleanup, drill tests
2017-04-06 10:13:01 +02:00
Ronald van Zantvoort
e3239d90cf
DNS2: dig lookup testing
2017-04-06 10:13:00 +02:00
Ronald van Zantvoort
a30dd2ed0c
DNS2: Add tests for getaddrinfo()
2017-04-06 10:13:00 +02:00
Ronald van Zantvoort
5a77b2520f
DNS2: Add first batch of unit tests
2017-04-06 10:13:00 +02:00
Nicole Thomas
4d7871e4d7
Merge pull request #40494 from rallytime/merge-develop
...
[develop] Merge forward from 2016.11 to develop
2017-04-05 14:15:05 -06:00
Pedro Algarvio
7b713d9256
Use the more portable helper skip_if_not_root
.
2017-04-04 18:58:21 +01:00
Pedro Algarvio
dcf0a55daf
Use the test run temporary path, not the system temporary path
2017-04-04 18:58:21 +01:00
Pedro Algarvio
61003bca0a
Take care of resource leakage on tests
2017-04-04 18:58:20 +01:00
Pedro Algarvio
2ee6d5d589
Import from the original modules not tests.integration
2017-04-04 18:58:19 +01:00
Pedro Algarvio
8031ac0209
Move mixins to tests.support.mixins.
...
The adapted config mixin get config methods are not static methods
2017-04-04 17:29:34 +01:00
Mike Place
6056ee302a
Merge pull request #40339 from s0undt3ch/features/py3-pt2
...
[WIP] Move unit tests which were in integration tests - More py3 and mocking fixes
2017-04-04 10:21:46 -06:00
rallytime
24e812add6
Merge branch '2016.11' into 'develop'
...
Conflicts:
- salt/cache/__init__.py
- salt/grains/core.py
- salt/utils/gitfs.py
- tests/unit/cache/test_localfs.py
- tests/unit/modules/test_ssh.py
2017-04-03 10:17:11 -06:00
Pedro Algarvio
9fd126c904
Use a temporary configuration instead
2017-04-01 18:58:03 +01:00
Pedro Algarvio
4f068f5217
Misplaced test. Use tests.support.unit instead.
2017-04-01 14:23:00 +01:00
Pedro Algarvio
a15aa32404
Proper mocking.
2017-04-01 14:22:59 +01:00
Pedro Algarvio
9a11538b54
Stop using deprecated TestCase methods
2017-04-01 14:22:57 +01:00
Pedro Algarvio
f9b58aa2e2
This is not an integration test. Skip test.
...
Skipping tests since I have no clue what is supposed to be tested here
with that `raise Exception(ret)` at the end.
2017-04-01 14:22:53 +01:00
Pedro Algarvio
cde0af757e
Update tests to the new sorting
2017-04-01 14:22:53 +01:00
Pedro Algarvio
dc7169f8bd
Rename decorators in order not to be picked up by pytest as test cases
2017-04-01 14:22:53 +01:00
rallytime
0da4c46b68
Merge branch '2016.3' into '2016.11'
...
Conflicts:
- salt/utils/__init__.py
- salt/utils/gitfs.py
- tests/unit/modules/ssh_test.py
2017-03-31 09:59:59 -06:00
Mathieu Le Marec - Pasquet
0c7317e6ea
Add a flag to mark onfail states as handlable
2017-03-31 00:22:59 +02:00
Mathieu Le Marec - Pasquet
fa2f9cf7bd
Make returncode friendly to onfail requisites
...
Ensure that correctly handled states execution (via onfail)
will return a 0 code if onfail requisites suceed.
2017-03-31 00:22:51 +02:00
Nitin Madhok
dd62310941
Adding unit tests for vmware_test
2017-03-30 00:54:57 -04:00
Nitin Madhok
034ef30f7c
Remove old vmware unit tests
2017-03-30 00:53:09 -04:00
Erik Johnson
cafa08d8e0
Add ability for salt.utils.path_join to force the use of posixpath
...
Also remove unused and unnecessary behavior from this function when the
first path component is of single length. An empty first parameter to
this function will normalze to "." and result in an incorrectly-joined
result.
2017-03-28 14:18:29 -05:00
Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage
2017-03-28 19:03:59 +01:00
Pedro Algarvio
278275cf37
Fix StringVersion and LooseVersion. Add unit tests.
2017-03-28 19:00:52 +01:00
Pedro Algarvio
1f7a0aa65b
Proper mocking
2017-03-28 19:00:51 +01:00
rallytime
62b31d7620
Pylint fixes
2017-03-23 10:00:20 -06:00
rallytime
235a768872
Merge branch '2016.11' into 'develop'
...
Conflicts:
- salt/returners/influxdb_return.py
- salt/states/dockerng.py
- salt/utils/schedule.py
- tests/unit/modules/test_docker.py
- tests/unit/states/dockerng_test.py
- tests/unit/utils/test_schedule.py
2017-03-22 17:44:08 -06:00
Erik Johnson
5ad476936d
Overhaul Docker support
...
This does the following:
- Splits states for container/volume/image/network management into four
separate state modules.
- Preserves backward compatibility by making ``docker.image_present``
invoke ``docker_image.present``, etc.
- Changes how Salt detects that a container needs to be replaced.
Instead of comparing each passed argument to the named container's
configuration, it creates a temporary container, and compares that
container to the named container. If the two differ, then the older
container is removed, and the new one is renamed and started, becoming
the named container.
- Removes the unit tests for container management and replaces them with
integration tests.
- Adds unit tests for the new salt.utils.docker
2017-03-21 16:53:19 -05:00
Bo Maryniuk
9e5bf58e42
Fix test: underscore alias is found
2017-03-21 10:49:18 +01:00
Bo Maryniuk
bceb6d0f56
Add with_deprecated test misconfiguration
2017-03-21 10:48:54 +01:00
Bo Maryniuk
54416ed2e8
Add with_deprecated test with opt-in policy configured
2017-03-21 10:47:26 +01:00
Bo Maryniuk
9f8bb257df
Add with_deprecated test with opt-in policy by default
2017-03-21 10:46:53 +01:00
Bo Maryniuk
66dff82062
Fix unit test: log messages has been changed
2017-03-21 09:29:48 +01:00