Commit Graph

59 Commits

Author SHA1 Message Date
Daniel A. Wozniak
fc39dcf4e4
Simplify cli test fixes 2018-08-30 12:49:41 -07:00
rallytime
ac406c49a7
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/ext/win_inet_pton.py
  - salt/pillar/git_pillar.py
  - tests/integration/cli/test_batch.py
  - tests/integration/modules/test_archive.py
  - tests/integration/modules/test_pkg.py
  - tests/integration/states/test_file.py
  - tests/support/case.py
  - tests/whitelist.txt
2018-08-28 11:22:47 -04:00
Daniel A Wozniak
cd6706e9f0
Fix merge wart 2018-08-27 14:36:40 -07:00
Daniel A. Wozniak
b9c344b7ce
Fix module.archive tests for win py3 2018-08-27 00:44:41 -07:00
Daniel A. Wozniak
5fefd6fe89
Simplify cli test fixes 2018-08-27 00:44:40 -07:00
Daniel A. Wozniak
b8af2387cd
Fix indent wart 2018-08-27 00:44:38 -07:00
Daniel A. Wozniak
2733c02b0a
Use double quotes on windows commands 2018-08-27 00:44:36 -07:00
rallytime
3e6445a9d6
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/man/salt-api.1
  - doc/man/salt-call.1
  - doc/man/salt-cloud.1
  - doc/man/salt-cp.1
  - doc/man/salt-key.1
  - doc/man/salt-master.1
  - doc/man/salt-minion.1
  - doc/man/salt-proxy.1
  - doc/man/salt-run.1
  - doc/man/salt-ssh.1
  - doc/man/salt-syndic.1
  - doc/man/salt-unity.1
  - doc/man/salt.1
  - doc/man/salt.7
  - doc/man/spm.1
  - salt/beacons/log.py
  - salt/client/ssh/__init__.py
  - salt/modules/cmdmod.py
  - salt/utils/win_functions.py
  - tests/integration/modules/test_cmdmod.py
  - tests/integration/netapi/rest_tornado/test_app.py
  - tests/integration/runners/test_state.py
2018-08-08 13:31:57 -04:00
rallytime
aaf986d728
Mark one grains test as flaky & convert to pytest notation 2018-08-06 15:03:27 -04: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
Erik Johnson
71a1d2b40a
Fix batch tests on Python 3 2018-03-26 08:56:54 -05:00
Gareth J. Greenaway
19fd2b621a
Fixing integration tests that were failing. 2018-03-25 17:39:33 -07:00
Daniel Wallace
9ce14b2a12
pass opts to SSHClient for enable_ssh_minions
Also, use ckminions to get the minions from the roster, instead of doing it in
publish.
2018-02-20 16:06:00 -07:00
Erik Johnson
685bfbbd3e
[PY3] Add unicode_literals to cache and cli modules 2018-01-13 21:08:51 -06: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
Pedro Algarvio
2ee6d5d589
Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
Erik Johnson
3923305141 Sort list of minions in batch to make tests consistent 2017-03-16 12:00:38 -05:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup. 2017-03-01 01:33:07 +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
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00
rallytime
0e332ab591 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/cli/batch.py
  - salt/cli/salt.py
  - salt/transport/client.py
  - salt/utils/vmware.py
  - tests/integration/modules/sysmod.py
2016-11-14 09:14:00 -07:00
Mike Place
b6031524e5
Return with proper retcodes in batch mode
Check for the highest retcode received in batch mode and exit with it.

Also, an integration test for the same.

Closes #37492
2016-11-11 14:03:29 +13:00
rallytime
616aafa398 Merge branch '2016.3' into 'carbon'
No conflicts.
2016-09-29 11:47:48 -06:00
rallytime
3e4ac617d3 Merge branch '2015.8' into '2016.3'
Conflicts:
  - tests/integration/cli/grains.py
  - tests/integration/files/file/base/issue-2068-template-str-no-dot.sls
  - tests/integration/files/file/base/issue-2068-template-str.sls
  - tests/integration/modules/pip.py
2016-09-29 09:15:26 -06:00
Mike Place
2dcb92134d
Fix race between minion job timeout and cli test timeout 2016-09-29 13:23:26 +09:00
Mike Place
52e9ba4076 Revert "Skip some tests on MacOS" (#36341) 2016-09-15 11:12:04 -06:00
Justin Findlay
d0c4846c89 skip tests that timeout on MacOS
Due to the changes in how the test daemons are handled, it seems.  The
tests fail intermittently.
2016-09-14 14:40:43 -06:00
rallytime
1fe0b69a6c Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/blockdev.py
  - salt/modules/ddns.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/linux_sysctl.py
  - salt/modules/status.py
  - salt/modules/x509.py
  - salt/utils/process.py
  - salt/utils/verify.py
  - tests/integration/__init__.py
  - tests/integration/modules/state.py
  - tests/integration/states/cmd.py
2016-08-12 16:21:58 -06:00
rallytime
cf038ee3fe Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/grains/core.py
  - salt/modules/file.py
  - salt/modules/hosts.py
  - salt/modules/inspectlib/collector.py
  - salt/modules/portage_config.py
  - salt/modules/x509.py
  - salt/scripts.py
  - tests/integration/shell/enabled.py
2016-08-11 11:33:54 -06:00
Erik Johnson
a375dd7e1f Clean up open filehandles (#35359)
* salt/crypt.py: clean up open filehandles

* salt/fileclient.py: clean up open filehandles

* salt/grains/core.py: clean up open filehandles

* salt/modules/cp.py: clean up open filehandles

* salt/modules/data.py: clean up open filehandles

* salt/modules/dnsutil.py: clean up open filehandles

* salt/modules/dockerng.py: clean up open filehandles

* salt/modules/inspectlib/collector.py: clean up open filehandles

* salt/modules/file.py: clean up open filehandles

* salt/modules/hosts.py: clean up open filehandles

* salt/modules/incron.py: clean up open filehandles

* salt/modules/dpkg.py: clean up open filehandles

* salt/modules/linux_sysctl.py: clean up open filehandles

* salt/modules/netbsd_sysctl.py: clean up open filehandles

* salt/modules/network.py: clean up open filehandles

* salt/modules/nftables.py: clean up open filehandles

* salt/modules/openbsd_sysctl.py: clean up open filehandles

* salt/modules/rh_ip.py: clean up open filehandles

* salt/modules/portage_config.py: clean up open filehandles

* salt/modules/status.py: clean up open filehandles

* salt/modules/tls.py: clean up open filehandles

* salt/modules/xapi.py: clean up open filehandles

* salt/modules/x509.py: clean up open filehandles

* salt/modules/virt.py: clean up open filehandles

* salt/modules/zcbuildout.py: clean up open filehandles

* salt/returners/local_cache.py: clean up open filehandles

* salt/utils/cloud.py: clean up open filehandles

* salt/states/pkgrepo.py: clean up open filehandles

* salt/states/x509.py: clean up open filehandles

* salt/transport/mixins/auth.py: clean up open filehandles

* salt/utils/__init__.py: clean up open filehandles

* salt/states/pkg.py: clean up open filehandles

* salt/utils/minion.py: clean up open filehandles

* salt/utils/openstack/nova.py: clean up open filehandles

* salt/utils/openstack/swift.py: clean up open filehandles

* salt/utils/process.py: clean up open filehandles

* salt/utils/templates.py: clean up open filehandles

* salt/utils/virt.py: clean up open filehandles

* tests/integration/__init__.py: clean up open filehandles

* tests/integration/cli/grains.py: clean up open filehandles

* tests/integration/client/standard.py: clean up open filehandles

* tests/integration/modules/hosts.py: clean up open filehandles

* tests/unit/utils/vt_test.py: clean up open filehandles

* tests/integration/shell/enabled.py: clean up open filehandles

* tests/integration/states/cmd.py: clean up open filehandles

* tests/integration/states/file.py: clean up open filehandles

* tests/integration/states/match.py: clean up open filehandles

* tests/unit/config_test.py: clean up open filehandles

* tests/unit/templates/jinja_test.py: clean up open filehandles

* tests/unit/utils/find_test.py: clean up open filehandles

* tests/integration/modules/state.py: clean up open filehandles

* Update dnsutil_test to reflect changes in fopen usage
2016-08-11 10:45:24 -06:00
rallytime
f76cf617a7 Pylint fix 2016-08-02 14:23:20 -06:00
Mike Place
324fdd121f Remoe py3 fix/shell/salt.utils.event 2016-08-03 03:38:35 +09:00
Mike Place
4df8b32509 More liberal matching for batch tests
Fixes test failures currently in develop
2016-08-03 03:32:03 +09:00
rallytime
fde7e0f4c5 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/utils/schedule.py
2016-07-28 11:08:14 -06:00
rallytime
a7d4f93697 Merge branch '2015.8' into '2016.3'
Conflicts:
  - tests/integration/__init__.py
2016-07-27 11:35:16 -06:00
Mike Place
5f8370ae8d Refine errors in client (#34976)
* Refine errors in client

Check for the existence of cache data

* Adjust tests for new return string
2016-07-27 11:05:31 -06:00
Mike Place
82d271b43a Increase timeout for grains test 2016-07-26 16:10:30 -06:00
rallytime
1031f19f3d Update batch integration tests to not be flaky in Python3 2016-07-22 14:19:15 -06:00
rallytime
37cfe70724 Add some grains targeting tests 2016-06-16 17:02:46 -06:00
rallytime
3e7ab8c7b3 Write some more simple batch command tests 2016-06-13 16:25:19 -06:00
rallytime
beb9d0fe84 Ensure all integration test classes and funcs are documented w/examples 2016-03-04 12:13:27 -07:00
Colton Myers
0b7ac988cc Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop
Conflicts:
    .pylintrc
    salt/beacons/service.py
    salt/beacons/sh.py
    salt/modules/cassandra_cql.py
    salt/returners/cassandra_cql_return.py
2015-04-01 14:22:33 -06:00
Colton Myers
c91a593507 Fix test to give more data on failure 2015-03-27 16:50:39 -06:00
Mike Place
14592ed1f9 Adjust batch test 2015-02-27 14:53:58 -07:00
Pedro Algarvio
60f215f191 Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
Mike Place
f44e46d080 Adjust batch test 2015-01-05 10:04:15 -07:00
Mike Place
302d5cab39 Fix failing test 2014-12-15 12:04:35 -07:00
Pedro Algarvio
ea89edf3d8 Switch run_ssh with run_function 2014-11-06 23:58:40 +00:00