Commit Graph

1275 Commits

Author SHA1 Message Date
Alexei Pope Lane
ad80801d0f Improvements to SSH known_hosts module and state. 2017-09-19 13:28:48 +10:00
Alessandro -oggei- Ogier
8d79ee2d49 test system group creation 2017-09-08 10:34:14 +02:00
Nicole Thomas
5f0bdd620e Merge branch 'develop' into exec-code-all-fix 2017-08-24 12:18:36 -04:00
rallytime
6ca3607770 Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/engines/slack.py
  - salt/modules/win_pkg.py
  - salt/utils/versions.py
2017-08-18 09:28:26 -04:00
Daniel Wallace
ba80a7d4b5 use a ruby gem that doesn't have dependencies 2017-08-17 13:45:10 -06:00
Daniel Wallace
0a1f40a664 test with gem that appears to be abandoned 2017-08-17 10:38:32 -06:00
Lukas Raska
90c46ddefb Allow cmdmod.exec_code_all to utilize cmdmod.run_all parameters 2017-08-16 21:40:33 +02:00
Gareth J. Greenaway
d8ac1f8cfb Updating unit and integration tests for beacons to reflect changes. 2017-08-14 12:04:38 -07: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
Mike Place
66a2a8edc0 Merge pull request #42398 from garethgreenaway/42189_show_docs_then_error
Show documentation when no function is included
2017-07-27 13:49:35 -05:00
rallytime
1f0b90aa57 Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/cloud/clouds/joyent.py
  - salt/engines/slack.py
2017-07-26 17:51:36 -06:00
Gareth J. Greenaway
016e2e7a34 Updating tests to reflect changes. Updating to include passed function name in returned docs with message that it is not available. 2017-07-26 09:04:22 -07: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
7aa31ff030 Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/grains/core.py
  - salt/modules/git.py
  - salt/modules/pillar.py
  - salt/states/saltmod.py
  - salt/states/user.py
  - tests/integration/states/handle_iorder.py
2017-07-18 09:05:43 -06:00
Erik Johnson
14cf6ce322 is_windows is a function, not a propery/attribute
While not fatal, this could potentially cause problems running this
test on Windows.
2017-07-17 23:36:21 -05:00
rallytime
4d96cc1068 Merge branch '2017.7' into 'develop'
No conflicts.
2017-07-03 09:28:18 -06:00
Erik Johnson
3071bb7a37 Add debug logging for grains tests
The assert doesn't tell us anything about the grain that is failing.
This adds some debug logging to make this easier to troubleshoot.
2017-06-30 15:39:48 -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
jmacfar
dba9558b73 Support cp.get_file|url to download files to a directory
Integrations tests
2017-06-16 10:45:18 -05:00
Bo Maryniuk
e9de0746ae Fix grain for os_family on SUSE series 2017-06-16 14:39:08 +02:00
Piotr Kaźmierczak
ea4d085694 fixing beacons.list integration test failure 2017-06-16 14:39:08 +02:00
rallytime
74d9a36d5a Merge branch 'nitrogen' into 'develop'
Conflicts:
  - pkg/salt-proxy@.service
  - salt/modules/npm.py
  - salt/modules/parted.py
  - tests/integration/modules/test_libcloud_dns.py
2017-06-13 15:01:51 -06:00
Daniel Wallace
b202505923 mark all mac power tests as flaky
After talking to @cro, all of the mac power modules became super flaky in
Sierra.  Because of this, I am marking all of the mac power tests with the
flaky decorator.
2017-06-12 13:34:12 -06:00
Nicole Thomas
c292b1161f Lint: quick fix to add missing blank line 2017-06-08 16:04:59 -06:00
Daniel Wallace
5010e1a89d Disable libcloud test if the module doesn't load
This is causing the mac tests to fail.  apache-libcloud 0.20.1 is what is being
imported, and the libcloud_dns module is not being used.
2017-06-08 11:27:24 -06:00
rallytime
396b06fdf8 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-06-07 09:54:20 -06:00
Mike Place
45326ccdec Merge pull request #41621 from gtmanfred/mac
Fix some mac tests
2017-06-07 10:19:25 -05:00
rallytime
1a40e105e5 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - tests/integration/__init__.py
  - tests/integration/modules/test_state.py
2017-06-06 12:57:44 -06:00
rallytime
2cb4f2baa9 Merge branch 'nitrogen' into 'develop'
Conflicts:
  - salt/states/keystone.py
2017-06-06 12:50:35 -06:00
Mike Place
53ecb5c4b0 Merge pull request #41553 from terminalmage/issue41527
Fix installing RPMs via remote URLS which are 30x redirects
2017-06-06 13:23:41 -05:00
Daniel Wallace
fd23f7dad3 Mark known flaky mac power test 2017-06-06 12:19:45 -06:00
Daniel Wallace
19ea5481b6 remove test that never passed 2017-06-05 17:45:23 -06:00
Ch3LL
8c10cbd01d
Skip locale tests on MacOSX 2017-06-05 15:57:20 -04:00
Erik Johnson
c512142899 Add integration test for cp.cache_file 2017-06-01 17:20:58 -05:00
rallytime
57166fd892 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-05-24 15:30:44 -06:00
Nicole Thomas
460af48f1f Merge pull request #41390 from rallytime/merge-nitrogen
[nitrogen] Merge forward from 2016.11 to nitrogen
2017-05-24 15:27:22 -06:00
rallytime
537fd763dc Rename proxy test files to use test_* syntax 2017-05-24 13:03:21 -06:00
rallytime
098ed60d1b Rework proxy minion test files to use new import styles 2017-05-24 10:23:57 -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
Dmitry Kuzmenko
4ed0f8ed4e Fixed grains module test: Arch release is 'rolling', not an empty str. 2017-05-23 11:53:56 +03:00
Dmitry Kuzmenko
9f31428129 Update ACL module test to work as non-root. 2017-05-23 11:53:56 +03:00
C. R. Oldham
6db31ce52a Fix problem with sysrc on FreeBSD, YAML overeager to coerce to bool and int.
Fix problem with sysrc on FreeBSD, YAML overeager to coerce to bool
2017-05-20 19:39:22 -06:00
rallytime
9668480fc5 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-05-16 19:58:21 -06:00
rallytime
8e1db7c427 Pylint fix 2017-05-16 15:53:11 -06:00
rallytime
d23010a114 Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/modules/aptpkg.py
  - salt/states/libcloud_dns.py
  - salt/states/pkg.py
  - tests/integration/modules/test_pkg.py
  - tests/unit/modules/test_mac_brew.py
  - tests/unit/modules/test_pkgutil.py
  - tests/unit/modules/test_zypper.py
  - tests/unit/states/libcloud_dns_test.py
2017-05-15 16:41:59 -06:00
rallytime
bde9d6cdc0 Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-05-15 16:29:13 -06:00
Nicole Thomas
cbe6d00513 Merge pull request #41204 from twangboy/fix_pub_win
Increase timeout for Windows
2017-05-15 14:04:33 -06:00
rallytime
d75a7e0d0f Merge branch 'nitrogen' into 'develop'
No conflicts.
2017-05-12 16:42:54 -06:00
Erik Johnson
7fe64219ae Add rtag check to integration test for pkg.refresh_db 2017-05-12 15:21:22 -05:00
twangboy
e9df95d2a0 Add timout in tests instead of publish 2017-05-12 11:32:04 -06:00