Commit Graph

226 Commits

Author SHA1 Message Date
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
d56dcdd608
Rename "providers" dir to "clouds" to respect naming convention 2018-08-14 13:53:30 -05: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
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
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
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
Pedro Algarvio
c687b6112a
Account for test module names prefixed with tests. 2017-03-03 12:41:27 +00:00
Pedro Algarvio
661b6416b7
Allow passing a test module path to runtests.py to run its tests
Example:

```
python tests/runtests.py -v tests/integration/states/test_alternatives.py
```
2017-03-02 19:12:43 +00:00
Pedro Algarvio
ab83cced63
Child processes termination 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
08804932c3
Using pytest start_daemon 2017-02-28 22:52:48 +00:00
Pedro Algarvio
5d5a3ee01e
All tests now follow the test_*.py pattern. 2017-02-23 23:19:42 +00:00
twangboy
77d3a584a4 Set hard limit on Windows 2017-02-17 13:52:27 -07:00
Pedro Algarvio
b82bf6bebf
Inform on which python version we are running on 2017-02-09 18:06:30 +00:00
twangboy
c704eaa175 Fix geteuid stacktrace on Windows 2017-01-30 15:36:08 -07:00
Pedro Algarvio
092e863842
Account for a not recent enough salt-testing library 2016-08-23 19:04:49 +01:00
rallytime
d2340a0aad Merge branch '2016.3' into 'develop'
Conflicts:
  - pkg/windows/build.bat
  - pkg/windows/build_pkg.bat
  - tests/runtests.py
2016-08-17 12:13:26 -06:00
rallytime
c305d8d99b Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/conf.py
  - tests/runtests.py
2016-08-17 10:37:57 -06:00
Ch3LL
c9b7c3cf80 need to add returners option in other places 2016-08-09 13:53:42 -06:00