Commit Graph

1216 Commits

Author SHA1 Message Date
Pedro Algarvio
27959701dc Added support and a mocked test case for --global-options passing to pip install. 2013-07-14 18:58:49 +01:00
Pedro Algarvio
fd200c96b0 Added a mocked test case for --install-options passing to pip install.
* Replaced all occurrences of `basestring` with the `string_types` from salt's `_compat` module.
* Properly split install options on commas.
* Install options need to be quoted.
2013-07-14 18:58:44 +01:00
Pedro Algarvio
12d05e4b9a Added a mocked test case for --exists-action passing to pip install.
* `exists_action` now only accepts it's valid settings, one of `s`, `i`, `w`, `b`, else, `CommandExecutionError`.
2013-07-14 18:58:37 +01:00
Pedro Algarvio
fb16313804 Added a mocked test case for --source passing to pip install. 2013-07-14 18:58:33 +01:00
Pedro Algarvio
85b0d7964d Added a mocked test case for --no-download passing to pip install. 2013-07-14 18:58:28 +01:00
Pedro Algarvio
60ef910bad Added a mocked test case for --download-cache passing to pip install. 2013-07-14 18:58:24 +01:00
Pedro Algarvio
bfcd91d700 Added a mocked test case for --download passing to pip install. 2013-07-14 18:58:12 +01:00
Pedro Algarvio
6fbbd5fb31 Added a mocked test case for --target passing to pip install. 2013-07-14 18:58:06 +01:00
Pedro Algarvio
aa8dda75c7 Added a mocked test case for --build passing to pip install. 2013-07-14 18:57:58 +01:00
Pedro Algarvio
6e0e8fddf9 Added a mocked test case for --no-index passing to pip install. 2013-07-14 18:57:52 +01:00
Pedro Algarvio
467d7de4e5 Added a mocked test case for --extra-index-url passing to pip install. 2013-07-14 18:57:47 +01:00
Pedro Algarvio
900682ac51 Added a mocked test case for --index-url passing to pip install. 2013-07-14 18:57:43 +01:00
Pedro Algarvio
d3c1c43781 Add tests for proper protocols to find_links. 2013-07-14 18:57:42 +01:00
Pedro Algarvio
72600f67e6 Test string argument on pkgs, editable, find_links and mirrors. 2013-07-14 18:57:42 +01:00
Pedro Algarvio
3372034c07 Added a mocked test case for --timeout passing to pip install. 2013-07-14 18:57:37 +01:00
Pedro Algarvio
c582d721d9 Added a mocked test case for --log passing to pip install. 2013-07-14 18:57:29 +01:00
Pedro Algarvio
21698d187d Update mocked test case to have the package name as last argument to the pip install call. 2013-07-14 18:57:20 +01:00
Pedro Algarvio
5e58d4c4f3 Added mock test case for clear, upgrade and symlinks for the virtualenv_mod. 2013-07-14 13:23:18 +01:00
Pedro Algarvio
45c258e00b Added test case for the prompt argument to virtualenv_mod. 2013-07-14 13:04:11 +01:00
Pedro Algarvio
d8536c9f87 Add a mocked test case for salt.modules.virtualenv_mod python argument.
* Updated the `virtualenv_mod` mock test case to patch `salt.utils.which` and `sys.modules` at class level as opposed to every function.
2013-07-14 12:53:23 +01:00
Pedro Algarvio
c65b1348fe Fix Travis-CI for unit.modules.virtualenv_test.VirtualenvTestCase.test_no_site_packages_deprecation
Also mock the `virtualenv` module.
2013-07-13 23:23:30 +01:00
Pedro Algarvio
b6471e4099 Mock the virtualenv module in unit.modules.virtualenv_test.VirtualenvTestCase.test_issue_6031_multiple_extra_search_dirs. Is Travis-CI still going to complain? 2013-07-13 23:14:12 +01:00
Pedro Algarvio
2b1cf0ac14 Patch _install_script() since the virtualenv module will try to install some scripts. 2013-07-13 19:55:51 +01:00
Pedro Algarvio
05f2a23733 Make use of salttesting.helpers.ForceImportErrorOn. 2013-07-13 19:55:50 +01:00
Pedro Algarvio
04133b07b4 Added mock test case to test getting the virtualenv version from shell and not from the module. 2013-07-13 19:55:50 +01:00
Pedro Algarvio
606c6d5ffb Add test case which tests if non proper arguments raise an exception. 2013-07-13 19:55:50 +01:00
Pedro Algarvio
5c3a406e17 Let us not use a deprecated option ourselves unless for testing the deprecation. 2013-07-13 19:55:50 +01:00
Pedro Algarvio
de572cb193 Fix the virtualenv unittests which rely on it's version changing. 2013-07-13 19:55:49 +01:00
Pedro Algarvio
606413c063 Show a deprecation warning if no_site_packages is used. Fixes #6027.
If both `no_site_packages` and `system_site_packages` are used, throw an error.
Added the appropriate tests.
2013-07-13 19:55:49 +01:00
Pedro Algarvio
cde1c628ac Added a test case to check for multiple extra search dirs support. Refs #6031. 2013-07-13 19:55:49 +01:00
Pedro Algarvio
2fd8dc299a Add test case to check for proper handling of --never-download. Refs #6030.
Also added assertions to check for proper deprecation logging messages output.
2013-07-13 19:55:49 +01:00
Pedro Algarvio
6126aa47be Small code and print's cleanup. 2013-07-13 19:55:48 +01:00
Pedro Algarvio
8858d1183f Add test case which tests for proper deprecated output based on virtualenv version. 2013-07-13 19:55:48 +01:00
Pedro Algarvio
64c9463a8b Merge pull request #6143 from s0undt3ch/issues/6129-unexpected-__env__-keyword
Fix Issue #6129 unexpected `__env__`  keyword
2013-07-13 11:53:19 -07:00
Pedro Algarvio
5bee1ca7f3 Re-implement 06ac67c84a the right way since the state __env__ was being confused by the shell environment. Fixes #6129. 2013-07-13 18:45:30 +01:00
Pedro Algarvio
269175145f Update mocked rvm unit test since we now call cmd.run_all instead of cmd.retcode. 2013-07-13 17:46:46 +01:00
Xavier Barbosa
3f49000ba2 unittesting for file.serialize and yaml & json filters 2013-07-08 16:19:19 +02:00
Joseph Hall
09490c51f1 Merge pull request #5986 from s0undt3ch/issues/5940-multiple-pip-mirrors
Add a state integration test case for #5940.
2013-07-06 06:51:55 -07:00
Pedro Algarvio
66d86ca2d5 Added 2 test cases which prove that #5970 is invalid. Closes #5970. 2013-07-06 12:48:13 +01:00
Pedro Algarvio
a886eaa03d Add a state integration test case for #5940. 2013-07-05 23:00:14 +01:00
Pedro Algarvio
66d51a036f Switch assertRaisesWithMessage with assertRaises. The first was not working as supposed. 2013-07-05 01:21:00 +01:00
Pedro Algarvio
3c3933d25e Test for the proper exception, remove stray character left behind. 2013-07-05 00:57:47 +01:00
Pedro Algarvio
edf66fd3fe pip allows multiple --find-links to be passed. Added mocked tests too. 2013-07-05 00:54:11 +01:00
Pedro Algarvio
94575cbb63 Finish what was started on f78fca32 2013-07-05 00:53:41 +01:00
Pedro Algarvio
6a97be6115 Added integration test cases for multiple editables and pkgs for salt.modules.pip.install() 2013-07-04 18:57:42 +01:00
Pedro Algarvio
e6aa92901d Add multiple editable's and pkgs+editable's test cases. 2013-07-04 17:24:24 +01:00
Pedro Algarvio
f78fca3256 We don't need to pass -u when we're only passing unittests to -n. 2013-07-04 17:17:48 +01:00
Pedro Algarvio
6158edee2d Add a mocked unit testcase to test for multiple mirrors support. Refs #5940. 2013-07-04 15:01:05 +01:00
Pedro Algarvio
f8216aa584 Fix unit tests to expect the new, single quotes and less wasted white-space, output. 2013-07-04 14:50:07 +01:00
Joost Cassee
7fd85c2963 Allow listing a single module in a top match
This makes the following valid syntax for the top.sls file:

base:
  tommy.example.com:   webserver
  jerry.example.com:   dbserver
  alberon.example.com: mailserver

develop:
  saturn.example.com:  webserver
2013-07-04 00:20:08 +02:00
Pedro Algarvio
d6049a92b5 Use an unicode aware context in the jinja render call. Refs #3436 2013-07-02 14:28:20 +01:00
Pedro Algarvio
dea912d8a0 The result of ssh_known_hosts changed in 8f728fb, so should the test case. 2013-07-02 11:25:11 +01:00
Seth House
08127614f9 Updated arg to salt-key in minionswarm script 2013-07-01 17:03:39 -06:00
Sebastian Vetter
11a9858c6b Correct behaviour of when using list with cross-env file path 2013-06-30 23:19:16 +10:00
Pedro Algarvio
cc7ecbceaa ensure_in_syspath now accepts multiple paths. Make use of it. 2013-06-29 20:57:23 +01:00
Pedro Algarvio
a977a4f4fa Don't ignore environment variables pointing to valid configuration files. Fixes saltstack/salt-cloud#661
`salt.config.load_config()` cannot be hard-coded to use only the master configuration file as the default configuration file path to know if the user has passed any configuration file in the CLI tool or not.
To fix this, `default_path` was added. This way, the minion config or client config or even the salt cloud config can say which is the expected default path of the configuration file and properly load config from environment variables.
2013-06-28 20:39:37 +01:00
Pedro Algarvio
6e061b5d24 Updated unit.utils.verify_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
bdf808773d Updated unit.utils.safe_walk_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
0675fae89c Updated unit.utils.runtime_whitespace_regex_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
155987dc08 Updated unit.utils.path_join_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
6e1f36fb22 Updated unit.utils.find_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
f35367613e Updated unit.utils.filebuffer_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
2081aff707 Updated unit.utils.event_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
4a875f5b35 Updated unit.templates.jinja_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
c04cc4a945 Updated unit.states.rvm_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
b13340e5ea Updated unit.states.gem_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
0631e31cb1 Updated unit.modules.win_status_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
86564ba1ce Updated unit.modules.rvm_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
7a5872b498 Updated unit.modules.postgres_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
9df34a39d7 Updated unit.modules.pip_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
99d828a650 Updated unit.modules.gem_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
d7f2856365 Updated integration.states.virtualenv test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
afae35f14e Updated integration.states.user test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
18752a83cc Updated integration.states.svn test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
aeadc52132 Updated integration.states.supervisord test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
2ef34d1fd6 Updated integration.states.ssh test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
f3b145b118 Updated integration.states.rabbitmq_vhost test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
e6791ee851 Updated integration.states.rabbitmq_user test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
f55263631d Updated integration.states.pip test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
7c49cf1cdc Updated integration.states.match test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
c92568da9e Updated integration.states.host test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
415c3560e2 Updated integration.states.git test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
a75c24dd5f Updated integration.states.file test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
671787d8cb Updated integration.states.compiler test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
34ccae8c46 Updated integration.states.cmd test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
5a64ba438e Updated integration.shell.syndic test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
63caaf8c6e Updated integration.shell.runner test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
66b6acd0e0 Updated integration.shell.matcher test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
331dc6d936 Updated integration.shell.minion test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:02 +01:00
Pedro Algarvio
067f45f6ab Updated integration.shell.master test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
dfa110d5cc Updated integration.shell.key test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
495f8f0440 Updated integration.shell.cp test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
4c014ef284 Updated integration.shell.call test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
2aa572dda6 Updated integration.runners.state test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
7747ef4f1b Updated integration.runners.manage test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
16451948a8 Updated integration.runners.jobs test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
d0aff7934d Updated integration.modules.virtualenv test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
1a505cd703 Updated integration.modules.useradd test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
f69373a277 Updated integration.modules.test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
738447d0a9 Updated integration.modules.sysmod test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
5fa18d41ec Updated integration.modules.sysctl test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:01 +01:00
Pedro Algarvio
de41ca3136 Updated integration.modules.supervisord test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
b46bef99b9 Updated integration.modules.state test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
2c30133404 Updated integration.modules.ssh test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
4cdf6ae255 Updated integration.modules.rabbitmq test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
a3fbe47c9f Updated integration.modules.pw_user test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
501cb0da31 Updated integration.modules.publish test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
863092af60 Updated integration.modules.pillar test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
c780c8b198 Updated integration.modules.mine test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
abc3ed115c Updated integration.modules.hosts test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
b340166ea6 Updated integration.modules.grains test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
59bdfc532c Updated integration.modules.file test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
cdb5828874 Updated integration.modules.event test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +01:00
Pedro Algarvio
b920ded0b4 Updated integration.modules.django test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
d401041a8d Updated integration.modules.disk test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
d62211f734 Updated integration.modules.decorators test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
423976e5d5 Updated integration.modules.data test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
de4345cf20 Updated integration.modules.cp test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
3f264ae987 Updated integration.modules.config test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
18af333312 Updated integration.modules.cmdmod test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
a3ac939f44 Updated integration.modules.aliases test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
b53da85646 Updated integration.client.syndic test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
f02494002b Updated integration.client.standard test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
7945cbcd6e Updated integration.client.kwarg to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:12:59 +01:00
Pedro Algarvio
2097684c0a Minor formating changes. 2013-06-28 00:12:59 +01:00
Pedro Algarvio
cb0922faf7 Updated some of the test cases to use a much more readable approach using salttesting.helpers.ensure_in_syspath(). 2013-06-28 00:12:59 +01:00
Pedro Algarvio
007545eb70 Fix NameError 2013-06-28 00:12:58 +01:00
Pedro Algarvio
8cd0316b62 Heh! Salt! Not Salt Cloud! 2013-06-28 00:12:58 +01:00
Pedro Algarvio
a21b6e10a5 We don't want the tests in the coverage report. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
819e523c2b Use the defined SALT_ROOT as the source parameter for the coverage call. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
e772f0d8b6 Re-use salt-testing mixin. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
77e108a281 Removed duplicate variables moved some others. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
b17bc305c8 Reuse salt-testing shell test case. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
7990165e26 Remove debug logic to test coverage. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
3033e0002b Let's make use of salt-testing code coverage testing option parser. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
1473a0a3b6 Make use of the SaltTestcaseParser added to salt-testing. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
9cd7efb0dc Only update sys.path once. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
6dfe563ce1 Added support for __main__ execution. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
d245b17412 Added support for __main__ execution and formatting fixes. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
be6814fe52 Added support for __main__ execution and formatting fixes. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
2453535d9f Added support for __main__ execution and formatting fixes. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
b0d9cf18c2 Added support for __main__ execution and formatting fixes. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
663f54ef9f Update copyright years of changed files. Added __main__ execution to tests/integration/states/pip.py. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
0a9f157262 Update sys.path before import salt. This way salt does not need to be installed. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
222be7b446 Make sure every test module is runnable by __main__.
* Double to single quotes
2013-06-28 00:12:56 +01:00
Pedro Algarvio
be54a503d9 Adapted code fix sys.path in case called from __main__. Adapted to salt-testing. 2013-06-28 00:12:56 +01:00
Pedro Algarvio
860f74847e Remove the now unnecessary saltunittest. Moved remaining functionality to integration. 2013-06-28 00:12:56 +01:00
Pedro Algarvio
d4fd1baa2f Adapted the tests suite to work with salt-testing 2013-06-28 00:12:56 +01:00
Pedro Algarvio
576a5a4b78 Some more sysmod testing improvements. 2013-06-27 23:15:36 +01:00
Pedro Algarvio
276858d619 Improve sys.list_functions tests. 2013-06-27 23:00:55 +01:00
ZHANG Cheng
c86564abb1 Fix typo 2013-06-22 23:31:37 +08:00
Thomas S Hatch
3e3cb44acf Merge pull request #5651 from s0undt3ch/issues/5639-hosts
Single entry per line in the hosts file. Fixes #5639
2013-06-20 11:08:36 -07:00
Pedro Algarvio
4040d83d79 Single entry per line in the hosts file. Fixes #5639 2013-06-20 18:29:21 +01:00
Thomas S Hatch
e2d7f21034 @jacksont, please take a look at these, they are failing sometimes 2013-06-20 11:22:59 -06:00
Thomas S Hatch
ec2ab4d5d3 Fix up tests for decorators 2013-06-20 11:21:56 -06:00
Thomas S Hatch
3e7be2bfb4 Add os import to grains tests 2013-06-19 22:45:26 -06:00
Thomas S Hatch
e037283488 Ignore the grains setval test in travis because travis can't keep up 2013-06-19 22:28:53 -06:00
Thomas S Hatch
e30ce41d7a we are far enough removed to not need to test version deps here 2013-06-19 12:43:27 -06:00
Thomas S Hatch
86afd5356c disable faulty djangomod test 2013-06-19 00:35:08 -06:00
Thomas S Hatch
e59a646afa Need to find a way to only bump this up on travis.... 2013-06-19 00:32:08 -06:00
Thomas S Hatch
982df86d6b disable svn tests
These tests are causing problems since the svn repos are not always
returning the same data
2013-06-19 00:24:16 -06:00
Thomas S Hatch
862112c5a6 Fix error created by yaml changes 2013-06-18 23:51:44 -06:00
Thomas S Hatch
17f292a21a Add ignores for loaded depends modules
@jacksont, just fyi, we check the loaded modules for docstrings
2013-06-18 16:38:42 -06:00
Thomas S Hatch
e0c10755b9 Some cleaning of quotes and prints 2013-06-18 16:11:36 -06:00
Thomas S Hatch
86db665d2d kill the print 2013-06-18 15:45:50 -06:00
Thomas S Hatch
535d0a00e3 Finish #5585 2013-06-17 13:05:08 -06:00
ZHANG Cheng
c8aee0451d Make it possible to run a single unit test 2013-06-17 23:38:13 +08:00
Filip Noetzel
f40c2c5204 Fix django tests 2013-06-17 15:49:15 +02:00
Thomas Jackson
3016999c04 Adding "Depends" decorator to salt.utils
The Depends decorator allows you to optionally remove functions if sepecific globals/modules don't exist. This is particuarly helpful in larger scale deployments where some functions of the module work everywhere, but others require (for example) a service to be installed. This way you can avoid having to try/except all over the module to only load certain functions etc.
2013-06-14 15:17:06 -07:00
Thomas S Hatch
f5d4f31952 Doh! node 2013-06-11 16:39:48 -06:00
Thomas S Hatch
fe23e66ce5 Update eventlisten script with sock_dir changes 2013-06-11 16:37:16 -06:00
Thomas S Hatch
36bf8122e9 Merge branch 'timeout-for-run-command' of git://github.com/hulu/salt into hulu-timeout-for-run-command
Conflicts:
	salt/states/cmd.py
2013-06-11 16:30:41 -06:00
Andrew Noyes
c6fd91a8a8 Add timeout to salt.state.cmd.* functions
Add ability to specify timeouts for arbitrary commands.
If timeout is reached, subprocess is sent sigterm, and later sigkill
if it still exists. Issue #5322
2013-06-11 11:41:42 -07:00
Thomas S Hatch
6ae08e504f Merge pull request #5479 from cfra/directory-clean
Improve file.directory for clean=True
2013-06-11 09:46:06 -07:00
Thomas S Hatch
2218dd95a5 Add parse req failure state 2013-06-10 23:00:48 -06:00
Thomas S Hatch
dad4b18c93 Add overstate to check parse failures in requisites 2013-06-10 23:00:22 -06:00
Thomas S Hatch
815cb47a36 Add sls that will fail to parse 2013-06-10 23:00:02 -06:00
Thomas S Hatch
9752b21343 Add tests for overstate requisites 2013-06-10 18:42:54 -06:00
Thomas S Hatch
e228768961 Add overstate to test requisites 2013-06-10 18:42:54 -06:00
Thomas S Hatch
1bcca1aae3 Add a generic failing sls for tests 2013-06-10 18:42:54 -06:00
Christian Franke
e46276db16 Improve file.directory for clean=True
Handle exclude_pat when running with test=True and add
some tests to verify correct behavior.
2013-06-11 02:28:51 +02:00
Tris Forster
714acc50d3 Add success flag to LocalClient.get_full_return() 2013-06-06 10:09:15 +10:00
Thomas S Hatch
f92ceca7b8 Merge pull request #5385 from hulu/del-is-not-a-func
rm unnecessary parens around 'del'; it's not a function
2013-06-04 08:25:24 -07:00
Chris Rebert
31e5c275c5 rm unnecessary parens around 'del'; it's not a function 2013-06-03 11:53:04 -07:00
Chris Rebert
a6a356a3e4 runtests.py: use except-as syntax 2013-06-03 11:45:44 -06:00
Pedro Algarvio
8938b93b3f Run our own API based coverage 2013-06-02 09:07:39 +01:00
Pedro Algarvio
a61273bd71 Finally working. Cleaning up. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
662f5b23ca Output the coverage pickled data. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
63859e2915 Even more info from travis env. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
51460af985 Fix SyntaxError. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
5ec8147fbb Add the .coveragerc file and some debugging output to see if the coverage file is generated. 2013-05-31 12:48:52 +01:00
Pedro Algarvio
852e38658b Let's know where(CWD) is the suite running from. 2013-05-31 12:48:52 +01:00
Thomas S Hatch
324f048ae5 Raise sleep here because travis is SLOW 2013-05-31 02:00:56 +00:00
Thomas S Hatch
753355c501 Add tests to check cross minion validity in the mine
Tests for #5281
2013-05-29 21:26:55 +00:00
Ollie Walsh
32b80759d7 Reuse virtualenv for all supervisor tests 2013-05-29 12:54:57 +01:00
Ollie Walsh
59dbcc4375 Merge branch 'develop' into supervisor-fixes 2013-05-29 12:37:13 +01:00
Ollie Walsh
1eca34f8e6 Give supervisor a little time to startup during tests 2013-05-29 11:39:09 +01:00
Thomas S Hatch
82dde7d7e7 Add a sleep to give the minion a chance to catch grain refresh in test 2013-05-29 00:12:30 -06:00
Thomas S Hatch
90c5cc8c4d list_, not _list 2013-05-28 23:54:38 -06:00
Ollie Walsh
4948914766 Add missing test file 2013-05-29 00:47:25 +01:00
Ollie Walsh
57cba99b06 Supervisor module:
Support running supervisor from a virtualenv/custom path.
Support custom supervisor config file.
Create real tests using a virtual environment.

Supervisor state:
Fix restart when process is already running.
Support restart on watch.
Create real tests using a virtual environment.
2013-05-29 00:18:12 +01:00
Thomas S Hatch
ab9fbc94e7 Single quotes 2013-05-28 15:09:40 -06:00
Thomas S Hatch
95780ff219 Fix ref no non func alias in rvm test 2013-05-28 14:53:40 -06:00
Thomas S Hatch
8d018e0b8c make gem test ref non func alias 2013-05-28 14:35:26 -06:00
Thomas S Hatch
2b917aef23 Add loop_interval to minion config for tests 2013-05-28 14:27:01 -06:00
Thomas S Hatch
c4c2b7936a Add tests for mine.send 2013-05-26 08:55:18 -06:00
Thomas S Hatch
49db655fd5 Add master side capability to make mine accept single funcs 2013-05-26 07:18:12 -06:00
Thomas S Hatch
d48702aaa5 Add mine_functions to grains 2013-05-26 06:59:13 -06:00
Thomas S Hatch
562fbdaed2 Add grains.get test 2013-05-26 06:11:59 -06:00
Thomas S Hatch
04ad87f9fb Add test to grains.setval 2013-05-26 04:11:42 -06:00
Thomas S Hatch
98bb5335df Disable failing config.manage_mode test, we will need to clean this 2013-05-26 03:52:22 -06:00
Thomas S Hatch
cf69f2d004 Add manage_mode test 2013-05-26 03:44:22 -06:00
Thomas S Hatch
f71a4ee2c8 Add more checks to config 2013-05-26 03:42:41 -06:00
Thomas S Hatch
44d1123291 Start on config module tests 2013-05-26 00:32:57 -06:00
Thomas S Hatch
e6c369c5ec Add opts to master file to test config module 2013-05-26 00:31:43 -06:00
Thomas S Hatch
25fd45a688 Make --name a little more clear 2013-05-26 00:08:52 -06:00
Thomas S Hatch
340b45d801 fix pydsl test 2013-05-18 22:58:08 +00:00
Thomas S Hatch
6b01c8380d Add pydsl runtime test per #5055 2013-05-18 22:51:53 +00:00
Thomas S Hatch
123d52bdc6 Can't serialize pydev/stateconf, start on #5055 2013-05-18 22:47:14 +00:00
Matt George
ecdff63b6e added ability to activate a virtualenv before
running pip install
2013-05-17 13:56:09 -05:00
Sylvain Fankhauser
101b9d2f2e Rename build_whitepace_splited_regex to build_whitespace_split_regex 2013-05-15 12:48:08 +02:00
Thomas S Hatch
f1697aea5b Fix test where the absence of mock breaks things 2013-05-07 22:42:08 -06:00
Thomas S Hatch
367927b3d3 Fix #4912
Clint, this fixes it for me and still logicaly verifies the test
let me know if this works on your end
2013-05-07 22:36:34 -06:00
Thomas S Hatch
6d6daa00ec Merge pull request #4832 from 11craft/4805-pip-no-chown
Introduce `no_chown` option to pip-related functions
2013-05-07 09:56:36 -07:00
Daniel Watkins
7e7bf244c7 Move caching of requirements to helper function and add unit tests. 2013-05-07 10:20:56 +01:00
Matthew Scott
24d11b3274 Introduce no_chown option to pip-related functions - #4805
Affected functions:
- `pip.install`
- `pip.installed`
- `virtualenv.managed`

When using `runas` in conjunction with a local-filesystem `requirements` file with these functions,
`pip.install` will create a temporary copy of the requirements file,
then change ownership of that file to the `runas` user.

The purpose of this is to avoid file permission errors when accessing the original requirements file.
However, this breaks when that file has a "-r otherfile.txt" line.

In these cases, set `no_chown` to `True`.
The original path to the requirements file will be kept,
and other requirements files included from the top-level file will be correctly found.
2013-05-04 22:16:39 -05:00
Thomas S Hatch
1427ef1f81 Merge pull request #4816 from hulu/except-as-tests
standardize to modern 'except FooError as err:' syntax in test files
2013-05-03 21:56:19 -07:00
Chris Rebert
c487d86fff tests: standardize to modern 'except FooError as err:' syntax 2013-05-03 19:55:50 -07:00
Chris Rebert
c7ff123a0f use genexpr & list comp in minionswarm test 2013-05-03 19:45:19 -07:00
Ales Zoulek
383e1fa01c Fixing invalid assumption on group name in tests
* fixed invalid assumption in file module tests that all linux platforms have
groups with the same name as users (joe:joe etc.). But for
example ArchLinux has only joe:users.

* file module tests now loads user's canonical group name from pwd and
grp python module instead.
2013-05-03 11:47:08 +02:00
Thomas S Hatch
829b2ca993 sort directory data to ensure consistent data set 2013-05-02 23:23:22 -06:00
Thomas S Hatch
f65515d57c Fix safe_walk test 2013-05-02 23:07:06 -06:00
Daniel Miller
b5d130cc3a Fix symlink recursion in salt.utils.safe_walk 2013-05-02 13:32:21 -04:00
Chris Rebert
498d2999db more typo fixes 2013-05-01 16:52:52 -07:00
Chris Rebert
26209c1fc1 rm unused imports reported by pyflakes 2013-04-30 14:48:04 -07:00
Chris Rebert
9ed364980d is not 0 => != 0 2013-04-30 10:32:21 -07:00
Thomas S Hatch
ab5f540430 Merge pull request #4232 from tohojo/ipv6-support
IPv6 support for master-minion communication
2013-04-28 18:34:28 -07:00
Pedro Algarvio
397418dad7 We're no longer leaking threads. Travis-CI should be OK with 10 worker threads. 2013-04-28 08:16:54 +01:00
Pedro Algarvio
c4e96207cb runas needs root permissions. 2013-04-27 21:06:13 +01:00
Pedro Algarvio
b88d901b78 Allow the event listener to work with the test sockets. And even for the minion's 2013-04-27 20:39:33 +01:00
Thomas S Hatch
cebdf76f2e Fix publish tests 2013-04-27 12:59:34 -06:00
Pedro Algarvio
a43e0132f1 Improve logging logic in salt/template.py. Allow the test suite to set more logging levels. 2013-04-27 09:56:24 +01:00
Pedro Algarvio
a4e9e196a3 Improve information available and handle IndexError in our salt asserts mix-in. 2013-04-25 20:59:34 +01:00
Pedro Algarvio
abd2dc23f1 Handle publish tests a little better. Still not fixed though. 2013-04-25 20:58:54 +01:00
Pedro Algarvio
55b166f38c Fix issues around salt.modules.file, salt.states.files and respective tests.
* Updated `salt.modules.file.makedirs` to properly work. Any path passed to this function should be a directory, ie, if `/tmp/foo/bar` is passed, `/tmp/foo/bar` should be a directory, not `/tmp/foo`.
* Since `salt.modules.file.makedirs` was updated, `salt.states.file.append` needed to be updated to pass the proper directory to create.
* Minor formatting change
2013-04-25 16:36:19 +01:00
Pedro Algarvio
2552f2cfc3 Join the processes in order to wait for them to finish. 2013-04-24 22:31:57 +01:00
Pedro Algarvio
7eed841ba6 Fix the salt.modules.hosts tests and even test if order is preserved when writing the new file. 2013-04-23 12:56:23 +01:00
Pedro Algarvio
5f58f0d28b We need OrderedDict support. So, as a last resort, provide our own.
* We try to import `OrderedDict` from the standard library, which is only available on python >= 2.7, if `ImportError` is raised we try to import it from `ordereddict`, a package available in PyPi. As a last resort, we provide our own implementation based on http://code.activestate.com/recipes/576669/.
* Update all code requiring `OrderDict` to use our compatible import module.
2013-04-23 12:56:23 +01:00
Pedro Algarvio
eeda1698ff Simplify and fix tests for salt.modules.hosts. 2013-04-23 12:56:23 +01:00
Pedro Algarvio
b36747b084 pkg.expand_repo_def is allowed to fail on the sysmod integration tests. 2013-04-22 22:40:15 +01:00