Commit Graph

289 Commits

Author SHA1 Message Date
Dan Colish
087f8be69a Merge branch 'develop' of git://github.com/saltstack/salt into develop 2012-06-30 16:56:31 -07:00
Dan Colish
f91d947806 Simplify file.chgrp. Add file module test suite 2012-06-30 16:56:02 -07:00
Larry Price
6408f286b2 added two tests that will only be run if you are root. 2012-06-30 16:51:11 -07:00
Jeff Schroeder
4b13aebe0b Merge pull request #1542 from akoumjian/develop
Initial module tests for virtualenv
2012-06-30 16:46:44 -07:00
Alec Koumjian
378606c97f Initial module tests for virtualenv 2012-06-30 16:43:32 -07:00
Dan Colish
e767d25a5e Use tempdir to ensure there will always be a directory which can be accessed. 2012-06-30 15:48:28 -07:00
Thomas S Hatch
0a83e68e1a Merge pull request #1537 from dcolish/develop
Fix state.file tests and unit.utils.find_tests.
2012-06-30 15:28:31 -07:00
Thomas S Hatch
756d358e95 Merge pull request #1536 from laprice/develop
fixing the salt/tests/integration/states/cmd.py test
2012-06-30 15:28:01 -07:00
Dan Colish
040c249866 Fix find_test on OSX 2012-06-30 15:23:50 -07:00
Thomas S Hatch
3aa93ba14b Merge pull request #1535 from jhutchins/tests
Tests
2012-06-30 15:15:01 -07:00
Jeff Hutchins
b380991316 Merge git://github.com/saltstack/salt into tests
Conflicts:
	tests/unit/utils/find_test.py
2012-06-30 15:58:17 -06:00
Jeff Schroeder
5e85497760 Gracefully skip the django module tests w/o mock 2012-06-30 14:53:55 -07:00
Jeff Schroeder
94ec7d4816 Make an error go to stderr and remove net 1 LOC 2012-06-30 14:53:32 -07:00
Thomas S Hatch
8ba1d51a75 Merge pull request #1533 from mattrobenolt/django-module-tests
Added tests for Django module
2012-06-30 14:33:16 -07:00
Thomas S Hatch
ede600a734 Merge pull request #1532 from akoumjian/develop
Fix for minion KeyError 1523
2012-06-30 14:27:40 -07:00
Alec Koumjian
40781ea0ae Fix for minion KeyError 1523 2012-06-30 14:25:14 -07:00
Matt Robenolt
d327e6bdf4 Adding tests for Django module commands 2012-06-30 14:24:22 -07:00
Dan Colish
1b1431ba66 Skip verify_env test on windows. 2012-06-30 14:11:37 -07:00
Dan Colish
c5cdb366dc Fix test.integration.states.host. Make master_config and minion_config a property to keep semantics consistent 2012-06-30 13:54:23 -07:00
Jeff Hutchins
ff54029c98 Make tests on utils.find run with nose. 2012-06-30 14:48:40 -06:00
Thomas S Hatch
d15899ce20 Merge pull request #1528 from dcolish/develop
Add unittests for salt.utils.verify
2012-06-30 13:30:36 -07:00
Dan Colish
01b74fc04c Add unittests for salt.utils.verify 2012-06-30 13:28:15 -07:00
Intchanter
a1433ef5ec PEP8 fixes for tests 2012-06-30 14:10:34 -06:00
Dan Colish
edfb3d2560 Merge branch 'develop' of git://github.com/saltstack/salt into develop
Conflicts:
	tests/unit/utils/find_test.py
2012-06-30 12:46:04 -07:00
Jeff Schroeder
7e16fd680a Merge branch 'develop' of github.com:saltstack/salt into develop 2012-06-30 12:34:41 -07:00
Jeff Schroeder
07b4c8b4ed Skip the rvm and gem module/state tests when mock is missing
The mock python module is required for the gem and rvm tests.
If it is not available, the tests should be gracefully skipped.

From python runtests.py -u:

test__check_and_install_ruby (unit.states.rvm_test.TestRvmState) ... skipped 'mock python module is unavailable'
test__check_ruby (unit.states.rvm_test.TestRvmState) ... skipped 'mock python module is unavailable'
test__check_rvm (unit.states.rvm_test.TestRvmState) ... skipped 'mock python module is unavailable'
test_gemset_present (unit.states.rvm_test.TestRvmState) ... skipped 'mock python module is unavailable'
test_installed (unit.states.rvm_test.TestRvmState) ... skipped 'mock python module is unavailable'
test_installed (unit.states.gem_test.TestGemState) ... skipped 'mock python module is unavailable'
test_removed (unit.states.gem_test.TestGemState) ... skipped 'mock python module is unavailable'
test__rvm (unit.modules.rvm_test.TestRvmModule) ... skipped 'mock python module is unavailable'
test__rvm_do (unit.modules.rvm_test.TestRvmModule) ... skipped 'mock python module is unavailable'
test_gemset_list (unit.modules.rvm_test.TestRvmModule) ... skipped 'mock python module is unavailable'
test_gemset_list_all (unit.modules.rvm_test.TestRvmModule) ... skipped 'mock python module is unavailable'
test_install (unit.modules.rvm_test.TestRvmModule) ... skipped 'mock python module is unavailable'
test_list (unit.modules.rvm_test.TestRvmModule) ... skipped 'mock python module is unavailable'
test__gem (unit.modules.gem_test.TestGemModule) ... skipped 'mock python module is unavailable'
test_list (unit.modules.gem_test.TestGemModule) ... skipped 'mock python module is unavailable'
test_sources_list (unit.modules.gem_test.TestGemModule) ... skipped 'mock python module is unavailable'
2012-06-30 12:29:48 -07:00
Dan Colish
78d16a28f0 Move tmp hosts file management to test case which requires it. Fix
test.unit.utils.find_test on OSX
2012-06-30 12:20:53 -07:00
Thomas S Hatch
65d8cb4e59 Merge pull request #1521 from dcolish/develop
Fix host file setup and fix tests.integration.states.host
2012-06-30 12:00:05 -07:00
Dan Colish
f79b6e5ea0 Fix host file setup and fix tests.integration.states.host 2012-06-30 11:47:48 -07:00
Matt Robenolt
57ff2bfe3e Hardcode /tmp/subsalttest dir in ssh module integration tests
I don't really like doing this, but `/tmp/subsalttest dir` is already
hardcoded in other places for running tests.

Without this, when running tests under a mounted Vagrant drive,
`ssh-keygen` doesn't have permission to create the symlink for
known_hosts to known_hosts.old, causing a test to fail.

```
======================================================================
FAIL: test_rm_known_host (integration.modules.ssh.SSHModuleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vagrant/tests/integration/modules/ssh.py", line 143, in
test_rm_known_host
    self.assertEqual(ret, 'add')
AssertionError: 'exists' != 'add'
```

`link /vagrant/tests/integration/tmp/known_hosts to
/vagrant/tests/integration/tmp/known_hosts.old: Operation not permitted`
2012-06-30 11:46:31 -07:00
Larry Price
77f54af75e Merge branch 'develop' of https://github.com/saltstack/salt into develop 2012-06-30 11:43:49 -07:00
Larry Price
994d62431e found the issue, set cwd. 2012-06-30 11:43:32 -07:00
Larry Price
aa95c9d26b initial test case for user. 2012-06-30 09:43:44 -07:00
Larry Price
c2f89a849d adding state tests to the full run :-/ 2012-06-30 09:40:00 -07:00
David Boucha
7e7d831103 Disable find unit tests on Windows
There are problems with pwd, grp and /dev/null
as they don't exist on Windows. So we are disabling
tests that use those for now.
2012-06-24 19:43:43 -06:00
David Boucha
bb72a4dfba Fix jinja_test on Windows 2012-06-24 18:16:22 -06:00
Baiju Muthukadan
f9e9e32eaf The pwd & grp modules are only available for unix 2012-06-23 11:47:53 +02:00
Thomas S Hatch
7477583c97 Add test for recuse error 2012-06-19 10:29:14 -06:00
Jeroen Dekkers
ac2344f2cb Skip pip test if pip is not installed 2012-06-19 03:11:54 +02:00
Jeroen Dekkers
92ffbaba6e Be compatible with mock 0.7 2012-06-19 02:19:03 +02: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
Baiju Muthukadan
8cc8fe7305 use sys.maxint for platform compatibility
Also comment out a failing test case.  This works in CentOS 6.2 32bit
but not working unde Ubuntu 12.04 32bit.
2012-06-18 12:06:54 +05:30
Baiju Muthukadan
ea4c519e25 tests for find utility 2012-06-18 00:54:48 +05:30
Thomas S Hatch
baa9cf88eb Add sls for non recurse test 2012-06-15 22:41:59 -06:00
Thomas S Hatch
b13f723ed6 Add non recurse test 2012-06-15 22:41:36 -06:00
Thomas S Hatch
c29d1d6076 Only generate one pair of minion keys for the swarm 2012-06-13 13:37:28 -06:00
Thomas S Hatch
bb9558b316 Fix exception in minionswarm 2012-06-11 14:43:42 -06:00
Thomas S Hatch
e6e92fb3af Add eventlisten script to watch events on the master and minion 2012-06-07 18:41:18 -06:00
Thomas S Hatch
b4f9c22883 Doh! thats the wrong cachedir config! 2012-06-06 11:18:17 -06:00
Thomas S Hatch
8de4dbc13d disable failing aliases tests 2012-06-05 18:11:15 -06:00
Thomas S Hatch
ef6b027e90 Fix salt key tests for new no_color option 2012-06-05 18:10:59 -06:00
Thomas S Hatch
5b05d77405 Add sock_dir setting for the integration test syndic 2012-06-05 17:51:52 -06:00
Thomas S Hatch
f3c7b5be5f Fix path loading for shell tests 2012-06-05 17:04:28 -06:00
Thomas S Hatch
7ad6b3c6e4 Add abaility to disable minion modules in the swarm 2012-06-05 11:44:01 -06:00
Thomas S Hatch
5c6b8aea28 docstring cleanups for ssh tests 2012-06-04 17:22:43 -06:00
L.C. Rees
cc8a921311 - more py3k fixes 2012-06-04 16:40:34 -06:00
Thomas S Hatch
400a429502 Add user to integration verify_env 2012-06-02 23:17:52 -06:00
L.C. Rees
cdb5e89631 - exploit how 'iterkeys' is default iterator for dict
- use values()

- pep8
2012-06-01 13:06:43 -06:00
L.C. Rees
140e8781df - py3k updates 2012-05-31 23:31:27 -06:00
Baiju Muthukadan
91ce3a7ec9 cleanup temp directories created by tests 2012-05-31 16:13:03 +05:30
Thomas S Hatch
dc6138b787 move runner tests to the front to clean up the output 2012-05-30 17:10:48 -06:00
L.C. Rees
924d8b450b - fix cmd tests so they pass on MacOS X 2012-05-30 15:57:53 -06:00
Baiju Muthukadan
5f0de59ab7 Test runner boiler plate; remove unused imports 2012-05-31 03:11:25 +05:30
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
Dan Colish
f5c8e242e4 Refactor runtests to allow dotted path module discovery.
In addition to traditional file system path test discovery it is
useful to run a test by stating it's dotted python path. For example,
this will only run the cmdmod integration tests from the
module suite::

        $ runtests.py -n tests.integration.modules.cmdmod
2012-05-29 19:56:47 -07:00
Baiju Muthukadan
24bb4ea4e0 Fix PEP8 warnings for test cases 2012-05-29 22:10:20 +05:30
Thomas S Hatch
7247c5afe7 Fix test error due to fix in static calls 2012-05-27 21:43:35 -06:00
Thomas S Hatch
0020706067 Add jobs jobs.list_jobs runner test 2012-05-27 21:34:48 -06:00
Thomas S Hatch
e5b5d458c3 Add tests for jobs runner 2012-05-27 21:24:45 -06:00
Thomas S Hatch
a19ffae25f Add tests for the manage runner 2012-05-27 21:02:29 -06:00
Thomas S Hatch
0b9f381781 Add runners to the main test script 2012-05-27 21:01:08 -06:00
Thomas S Hatch
aed4f593e0 Add runner test interface 2012-05-27 21:00:10 -06:00
Thomas S Hatch
d8ca98f3a4 Add test to make sure #1348 does not happen again 2012-05-27 17:41:49 -06:00
Jon McKenzie
c0f8e07bd7 Add --yaml-out, --json-out, and --raw-out outputters to salt-key CLI (retain color output as default) 2012-05-26 18:22:24 -04:00
Roman Imankulov
28ca4cb776 Fix file.comment/file.uncomment states
Function "file.contains_regex" used to search values from the beginning
of the line and thus couldn't find pattern "hello world" in a "#hello
world" string.
2012-05-25 12:38:57 +06:00
Roman Imankulov
c9a20edee0 Fix ssh_known_hosts state return values 2012-05-24 22:05:45 +06:00
Roman Imankulov
d45bc9179a Set ssh.set_known_host bug 2012-05-23 23:45:16 +06:00
Thomas S Hatch
8bfab4e7c0 pillar matcher test 2012-05-23 10:18:54 -06:00
Thomas S Hatch
f7e2af08cf Add pillar data specific to the sub_minion 2012-05-23 10:05:14 -06:00
Thomas S Hatch
757e8591dd Add test for compound matcher 2012-05-23 09:57:33 -06:00
Thomas S Hatch
b25e82c59f Add regex grain match tests 2012-05-23 09:39:10 -06:00
Thomas S Hatch
b5bdfc3073 Add grain matcher test 2012-05-23 08:46:12 -06:00
Thomas S Hatch
19baf0f577 Add initial matcher tests 2012-05-23 08:31:58 -06:00
Thomas S Hatch
5c09aa3778 Fix docstrings in shellCase 2012-05-23 08:14:16 -06:00
Thomas S Hatch
b1c710e70a fix error with new minion in salt-key tests 2012-05-23 08:08:35 -06:00
Thomas S Hatch
dd6e2da941 Fix salt-key test for new minion 2012-05-23 08:05:47 -06:00
Thomas S Hatch
c9cddd2245 Add second minion to tests 2012-05-23 08:04:38 -06:00
Roman Imankulov
f20cb3b92c Add support for test mode operations 2012-05-23 00:13:52 +06:00
Roman Imankulov
41465d5f0a Add support for ssh_known_hosts states 2012-05-21 23:45:03 +06:00
Roman Imankulov
1590483fe2 Add support for known_hosts management
Module "ssh" is now capable of keeping track of records in ssh
known_hosts file, as well as asking remote hosts for their public keys.
2012-05-21 21:49:43 +06:00
Roman Imankulov
9d193b85b7 Add support for ssh public keys fingerprint
- function _validate_keys returns public key fingerprint as described in
  RFC 4716
- one more test to validate how "ssh.auth_keys" function works
2012-05-20 23:09:52 +06:00
Thomas S Hatch
a4864f9c80 Add initial compiler tests 2012-05-16 23:00:01 -06:00
Thomas S Hatch
fdf155bbe2 Add interface for testing bad sls data 2012-05-16 22:58:18 -06:00
Thomas S Hatch
76efdd9fb0 Fix bug in tests with aliases 2012-05-16 22:49:19 -06:00
Thomas S Hatch
5f9a7e87e4 Initial host state test 2012-05-14 23:56:45 -06:00
Thomas S Hatch
26bcb2a4cf Add state_result method to ModuleCase
This makes getting the result field out of the return from run_state
easier
2012-05-14 23:43:16 -06:00
Thomas S Hatch
3abc36b4d2 Add tests for cmd state 2012-05-14 11:18:36 -06:00
Thomas S Hatch
8e26ea646e Add rm_alias test 2012-05-14 10:44:17 -06:00
Thomas S Hatch
3c92ebc465 aliases.list_aliases test 2012-05-14 09:59:38 -06:00
Thomas S Hatch
800cf2825c Add test for aliases.has_target 2012-05-14 00:04:26 -06:00