Henrik Holmboe
c10ed8ea60
Fix my typo
2013-10-24 11:42:52 +02:00
Henrik Holmboe
77fd1acb7f
Change assertEquals to assertEqual
...
According to
http://docs.python.org/2/library/unittest.html#deprecated-aliases
assertEquals is a deprecated alias of assertEqual.
2013-10-24 11:39:04 +02:00
David Anderson
9163d2a00f
Fix test description
2013-09-10 21:03:35 -06:00
David Anderson
d5d0aba61e
Fix #7154 - cmd.* should fail when cwd does not exist
2013-09-10 20:57:41 -06:00
Pedro Algarvio
6d06e12e22
Adapted integration.modules.cmdmod
to use salttesting.mock
2013-08-26 13:03:08 +00:00
Pedro Algarvio
9353dcafd3
Revert "salt.modules.cmdmod
renamed to salt.modules.cmd
while enforcing absolute imports."
...
This reverts commit 3fa341280b
.
2013-08-20 23:44:03 +01:00
Pedro Algarvio
3fa341280b
salt.modules.cmdmod
renamed to salt.modules.cmd
while enforcing absolute imports.
2013-08-19 13:45:56 +01: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
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
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
Thomas S Hatch
862112c5a6
Fix error created by yaml changes
2013-06-18 23:51:44 -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
Chris Rebert
9ed364980d
is not 0 => != 0
2013-04-30 10:32:21 -07:00
Pedro Algarvio
c4e96207cb
runas
needs root permissions.
2013-04-27 21:06:13 +01:00
Denis Generalov
56f221018d
* fix bt if environment empty or absent
...
* fix tests
2013-04-10 16:24:41 +04: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
Roberto Aguilar
37be12ed37
Updated environment test to use mock library.
2013-03-11 21:54:10 +00:00
Roberto Aguilar
f942ed6097
Added test for clean environment.
2013-03-02 23:04:04 -08:00
Ryan Schneider
8f8cc74b34
Some minor cleanup of unit and integration tests.
2012-12-18 17:39:16 -08:00
Roman Imankulov
aa5896681d
Fix the escaping issue in cmd.run
...
Lack of escaping in cmd.run with "runas" option could lead to incorrect
execution of commands containing quotes in their bodies.
2012-07-26 22:21:07 +06:00
Roman Imankulov
bb0ed1a3a7
Tests cleanup
...
Defined "integration.run_tests()" function which can be used to execute
a particular integration test case. Existing bolerplate code in modules
and states tests is replaced with following lines:
if __name__ == '__main__':
from integration import run_tests
run_tests(TestCaseName)
Typical usecase could look like this:
python integration/modules/pip.py --no-clean -vv
2012-07-20 12:25:08 +06:00
Jeroen Dekkers
9dd57c057e
Use cat instead of echo for cmd.which test, as echo can be a built-in
2012-06-19 02:17:55 +02:00
L.C. Rees
cc8a921311
- more py3k fixes
2012-06-04 16:40:34 -06:00
L.C. Rees
924d8b450b
- fix cmd tests so they pass on MacOS X
2012-05-30 15:57:53 -06:00
Dan Colish
49972a1580
The text outputter will insert newlines, the tests must expect these
...
to be present.
2012-05-29 21:45:51 -07:00
Baiju Muthukadan
cb5e3ea089
Add testrunner boilerplate code to run tests
2012-05-05 19:39:23 +05:30
Thomas S Hatch
daa47eab29
make cmd tests use always available shells
2012-04-27 16:13:33 -06:00
Thomas S Hatch
8cf2a16ff9
Add tests for the cmd module
2012-03-27 17:05:38 -06:00