Commit Graph

46 Commits

Author SHA1 Message Date
rallytime
4a218142a5
Remove support for RAET
Conflicts:
* doc/topics/releases/neon.rst
* requirements/tests.txt
* salt/cli/caller.py
* salt/daemons/test/__init__.py
* salt/daemons/test/test_minion.py
* salt/daemons/test/test_saltkeep.py
* salt/modules/event.py
* salt/modules/raet_publish.py
* salt/transport/__init__.py
* salt/utils/parsers.py
* setup.py
* tests/unit/modules/test_raet_publish.py
2019-10-10 09:46:39 +01:00
Dmitry Kuzmenko
1654fe8824
Multimaster inotify beacons test 2019-08-18 14:00:47 +03:00
Dmitry Kuzmenko
65dc47c300
Multimaster tests environment and test module test. 2019-08-18 14:00:47 +03:00
Daniel A. Wozniak
c001022913
Fix linter 2019-04-19 16:22:52 +00:00
Daniel A. Wozniak
423f6f96b7
Fix vent assertion race condition 2019-04-19 16:16:01 +00:00
Ch3LL
9ada8d9b7f
Merge branch '2018.3' into '2019.2'
Conflicts:
  - salt/transport/zeromq.py
  - tests/unit/modules/test_kubernetesmod.py
  - tests/unit/modules/test_win_file.py
2019-03-14 16:13:54 -04:00
Ch3LL
9adc19eeb1
Merge branch '2017.7' into '2018.3'
Conflicts:
 - doc/conf.py
 - salt/modules/zfs.py
2019-03-05 14:08:35 -05:00
Daniel Wozniak
6da495fd29
Fix linter 2019-02-27 11:36:37 -07:00
Daniel A. Wozniak
f78b360c0a fix reactor ping test 2019-02-26 15:49:20 -06:00
rallytime
7e0db5cb15
Merge branch '2018.3' into 'fluorine'
Conflicts:
  - salt/cloud/clouds/azurearm.py
2018-09-25 15:18:00 -04:00
Daniel A. Wozniak
1f60753a47
Do not use close_fds on Windows OS 2018-09-19 19:07:41 -06:00
rallytime
7dc1e770c4
Merge branch '2018.3' into 'develop'
Conflicts:
  - doc/topics/installation/freebsd.rst
  - salt/cloud/clouds/oneandone.py
  - salt/grains/core.py
  - salt/modules/napalm_ntp.py
  - salt/modules/win_update.py
  - salt/modules/win_wua.py
  - salt/modules/zabbix.py
  - salt/renderers/pass.py
  - salt/states/vault.py
  - tests/unit/states/test_win_update.py
2018-06-06 13:35:36 -04:00
Erik Johnson
a1ce0631fd
Use @property instead of @staticmethod for config_dir
We're not passing arguments and we're just getting back a string
contstant, so there's no need to make this a staticmethod.
2018-06-05 14:10:33 -05:00
rallytime
3273bbdab7
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/modules/all/index.rst
  - doc/topics/grains/index.rst
  - doc/topics/releases/2016.3.4.rst
  - doc/topics/spm/spm_formula.rst
  - doc/topics/tutorials/cron.rst
  - doc/topics/tutorials/index.rst
  - doc/topics/tutorials/stormpath.rst
  - salt/engines/slack.py
  - salt/log/handlers/fluent_mod.py
  - salt/modules/cyg.py
  - salt/modules/junos.py
  - salt/modules/namecheap_dns.py
  - salt/modules/namecheap_domains.py
  - salt/modules/namecheap_ns.py
  - salt/modules/namecheap_ssl.py
  - salt/modules/namecheap_users.py
  - salt/modules/reg.py
  - salt/modules/tomcat.py
  - salt/modules/vault.py
  - salt/modules/win_file.py
  - salt/modules/zpool.py
  - salt/output/highstate.py
  - salt/renderers/pass.py
  - salt/runners/cache.py
  - salt/states/boto_apigateway.py
  - salt/states/boto_iam.py
  - salt/states/boto_route53.py
  - salt/states/msteams.py
  - salt/states/reg.py
  - salt/states/win_iis.py
  - tests/integration/modules/test_cmdmod.py
  - tests/integration/states/test_user.py
  - tests/support/helpers.py
  - tests/unit/cloud/clouds/test_openstack.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/unit/modules/test_junos.py
  - tests/unit/pillar/test_git.py
  - tests/unit/states/test_win_path.py
  - tests/unit/test_pillar.py
  - tests/unit/utils/test_format_call.py
  - tests/unit/utils/test_utils.py
  - tests/unit/utils/test_warnings.py
2018-06-01 14:54:12 -04:00
Erik Johnson
93ee5ee2b0
Fix all Sphinx warnings
Well, all but one, which we expect to see
2018-05-31 15:28:25 -05:00
rallytime
13e8124031
Merge branch '2017.7' into '2018.3'
Due to the many merge conflicts created from #47106 against the 2017.7 branch
and #46002 against the 2018.3 branch, the changes from #47106 have been largely
removed from this merge forward and the HEAD of 2018.3 was taken.

A separate fix for Tornado 5.0 support will need to be made directly against the
2018.3 branch.

Conflicts:
  - doc/topics/development/conventions/formulas.rst
  - salt/master.py
  - salt/minion.py
  - salt/netapi/rest_tornado/saltnado.py
  - salt/states/zfs.py
  - salt/transport/ipc.py
  - salt/transport/tcp.py
  - salt/transport/zeromq.py
  - salt/utils/async.py
  - tests/support/helpers.py
  - tests/support/parser/cover.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_ssh.py
  - tests/unit/test_minion.py
  - tests/unit/utils/test_safe_walk.py
2018-04-27 13:38:35 -04:00
Daniel A. Wozniak
25803c9176
Move process target to top level module namespace 2018-04-19 18:38:28 -07:00
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
rallytime
052b13c98e
Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/cli/daemons.py
  - salt/client/ssh/__init__.py
  - salt/modules/win_pkg.py
  - salt/netapi/rest_cherrypy/app.py
  - salt/proxy/fx2.py
  - salt/utils/__init__.py
  - salt/utils/jinja.py
  - salt/utils/napalm.py
  - salt/utils/path.py
  - salt/utils/verify.py
  - tests/integration/modules/test_saltutil.py
  - tests/integration/states/test_service.py
  - tests/unit/utils/test_verify.py
2017-11-22 12:36:03 -05:00
twangboy
47114fdb30
Pass root_dirs to the win_verify_env function
Remove while loop that was hanging when `salt` wasn't in the path
Add salt.util.path.safe_path function to check for unsafe paths
Pass root_dir to all calls to `verify_env`
2017-11-13 13:05:23 -07:00
Erik Johnson
877abb89d0
Complete the salt.utils refactor
This moves the remaining 30 functions from salt.utils to new locations.
2017-10-15 09:43:31 -05:00
Erik Johnson
2d4d8fa9c8
Convert "Can be removed" lines into TODO lines 2017-10-13 09:29:03 -05: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
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
Gareth J. Greenaway
53a216378c Fixing the last text failure. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
4d3399c6c4 Couple more typos, assert not asset. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
14a903ef61 Fixing typo in assertSaltTrueReturn, assertSaltFalseReturn and assertSaltNoneReturn. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
a531d01b26 Updating the assert tests for develop based on changes from 41569. 2017-06-09 09:16:09 -06:00
Gareth J. Greenaway
17ddc9396c Fixing the last text failure. 2017-06-08 20:03:05 -07:00
Gareth J. Greenaway
ace175edae Couple more typos, assert not asset. 2017-06-08 15:30:44 -07:00
Gareth J. Greenaway
e39d05060e Fixing typo in assertSaltTrueReturn, assertSaltFalseReturn and assertSaltNoneReturn. 2017-06-08 14:18:05 -07:00
Gareth J. Greenaway
207dc61405 Updating the assert tests for develop based on changes from 41569. 2017-06-08 14:18:04 -07:00
Pedro Algarvio
88627d312f
Write the generated configuration into a config file 2017-04-28 13:33:36 +01:00
Pedro Algarvio
eb588c772a
Add missing futures import 2017-04-05 23:16:52 +01:00
Pedro Algarvio
104a2fb30c
Keep the same exception raised before the move 2017-04-04 18:04:39 +01:00
Pedro Algarvio
b94992f544
Some more RUNTIME_CONFIGS and RUNTIME_VARS fixes 2017-04-04 18:04:38 +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
Pedro Algarvio
174625618a
Add mixin to assert XML equality 2017-04-01 14:22:58 +01:00
Pedro Algarvio
9a11538b54
Stop using deprecated TestCase methods 2017-04-01 14:22:57 +01:00
Pedro Algarvio
090041d674
Allow patching sys.modules with mocked modules 2017-03-28 19:04:04 +01:00
Pedro Algarvio
7c9460b719
Reduce complexity while still allowing multiple loader modules to be mocked
This also goes in par with the effort to reduce memory usage since we no
longer have any class attributes attached to the test classes.
2017-03-28 19:02:51 +01:00
Pedro Algarvio
e7768705f9
Allow passing different loader_module_globals per loader_module 2017-03-28 19:02:51 +01:00
Pedro Algarvio
30f62f22ec
Simplify the mock mixin required work
This approach does not require the user to call `super().setUp()`
2017-03-28 19:00:51 +01:00
Pedro Algarvio
0cb46f0eb8
Several enhancements to the mocked loader module mixin
Allows patching more than one loader module.
Allows auto-loading the minion functions which will get namespaced with
the globals used to patch the loader module(s).
2017-03-09 19:31:15 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
Pedro Algarvio
1daa2e24cd
Moved some test supporting modules to tests/support
Previously they were in tests/utils which also had test case modules.
2017-02-28 22:52:48 +00:00