Commit Graph

239 Commits

Author SHA1 Message Date
Ch3LL
368c012f12
Revert "Make sure --run-expensive runtests.py arg works"
This reverts commit 56bf069079.
2019-05-13 14:45:12 -04:00
Ch3LL
2acb0f37bc
Make sure --run-expensive runtests.py arg works 2019-05-08 13:16:45 +01:00
rallytime
3f2712fbc1
Merge branch '2018.3' into 'fluorine'
Conflicts:
  - tests/unit/states/test_virt.py
  - tests/unit/test_config.py
2018-10-29 12:36:28 -04:00
Erik Johnson
b851a41ef8
Don't run unit or integration tests unnecessarily
If --from-filenames (and optionally --filename-map) yield no matches,
this will keep from running the entire unit/integration suite.
2018-10-23 14:21:21 -05:00
rallytime
9298304ce9
Merge branch '2018.3' into 'fluorine'
No conflicts.
2018-09-19 14:07:06 -04:00
rallytime
d19c67f619
Merge branch '2017.7' into '2018.3'
No conflicts.
2018-09-19 09:59:32 -04:00
William Giokas
fde757517f
Order the runtests suites
Uses an ordered dictionary instead of a default python dict when
describing the `TEST_SUITES` variable. Sorts alphabetically based on the
name of the suite.
2018-09-18 10:04:02 -04:00
Erik Johnson
80dcb44a0d
Merge remote-tracking branch 'upstream/2018.3' into merge-fluorine
Conflicts:
- salt/utils/mac_utils.py
- tests/unit/config/test_config.py
- tests/unit/loader/test_globals.py
- tests/unit/ssh/test_ssh.py
- tests/unit/templates/test_jinja.py
- tests/unit/utils/vmware/test_host.py
- tests/unit/utils/vmware/test_license.py
2018-08-17 07:52:59 -05:00
Erik Johnson
d56dcdd608
Rename "providers" dir to "clouds" to respect naming convention 2018-08-14 13:53:30 -05:00
Gareth J. Greenaway
8f4d55666e
Updaitng runtests.py for logging tests. 2018-07-31 09:19:06 -07:00
Gareth J. Greenaway
ca4dd6c873
Adding integration/logging to runtests.py 2018-07-31 09:19:06 -07:00
Daniel Wallace
f941ea265f
add running sdb tests 2018-07-17 13:06:15 -05:00
rallytime
969296ecbe
Merge branch '2018.3' into 'develop'
No conflicts.
2018-05-15 12:38:01 -04:00
rallytime
25f03ae425
Merge branch '2017.7' into '2018.3'
Conflicts:
  - tests/integration/modules/test_status.py
  - tests/integration/states/test_pip_state.py
  - tests/support/case.py
  - tests/whitelist.txt
2018-05-09 11:24:02 -04:00
Daniel A. Wozniak
2605ff8712
Gracefully handle blank lines in whitelist.txt 2018-05-07 13:35:00 -07:00
rallytime
0eab957281
Merge branch '2018.3' into 'develop'
Conflicts:
  - salt/netapi/rest_tornado/saltnado.py
  - tests/integration/states/test_file.py
  - tests/integration/states/test_git.py
  - tests/unit/modules/test_tls.py
2018-04-20 15:40:49 -04:00
rallytime
4718d31e53
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/config/__init__.py
  - salt/minion.py
  - salt/modules/pip.py
  - salt/states/pip_state.py
  - salt/states/virtualenv_mod.py
  - tests/integration/modules/test_status.py
2018-04-19 17:15:20 -04:00
Daniel A. Wozniak
cadd759727
Use warnings to warn user 2018-04-19 08:26:50 -07:00
Daniel A. Wozniak
144c68e214
Allow non admin name based runs on windows 2018-04-19 00:18:17 -07:00
rallytime
5b50eaf6b0
Merge branch '2018.3' into 'develop'
Conflicts:
  - doc/ref/proxy/all/salt.proxy.cimc.rst
  - doc/ref/proxy/all/salt.proxy.panos.rst
  - doc/topics/releases/2018.3.0.rst
  - salt/modules/cmdmod.py
  - salt/modules/state.py
  - salt/utils/schedule.py
  - tests/integration/modules/test_state.py
2018-04-05 13:25:46 -04:00
rallytime
893196d3e6
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/conf.py
  - salt/loader.py
  - salt/modules/dockermod.py
  - salt/modules/sensehat.py
  - salt/utils/parsers.py
  - tests/integration/cloud/providers/test_ec2.py
  - tests/integration/modules/test_cp.py
  - tests/integration/modules/test_groupadd.py
  - tests/integration/spm/test_man_spm.py
  - tests/integration/states/test_npm.py
  - tests/unit/states/test_environ.py
2018-04-03 14:33:11 -04:00
Erik Johnson
bbfd35d3ea
Replace flaky SPM man test
This replaces a test that has been intermittently failing, and also
expands it to check for _all_ man pages.
2018-03-29 12:19:41 -05:00
rallytime
e312efb5e7
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/modules/cmdmod.py
  - salt/modules/pillar.py
  - salt/modules/yumpkg.py
  - salt/state.py
  - salt/utils/pkg/rpm.py
  - salt/utils/schedule.py
  - tests/integration/states/test_npm.py
  - tests/integration/states/test_pkgrepo.py
2018-03-27 16:31:55 -04:00
Daniel A. Wozniak
641f1f2293
Add fail-fast option to test runner 2018-03-20 22:53:01 -07:00
Daniel A. Wozniak
3b6901e19d Honor named tests when running integration suites 2018-03-15 13:16:43 -07:00
Erik Johnson
a04087b2e2
runtests.py: allow user to set optparse options in REPL
This allows for the options set by optparse to be passed to main() as
kwargs, so that the test suite can be run from within a REPL.

>>> import runtests
>>> try:
...     runtests.main(ssh=True, verbosity=2, coverage_xml='/tmp/coverage.xml', xml='/tmp/xml-unittests-output', run_destructive=True, output_columns=80, sysinfo=True)
... except SystemExit:
...     pass
...
>>>
2018-01-29 08:53:40 -06:00
Erik Johnson
8c360dd3fb
Revert "Clear Python 2 .pyc files when Python 3 suite runs"
This reverts commit 7a60cfd171.
2017-12-20 08:39:41 -06:00
Erik Johnson
7a60cfd171
Clear Python 2 .pyc files when Python 3 suite runs
This prevents import errors when Python 2 .pyc files exist and the test
suite is run under Python 3.
2017-12-19 15:35:10 -06:00
Gareth J. Greenaway
9797922c8b
Moving scheduler tests into a new location. Adding new TEST_SUITE to runtests.py. Add CLI flag to runtests.py so the scheduler tests can be run invidually. 2017-12-12 08:37:38 -08:00
Benedikt Werner
6900e6ece1
Merge branch 'develop' into accept-minions-from-grains 2017-11-17 19:35:53 +01:00
Mike Place
f2aa3539ef
Merge branch 'develop' into accept-minions-from-grains 2017-11-13 11:13:50 -07:00
rallytime
4e2280157a
Merge branch '2017.7' into 'develop'
Conflicts:
  - .kitchen.yml
  - tests/unit/test_doc.py
  - tests/unit/utils/test_cloud.py
2017-11-13 12:27:59 -05:00
Ch3LL
46bce3bd5e
add additional parser argument for ssh integration tests 2017-11-10 10:58:38 -05:00
Ch3LL
e9231430b5
remove logic similar to cloud/proxy tests 2017-11-10 10:48:31 -05:00
Ch3LL
c731eb8ea6
add ssh dir to test runner when --ssh-tests set 2017-11-10 10:48:31 -05:00
Mike Place
1412a42f0e
Merge pull request #44070 from gtmanfred/kitchen
begin adding kitchen-salt into the test suite
2017-11-02 15:55:33 -06:00
Benedikt Werner
6db9143f08
Changed runtest daemons option help 2017-10-29 14:02:37 +01:00
Benedikt Werner
1403778c5b
Renamed 'Dameons Tests' to 'Daemon Tests' 2017-10-29 14:02:37 +01:00
Benedikt Werner
d06d031227
Moved autosign grains integration tests to its own file 2017-10-29 14:02:37 +01:00
rallytime
28343f0120
Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/modules/git.py
2017-10-25 09:54:37 -04:00
Ch3LL
9e2e785034
add spm tests to test runner 2017-10-24 10:33:53 -04:00
Daniel Wallace
7410ffd92a
add first kitchen test 2017-10-17 14:59:10 -06:00
Daniel Wallace
b8c800e4a7
start adding kitchen to test suites 2017-10-17 14:59:10 -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
twangboy
a2c4ff0ebc Don't run coverage it not admin 2017-06-20 15:32:55 -06:00
Daniel Wallace
7091a0b4aa specify when to run venafi tests 2017-05-25 10:27:40 -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
C. R. Oldham
3be90cc9f4 Rescue proxy_auto_tests PR from git rebase hell 2017-05-05 17:04:00 -06:00
Erik Johnson
e03698fbeb Add git_pillar integration tests
This also adds a new section to the runtests.py so that ext_pillar
integration tests can be run separately.
2017-04-20 03:51:08 -05:00
Erik Johnson
20724839a9 Fix for running just the grains tests
The -G/--grains/--grains-tests option was being ignored because a suite
was not defined for it. This adds the option, and also adds a dunder
init to satisfy the test parser.
2017-03-22 14:11:22 -05:00