Commit Graph

991 Commits

Author SHA1 Message Date
Pedro Algarvio
1068406ca5 Fixed integration.states.pip.PipStateTest.test_pip_installed_errors error regex.
It was failing to match on FreeBSD.
2013-08-14 12:29:34 +01:00
Pedro Algarvio
a1cd0ef29d Show what the salt function returned in case of assertion errors. 2013-08-14 00:35:58 +01:00
Pedro Algarvio
90d375d14e If SHELL is not in the environ, the error message is different. 2013-08-13 14:17:41 +01:00
Thomas S Hatch
bb45a8b9f2 sleep longer for grains test if first return is bad 2013-08-13 00:35:55 -06:00
Thomas S Hatch
33cdd9e760 Don't fail on valid order change 2013-08-13 00:32:32 -06:00
Thomas S Hatch
53f7227fdd Add freebsd to grp covered platforms 2013-08-13 00:27:14 -06:00
Thomas S Hatch
de53840457 Reduce test suite worker threads to 3, the peer system does not
need extra procs anymore
2013-08-12 22:33:59 -06:00
Pedro Algarvio
799ff82f02 The test case should be executed in the test virtualenv for proper cleanup. 2013-08-12 13:36:52 +01:00
Thomas S Hatch
6d4af97e17 put a sleep back on grains.setval test for new jenkins stuff 2013-08-10 22:33:02 -06:00
Pedro Algarvio
8d35a82920 Skip test instead of returning. 2013-08-10 19:50:31 +01:00
Thomas S Hatch
b09114ec1d avoid key error is not SHELL env var 2013-08-10 12:14:10 -06:00
Erik Johnson
113e5e9b52 Update assert in test_pip_installed_weird_install
Pull #6574 changed the state output slightly, breaking this test. This
commit fixes the test.
2013-08-08 18:43:44 -05:00
Pedro Algarvio
c072fa0241 Also deprecate runas on salt.states.pip.
* Added mock tests to check if the deprecation is triggered, and to see if the deprecation is also returned to the user in a warnings key.
2013-07-27 15:58:28 +01:00
Erik Johnson
d36fa57595 Change runas to user for pip module tests 2013-07-26 18:40:36 -05:00
Pedro Algarvio
7aed6aeb30 Actually, the Syndic config test case can be a simple unit test. 2013-07-17 16:43:18 +01:00
Pedro Algarvio
e467b1e00b Simplify the Syndic configuration testing.
* Inherit the master configuration file on the syndic one.
* Recreate the Syndic on the test. Don't pass it as a module global.
2013-07-17 16:22:18 +01:00
Pedro Algarvio
54ea179467 Only create TMP if it doesn't already exists (hint: --no-clean) 2013-07-17 12:34:36 +01:00
Mathieu Le Marec - Pasquet
cff1fa6f53 fix/feat: let the syndic be way more configurable
- Fix micmac between configs
- Add options to configure pidfile, logfile, masterofmaster port

This fixes #6024.
2013-07-15 20:30:26 +00: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
a886eaa03d Add a state integration test case for #5940. 2013-07-05 23:00:14 +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
dea912d8a0 The result of ssh_known_hosts changed in 8f728fb, so should the test case. 2013-07-02 11:25:11 +01: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
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
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
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
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
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
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
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
Chris Rebert
31e5c275c5 rm unnecessary parens around 'del'; it's not a function 2013-06-03 11:53:04 -07: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
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
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
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
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
Chris Rebert
c487d86fff tests: standardize to modern 'except FooError as err:' syntax 2013-05-03 19:55:50 -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
Chris Rebert
498d2999db more typo fixes 2013-05-01 16:52:52 -07:00
Chris Rebert
9ed364980d is not 0 => != 0 2013-04-30 10:32:21 -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
Thomas S Hatch
cebdf76f2e Fix publish tests 2013-04-27 12:59:34 -06: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
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
Pedro Algarvio
50a12a13f5 kwargs should be passed as kwarg to client.cmd. 2013-04-22 22:04:33 +01:00
Pedro Algarvio
7836a26c97 Reduce timeout's by a third. 2013-04-22 19:39:02 +01:00
Denis Generalov
56f221018d * fix bt if environment empty or absent
* fix tests
2013-04-10 16:24:41 +04:00
Jason R. McNeil
b4b8c191e2 Darwin (OS X) sysctl support.
I don't recall linux sysctl output being as messy as what I see on 10.8, so this module still needs some work I think to prevent it from choking on the odd output.
2013-04-01 00:36:38 -07:00
Thomas S Hatch
a85d1d4da1 Add extra not to file path, another test is laying it down
which was breaking this one
2013-03-23 14:41:27 -06:00
Colton Myers
357b0596e2 Fix lambda (last time?)
Apparently I have no idea what I'm doing.
2013-03-21 16:50:28 -06:00
Colton Myers
f69e305df4 Fix it so we define patch correctly
Must be a function that returns a function, so it works as a decorator
2013-03-21 16:46:03 -06:00
Colton Myers
50084125be Can't use pass in lambdas 2013-03-21 16:35:34 -06:00
Colton Myers
93ef23f03c Make sure patch is defined (otherwise the decorator complains) 2013-03-21 16:32:09 -06:00
Colton Myers
9222114c2b Serious PEP8 and styling fixes 2013-03-21 16:22:29 -06:00
Colton Myers
adc5433174 Remove trailing whitespace and tabs 2013-03-21 16:15:26 -06:00
Colton Myers
cde87e8cd3 Wrap mock import in try-except, skip if not available 2013-03-21 16:13:53 -06:00
Jim Dalton
c774eccb1f Skip these tests if svn is not available. 2013-03-18 15:19:35 -07:00
Jim Dalton
316a7d9d2d Add tests for states.svn. Ensure svn.latest includes changes in return 2013-03-16 07:33:04 -07:00
Roberto Aguilar
9631a63cb6 Added show_diff kwarg to file.managed.
This can be set on a per-file basis so that potentially-sensitive
content can be omitted from logs.
2013-03-13 11:07:56 +00:00
Pedro Algarvio
a639b0f0e6 Merge branch 'develop' of github.com:saltstack/salt into hotfix/fix-travis-again 2013-03-13 01:32:49 +00:00
Pedro Algarvio
c0ead8b2dc Fix a misplaced continue on the grains matching logic which caused a traceback.
```
[21:18:46,004 [salt.utils.minions                          :200 ][ERROR   ] Failed matching available minions with grain pattern: planets:saturn
Traceback (most recent call last):
  File "/home/ubuntu/salt/salt/utils/minions.py", line 197, in check_minions
      }[expr_form](expr)
        File "/home/ubuntu/salt/salt/utils/minions.py", line 119, in _check_grain_minions
    str(match.lower()),
    AttributeError: 'list' object has no attribute 'lower'
```
2013-03-13 01:02:15 +00:00
Colton Myers
b473e6882f Remove empty group tests (you can't have a user in no groups) 2013-03-12 15:19:03 -06:00
Pedro Algarvio
e052116d32 Add back test_user_if_present_with_gid.
Some systems have the nobody user with the nogroup instead of nobody as it's group.
2013-03-12 07:22:52 +00:00
Thomas S Hatch
4720093d66 Remove faulty test
Can't pass a group name in as the gid, a gid is required
2013-03-12 00:11:48 -06:00
Thomas S Hatch
dbd0b386dc single quotes 2013-03-12 00:00:30 -06:00
Thomas S Hatch
a4ca7a5f6f Change to a symlink that does not exist 2013-03-11 23:44:31 -06:00
Thomas S Hatch
d70ecc8387 Update doc test to -d changes 2013-03-11 23:27:18 -06:00
Pedro Algarvio
acb866762e Fix expected comment in testcase states.pip.PipStateTest.test_pip_installed_weird_install. 2013-03-12 04:03:12 +00:00
Thomas S Hatch
0d8574344d stub out event fireing test until we can acertain what is wrong
The events are getting cleanly fired, but the test is failing....
2013-03-11 17:09:56 -06:00
Roberto Aguilar
37be12ed37 Updated environment test to use mock library. 2013-03-11 21:54:10 +00:00
Pedro Algarvio
cf75fc4ffb Fix the sysmod examples regular expression to accept both examples and Examples. 2013-03-09 16:07:19 +00:00
Jeroen Dekkers
b40242e409 Make ssh key regular expression more strict 2013-03-08 15:01:58 +01:00
Roberto Aguilar
f942ed6097 Added test for clean environment. 2013-03-02 23:04:04 -08:00
Pedro Algarvio
fc44fde3e3 Improve example matching. 2013-02-17 13:23:51 +00:00
Pedro Algarvio
94455dace6 Show useful information from the failing test. 2013-02-17 12:52:36 +00:00
Thomas S Hatch
f65626db0b Update pydsl tests, still failing though 2013-02-09 15:07:59 -07:00
Thomas S Hatch
68b5d29ea6 Get tests runnign until pydsl migration is complete 2013-02-08 13:21:35 -07:00
Thomas S Hatch
3719982399 stub out another event test that needs refinement 2013-02-08 13:14:45 -07:00
Thomas S Hatch
107b97e952 Add test to verify loader modules 2013-02-08 11:14:22 -07:00
Thomas S Hatch
3d006ddd1c Stub out unreliable event test until it can be stabalized 2013-02-08 11:07:40 -07:00
Thomas S Hatch
3d1cf71a77 Combine compound matcher tests 2013-02-08 10:57:20 -07:00
Colton Myers
bae02c930e Add None checks for eventfired in event.py 2013-02-07 17:51:32 -07:00
Thomas S Hatch
5b16fed6cc remove unused import 2013-02-07 17:39:20 -07:00
Thomas S Hatch
8fb36351b3 remove unused import 2013-02-07 17:38:36 -07:00
Thomas S Hatch
52be720d62 Remove unused grains lookup 2013-02-07 17:37:13 -07:00
Colton Myers
37b025490b Fix indent style issue 2013-02-07 17:31:10 -07:00
Colton Myers
53f1c86013 Add pip.py test for upgrading packages 2013-02-07 17:31:10 -07:00
Thomas S Hatch
c5f5bd1e99 Fix tests to better reflect doc matching updates 2013-02-07 15:11:42 -07:00
Thomas S Hatch
4ec6722103 revert cmd_yaml change that broke basic functionality 2013-02-06 13:03:34 -07:00
Thomas S Hatch
47e08fc4fa Remove failing test, I am not sure how it ever passed... 2013-02-06 12:48:33 -07:00
Pedro Algarvio
aa721e89cf Fix integration.shell.call.CallTest.test_default_output. 2013-02-06 05:13:39 +00:00
Denis Generalov
9325ec7bba Try to make some tests for sysctl module 2013-02-06 00:57:53 +04:00
Thomas S Hatch
a6df51ab1a Fix test failure due to update in the default nested outputter 2013-01-29 10:23:22 -07:00
Thomas S Hatch
a58202c2f7 Add compound matcher tests 2013-01-29 10:20:02 -07:00
Thomas S Hatch
dd28185763 Merge pull request #3459 from archtaku/tests
Add tests for nested grain/pillar matching
2013-01-25 22:24:42 -08:00
Erik Johnson
77eeb47bea Add tests for nested grain/pillar matching
Also added tests for traditional grain matching when target grain is a
list.
2013-01-26 00:13:51 -06:00
Thomas S Hatch
4c95f0e0ea fix #3449 2013-01-25 21:16:11 -07:00
Pedro Algarvio
eb38c4de5f Fix supervisor test. 2013-01-23 23:23:05 +00:00
Pedro Algarvio
34522907e8 One more grain.item fix to comply with new dict output. 2013-01-23 23:00:19 +00:00
Pedro Algarvio
0207416f3c Conform with the dict return type for 'salt.modules.grains.item'. 2013-01-23 22:51:45 +00:00
Thomas S Hatch
86ed822148 Single quotes 2013-01-19 18:22:54 -07:00
Thomas S Hatch
bbad93c386 Add skipif to a test that requires root 2013-01-17 13:29:49 -07:00
Pedro Algarvio
dcb8477f7d Fix phrasing. 2013-01-16 00:11:48 +00:00
Pedro Algarvio
d2f5461a09 Fix the test skip in case of a lower git describe parsed version info. 2013-01-16 00:02:20 +00:00
Pedro Algarvio
44b45ffa0c Too much spaces(PEP-8). 2013-01-15 22:55:20 +00:00
Pedro Algarvio
b1488b61c5 Fix integration.shell.key output tests. 2013-01-15 21:53:29 +00:00
Thomas S Hatch
603be37e2b Merge pull request #3280 from s0undt3ch/develop
Several deprecation fixes, enhancements, clarifications, for 0.12
2013-01-15 13:43:53 -08:00
Pedro Algarvio
b9afd32994 If the parsed version info is higher, then we're most likely about to release a new salt version. 2013-01-15 19:42:24 +00:00
Pedro Algarvio
4adaab4dce Update tests to the new deprecation message. 2013-01-15 19:42:01 +00:00
Pedro Algarvio
392bb8ce1d Remove the deprecation config tests. Lower the salt call's timeout to 30 secs. Refs #3271. 2013-01-15 19:19:57 +00:00
Pedro Algarvio
9e804add7a Simplify logic of getting the temporary directory. 2013-01-15 17:50:09 +00:00
Pedro Algarvio
d61ef51e7a Show why git describe failed on the tests. 2013-01-15 14:16:39 +00:00
Thomas S Hatch
89525ad6d0 remove pre 0.12.0 test handles 2013-01-15 00:10:19 -07:00
Thomas S Hatch
4617a931be Remove debugging pprint 2013-01-14 23:53:18 -07:00
Thomas S Hatch
1ddcd715fb Reached 0.12, fix outputter test 2013-01-14 23:40:20 -07:00
Thomas S Hatch
ad452f0b64 clean up stray prints 2013-01-14 23:08:36 -07:00
Thomas S Hatch
7c8ca7e1d6 remove recursive git test
The problem here is that we will need to create a small static
git repo somewhere first, relying on the mozilla one causes
other tests to fail due to timeouts and makes the test run VERY
long
2013-01-14 22:55:24 -07:00
Thomas S Hatch
2ca04f4671 Stop downloading giant git repos in the test suite
THIS WAS NOT OK!!!
2013-01-14 22:51:21 -07:00
Thomas S Hatch
a24ff1852a remove unused import 2013-01-14 21:50:56 -07:00
Pedro Algarvio
0bf51ba5b0 Allow a test to specify it's own run_function timeout. Increase timeout for some tests. 2013-01-14 14:07:58 +00:00
Pedro Algarvio
36955b4560 Fix integration.shell.matcher.MatchTest.test_ipcadr.
Was skipping because of the latest output changes and how output parsing was done.
2013-01-14 13:04:23 +00:00
Pedro Algarvio
2f3bb49f83 Fix getting the output of git describe into salt's version string. Added a test case for this too. 2013-01-14 12:35:42 +00:00
Pedro Algarvio
e9ca0a26d7 A little longer timeout. 2013-01-13 18:18:34 +00:00
Pedro Algarvio
3ff77c1958 Wait for the integration tests local client cmd's for, at most, 30 seconds. 2013-01-13 12:49:10 +00:00
Pedro Algarvio
633a313587 Lower integration tests local client timeout to 5 minutes. 2013-01-13 11:31:04 +00:00
Thomas S Hatch
bdae844eec fix outputter tests that come with changes in the default outputter 2013-01-13 00:01:30 -07:00
Pedro Algarvio
fd2739401c Adapt to the new local client events changes. Fixes #3214. 2013-01-11 19:03:53 +00:00
Pedro Algarvio
39f03c59cd The test suite local client now properly receives the events. Fixes #3214.
* We were instantiating the integration testing local client too soon in the process. Deferring it to a little latter made it all work.
* Added the ability to dump the master and minion testing configurations to files. Just prepend the `runtests` call with `DUMP_SALT_CONFIG=1` and you'll get the computed configuration files in `/tmp/salttest/{master,minion}`.
* We now also un-subscribe from the event's once done.
* Added `salt.utils.event.LocalClientEvent` just to differentiate from `salt.utils.event.MasterEvent` in the logs so we know who's who. It's just a subclass of the latter.
2013-01-11 16:21:04 +00:00
Thomas S Hatch
d95a8e612f clean up some double quotes 2013-01-10 00:25:02 -07:00
Jeff Schroeder
8b74360493 Skip the git state tests if a dns lookup to github.com fails
This is the quickest clever thing I could think of while running the
unit tests offline in the car during a long road trip.
2012-12-21 23:32:11 -06:00
Jeff Schroeder
4da4dc25a1 Skip the virtualenv state test if virtualenv isn't installed 2012-12-21 21:35:58 -06:00
Ryan Schneider
8f8cc74b34 Some minor cleanup of unit and integration tests. 2012-12-18 17:39:16 -08:00
Pedro Algarvio
ab74952a37 Since salt versioning changed, so should the depending deprecations.
The are some output parser options which should be triggering warnings salt 0.10.6 and should start triggering failures when 0.10.7 came out. Adapt these dependable deprecations to the new versioning convention.
2012-12-15 00:13:31 +00:00
Thomas S Hatch
aa1c55f610 Add tests for pillar matching list objects Fix #2761 2012-12-12 16:37:21 -07:00
Thomas S Hatch
f94637b4b4 Add a pilla rlist to test advanced pillar matching 2012-12-12 16:30:17 -07:00
David Boucha
6765a56032 Use TMP_STATE_TREE 2012-12-12 11:49:28 -07:00
David Boucha
dbc5d4ca9c Fixes #2594 Verify that changes in req file work
After the first invocation of this venv, new additions to the
requirements.txt would not be honored.
2012-12-12 11:49:28 -07:00
Pedro Algarvio
c0455f8fa9 Support creating state files at runtime.
We now support runtime created files that can be used like `salt://my-temp-file.txt`.
Just make sure you write them to `os.path.join(integration.TMP_STATE_TREE, 'my-temp-file.txt')`.
2012-12-12 18:38:39 +00:00
Pedro Algarvio
952779aa26 More code reuse in SaltReturnAssertsMixIn.
The methods `assertSaltTrueReturn`, `assertSaltFalseReturn` and `assertSaltNoneReturn` now reuse the code from `__getWithinSaltReturn` making `__assertReturn` obsolete and for that removed.
2012-12-12 17:11:44 +00:00
Pedro Algarvio
b9e72e7c3c Abstract SaltReturnAssertsMixIn to allow more tests using it.
* Created a method which gets a deep keyed value in a salt state return. For example, allow getting, `ret['changes']['new']`.
* Created a method which tries to make sure the correct type of the passed keys for the above added method.
* Also added were the methods, `assertInSaltReturn`, `assertNotInSaltReturn`, `assertInSaltReturnRegexpMatches`, which simplified the existing `assertInSaltComment`, `assertNotInSaltComment`, `assertSaltCommentRegexpMatches`, `assertSaltStateChangesEqual` and `assertSaltStateChangesNotEqual`, also allowing to do similar tests in every key(deep or not) of a salt state return dictionary.
2012-12-12 13:38:03 +00:00
Pedro Algarvio
7c6feb8c18 Fix a bug! It's basestring not string. 2012-12-12 00:33:54 +00:00
Ramón Cahenzli
a30f2ee244 This root or that root? :) 2012-12-11 16:37:30 +01:00
Pedro Algarvio
7c5a5d0bd3 Header updates. More copyright to the SaltSatck team. Code author to me(where applicable). 2012-12-11 10:23:37 +00:00
Pedro Algarvio
5ca7762784 Don't switch assertion case. Fix test. 2012-12-07 19:05:19 +00:00
Pedro Algarvio
871516b4cf Migrated test.integration.modules.state to use SaltReturnAssertsMixIn. 2012-12-07 18:44:06 +00:00
Pedro Algarvio
4348734697 Add integration.SaltReturnAssertsMixIn where it was lacking in previous commits. 2012-12-07 17:13:58 +00:00
Pedro Algarvio
0baa63c19f Remove deprecated tests functions.
Removed `ModuleCase.assert_success()` and `ModuleCase.state_result()` which are now better tested using `SaltReturnAssertsMixIn`
2012-12-07 17:09:11 +00:00
Pedro Algarvio
e03a2606a1 Migrated test.integration.states.supervisord to use SaltReturnAssertsMixIn. 2012-12-07 17:03:24 +00:00
Pedro Algarvio
cbea092b0c Migrated test.integration.states.rabbitmq_* to use SaltReturnAssertsMixIn. 2012-12-07 17:01:31 +00:00
Pedro Algarvio
fc3b272809 Migrated test.integration.states.pip to use SaltReturnAssertsMixIn.
* Added `assertSaltCommentRegexpMatches()` to `SaltReturnAssertsMixIn` to add the ability to match salt comments using regular expressions.
2012-12-07 16:59:24 +00:00
Pedro Algarvio
156ce07bde Migrated test.integration.states.host to use SaltReturnAssertsMixIn. 2012-12-07 16:35:20 +00:00
Pedro Algarvio
c1c3b31d0b Migrated test.integration.states.git to use SaltReturnAssertsMixIn. 2012-12-07 16:33:38 +00:00
Pedro Algarvio
b210d59eb8 Migrated test.integration.states.file to use SaltReturnAssertsMixIn. 2012-12-07 16:25:26 +00:00
Pedro Algarvio
4b1747468b Adapted tests.integration.states.ssh to use SaltReturnAssertsMixIn.
* Two new methods were added to `SaltReturnAssertsMixIn`, `SaltReturnAssertsMixIn.assertSaltStateChangesEqual()` and `SaltReturnAssertsMixIn.assertSaltStateChangesNotEqual()`, in order to be able to test salt state returns. These methods, besides asserting that the state was correctly applied using `SaltReturnAssertsMixIn.assertSaltTrueReturn()`, are also able to test for what's in the `changes` key of salt's return, it can even "go inside" the `changes` dictionary, just have a look at what was done in `tests.integration.states.ssh`.
2012-12-07 12:46:02 +00:00
Pedro Algarvio
6c22f65a56 test_issue_2731_masterless() should clean-up after. 2012-12-05 21:24:19 +00:00
Pedro Algarvio
957f9c61b7 Quiet down these tests a little bit. 2012-12-04 19:14:35 +00:00
Pedro Algarvio
2d15b79114 Fix sync minions Process target. Correct sync'ed output. 2012-12-04 17:36:45 +00:00
Pedro Algarvio
65094c744a Stop using py27_subprocess under python 2.6 2012-12-04 16:29:53 +00:00
Pedro Algarvio
42799e0953 Fix '--clean/--no-clean' logic needed to sync minions. 2012-12-04 13:36:33 +00:00
Pedro Algarvio
f66c7741ff Allow more time for minions to sync. 2012-12-04 13:02:56 +00:00
Pedro Algarvio
a004639b99 Reuse getting a local client code with SaltClientTestCaseMixIn. 2012-12-04 11:51:37 +00:00
Pedro Algarvio
08aaecee12 Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources 2012-12-04 00:55:50 +00:00
Pedro Algarvio
b0f594f452 run_script timeout's are not supported under windows. 2012-12-03 23:58:08 +00:00
Pedro Algarvio
3b0388c8f4 Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources 2012-12-03 23:42:23 +00:00
Pedro Algarvio
b866ca3af0 Just detach from parent group. 2012-12-03 23:41:45 +00:00
Pedro Algarvio
9e89f357aa Remove unused code. 2012-12-03 23:36:20 +00:00
Pedro Algarvio
5d274e8b7d Let's keep using multiprocessing. 2012-12-03 23:35:32 +00:00
Pedro Algarvio
2246bf3d33 Remove unused code. 2012-12-03 23:32:58 +00:00
Pedro Algarvio
7b10a7cd64 Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources 2012-12-03 23:31:29 +00:00
Pedro Algarvio
a9669acf3a Kill tests run_script shell and it's children. 2012-12-03 23:30:21 +00:00
Pedro Algarvio
c89a6788f4 Is this what's needed under python 2.6 for tests to complete? 2012-12-03 21:07:51 +00:00
Pedro Algarvio
bd930cddec Include a test case for #2731 2012-12-01 23:00:27 +00:00
Pedro Algarvio
c4e485a8bf Allow setting a max time for a test run_script to execute and return. 2012-12-01 22:58:19 +00:00
Pedro Algarvio
c9cb4c220c Only sync minions modules if they're not already up to date. 2012-12-01 18:12:59 +00:00
Pedro Algarvio
6c37923226 Remove extra space. 2012-11-30 17:33:20 +00:00
Pedro Algarvio
db344ea342 Fix integration.modules.django.DjangoModuleTest.test_collectstatic(), PEP-8. Refs #2729. 2012-11-30 17:13:12 +00:00
Henrik Holmboe
acc49904cd Remove references to pub_refresh.
The configuration option was removed in 0.10.5.
2012-11-29 16:44:49 +01:00
Thomas S Hatch
1c2f4c96c4 Merge pull request #2730 from s0undt3ch/issues/2726
Fix #2726
2012-11-28 10:56:35 -08:00
Pedro Algarvio
d4005bee3d We now warn the users about misusing mode in file.recurse. Fixes #2726.
* Extended `SaltReturnAssertsMixIn` by adding `assertNotInSaltComment`.
* Fixed minor `tab` instead of spaces in `salt.states.file` code.
2012-11-28 17:57:44 +00:00
Pedro Algarvio
c782eae106 Extended SaltReturnAssertsMixIn and included a test case which triggers #2726.
* Extended `SaltReturnAssertsMixIn`, `assertInSaltComment`, which allows to see if a string is in a salt's returned comment.
2012-11-28 17:35:25 +00:00
Stanis Trendelenburg
2f8b122af5 Correctly handle empty group list in user.present
- In states.user.present, differentiate between None and empty list for
  'groups': The empty list means the equivalent to passing '-G ""' to usermod,
  i.e. remove all but the default group.

- In modules.useradd, always quote the value passed after the '-G' switch to
  usermod and useradd, so they don't fail when we pass an empty string.
2012-11-28 01:28:42 +01:00
Pedro Algarvio
bd552ef4a8 Migrate some of the Vagrant branch improved minions wait and sync code. 2012-11-26 05:44:18 +00:00
Pedro Algarvio
74aeeab5e5 Add some color when a test minion connects(trigger a Travis build). 2012-11-26 04:32:25 +00:00
Pedro Algarvio
fd283e9689 Improved SaltReturnAssertsMixIn.
* Added `assertReturnSaltType` which is dictionary for non errors.
* Added `assertReturnNonEmptySaltType` which does the above and makes sure it's not empty.
* Fix `tests.integration.states.user.UserTest` which was using wrongly using `assertSaltTrueReturn` on 'user.info' calls.
2012-11-25 22:29:08 +00:00
Pedro Algarvio
9e8d27e81b Do assertSaltTrueReturn on each of the salt calls. 2012-11-25 22:28:30 +00:00
Pedro Algarvio
ee8a4faccc Make sure that parts are also dictionaries. 2012-11-25 20:11:24 +00:00
Thomas S Hatch
a343421f41 Merge pull request #2678 from s0undt3ch/develop
Add `tests.saltunittest.RedirectStdStreams`.
2012-11-23 08:53:31 -08:00
Pedro Algarvio
a6fd9bb60f Add tests.saltunittest.RedirectStdStreams.
* The `RedirectStdStreams` tests helper will allow to temporarily catch `stdout` and `stderr` output. Right now it's only used to **mute** the `tests.integration.runners.jobs.ManageTest.test_active()` output.
2012-11-23 12:19:09 +00:00
Johannes Martinsson
e1bc7f2b5a Make remove in the file module also remove broken symlinks
The remove command in the file module had guard, `os.path.exists`, in
front of all remove actions. That guard failed on broken symlinks, i.e.
it returned `false` even though the broken symlink existed. Since the
remove actions are properly guarded without the `os.path.exists` guard,
this commits removes it. Now the remove command will also remove broken
symlinks.
2012-11-22 12:22:04 +01:00
Pedro Algarvio
cf03063bec Improve SaltReturnAssertsMixIn and move tests.integration.states.cmd to use it.
* Implement `SaltReturnAssertsMixIn.assertSaltNoneReturn` used in `tests.integration.states.cmd`.
* Migrate `tests.integration.states.cmd` to use `SaltReturnAssertsMixIn`.
2012-11-21 12:43:53 +00:00
Pedro Algarvio
2010660d80 Move tests.integration.states.user to use SaltReturnAssertsMixIn. 2012-11-21 12:34:26 +00:00
Pedro Algarvio
3401445e8b Expose what's happening behind the scenes for test_user_if_present_with_gid()
* Expose what's happening in `integration.states.user.UserTest.test_user_if_present_with_gid()`.
* Update code that was using the old `SaltReturnAssertsMixIn`.
2012-11-21 12:19:18 +00:00
Pedro Algarvio
1f03ba59f1 Extend tests.integration.SaltReturnAssertsMixIn.
* Do proper type checking for salt calls, ie, a dict should be returned, if not, it's a failure, usually errors come as lists, show that to the user.
* Iterate through the salt call parts to make sure result is true, and if not, fail showing the part comment.
2012-11-21 12:16:17 +00:00
Pedro Algarvio
04146f39f9 Tests wait timer is now colored(option to disable colors is also available), improves readability. 2012-11-21 10:01:45 +00:00
Pedro Algarvio
73e29b6ba1 Merge branch 'develop' of github.com:saltstack/salt into develop 2012-11-21 09:45:03 +00:00
Pedro Algarvio
495e7244c8 Fix pip requirements file permissions in case of non root runas.
* In `salt.modules.pip.install()` we first check if file is already cached(in case being called from `salt.states.virtualenv.managed()`), if it's not, then try to cache it.
* If requirements and `runas` is passed, since  `salt.fileclient`'s cache needs to be private, we create a temporary file with the contents of the requirements file, owned by the `runas` user, which then gets passed to the pip command.
* Always delete the user, even if test(`integration.states.virtualenv.VirtualenvTest.test_issue_1959_virtualenv_runas`) fails.
* Minor PEP-8.
2012-11-21 09:08:22 +00:00
Pedro Algarvio
eda67f0110 Show salt comment on assertTrue(ret['result']) failed calls.
* Created a mix which tests for the required assertion(True/False) and in case of a failure, shows salt comment kwarg in the raised assertion error so we know what was the original(salt's) failure.
2012-11-20 16:09:57 +00:00
Dan Colish
88ab2a6e74 Better to have a passing test even when there's an exception 2012-11-20 08:05:50 -08:00
Dan Colish
1110f2a1ac Add test to reproduce #2631 2012-11-20 07:41:38 -08:00
Pedro Algarvio
09eb92ad8a Only import what's needed, cleans up code. 2012-11-19 01:21:06 +00:00
Pedro Algarvio
6a6f256472 Make it, actually work, on python 2.6 2012-11-19 01:13:29 +00:00
Pedro Algarvio
c6dcdbe6dc Hardcore approach to travis-ci failures under python 2.6.
* We basically copied subprocess from python 2.7 and import that one instead of the python 2.6 subprocess to run the tests. Since we import it under a different name, there should be no issues with the remaining of salt's source importing the regular subprocess module.
2012-11-18 23:49:37 +00:00
Pedro Algarvio
863bc7ef37 Add missing import. 2012-11-18 19:06:17 +00:00
Pedro Algarvio
c5fe83272f Even more open() to salt.utils.fopen(). 2012-11-18 18:57:10 +00:00
Pedro Algarvio
f67d24cf30 Minor cosmetic change. 2012-11-17 17:43:23 +00:00
Pedro Algarvio
526ed994b8 Test for deprecation message first and then use the new --out format. 2012-11-17 17:39:06 +00:00
Pedro Algarvio
5bf4549777 Use actual time, to reduce time.sleep() inaccuracy. 2012-11-17 17:37:53 +00:00
Pedro Algarvio
52b0c1ba8e Adapt cherry-picked 2dd188fa18abff3193450472af2192206907b3ba to the new output shell switch. 2012-11-16 18:01:01 +00:00
Pedro Algarvio
ee32784bb4 Make the salt-cp shell test case work across multiple machines. 2012-11-16 18:00:51 +00:00
Pedro Algarvio
c60e4dd645 Fix tests and "convert" text output to "txt" when choosing outputter. 2012-11-16 00:07:08 +00:00
Thomas S Hatch
c3c61b835a Merge pull request #2555 from ryanschneider/cp.get_dir
Add gzip and template to cp.get_dir, expose make_dirs on cp.get_file
2012-11-14 18:22:09 -08:00
Ryan Schneider
2ccf589425 Refactor: make_dirs -> makedirs, gzip_compression -> gzip 2012-11-14 18:06:53 -08:00
Ryan Schneider
ad1a43012a Add gzip and template to cp.get_dir, expose make_dirs on cp.get_file 2012-11-14 16:48:26 -08:00
Pedro Algarvio
e390bd92f4 Fix raw outputter test. 2012-11-15 00:03:31 +00:00
Pedro Algarvio
97b4dffd85 Re-add required import. 2012-11-14 16:03:46 +00:00
Pedro Algarvio
7c666d21d0 Need at least two worker threads for integration.modules.publish to pass. 2012-11-13 19:10:17 +00:00
David Boucha
4a2ceb458e set worker threads to 1 for testing
Travis CI is failing on python 2.6
Trying to lower total memory consumption so the tests
will pass
2012-11-12 16:22:05 -07:00
Thomas S Hatch
5d97b51ef2 Merge pull request #2528 from kjkuan/sls_render_pipe
Sls render pipe
2012-11-12 09:59:24 -08:00
Pedro Algarvio
152088d727 Include another option into the test_salt_documentation_arguments_not_assumed test. 2012-11-11 20:11:08 +00:00
Jack Kuan
0931455721 Merge branch 'develop', remote-tracking branch 'origin' into sls_render_pipe 2012-11-10 23:06:14 -05:00
Pedro Algarvio
d3e0d64068 Show a nice clock counter while we wait for the sync job to finish. 2012-11-09 15:25:16 +00:00
Pedro Algarvio
527cf4ee38 Don't assume again and expand test.
* When introducing the "Don't assume!" changes I also assumed that there were always more than one argument from the shell. Expanded the testcase to include this check.
2012-11-09 11:32:36 +00:00
Pedro Algarvio
75f70e49f3 Include a test case for the previous "Don't assume!" commit. 2012-11-09 11:23:30 +00:00
Thomas S Hatch
67f3395627 Merge pull request #2492 from ryanschneider/cp.get_file-gzip
Add gzip_compression support to cp.get_file
2012-11-08 17:49:41 -08:00
Ryan Schneider
c638617612 Add gzip_compression support to cp.get_file 2012-11-08 16:09:38 -08:00
Pedro Algarvio
b7c763dec1 Improve salt.utils.build_whitepace_splited_regex(). Fixes #2379.
* Although we're building a regex which should ignore white space and new lines, the built regex should always match start and end of string.
2012-11-08 19:33:51 +00:00
Jack Kuan
6c13f876b2 Merge branch 'develop', remote-tracking branch 'origin' into sls_render_pipe 2012-11-08 10:31:23 -05:00
Pedro Algarvio
b50e4cb9c5 Improve salt.utils.contains_regex(). Fixes #2401.
* When `re.search`'ing, do a `re.MULTILINE` search. Not all matches happen on first line, specially using the `BufferedReader`.
* PEP-8 fixes.
* Removed `rowname` from `salt.utils.mysql_to_dict()` since it was not being used.
2012-11-08 12:47:19 +00:00
Thomas S Hatch
ec901ce29c Merge pull request #2463 from s0undt3ch/issues/2462
Fix #2462
2012-11-07 08:12:49 -08:00
Pedro Algarvio
cae00911a5 One more try to properly handle the process termination. 2012-11-07 14:10:02 +00:00
Pedro Algarvio
b4f2ad2884 Never fail on process.terminate() since the process is supposed to have ended. 2012-11-07 13:58:44 +00:00
Pedro Algarvio
8e9fd09eeb Try to cleanup after ourselves.
* Only instantiate a `LocalClient` on a test if one is required.
* Try to precipitate garbage collection on our minions connect and sync multi-processes.
2012-11-07 13:40:39 +00:00
Ryan Schneider
721bce0a11 Fixed integration test 2012-11-06 19:36:51 -08:00
Ryan Schneider
49fb321254 Add integration test 2012-11-06 19:36:51 -08:00
Pedro Algarvio
c5c637154a Try to get some system information out of Travis-CI. 2012-11-06 18:11:26 +00:00