Commit Graph

73 Commits

Author SHA1 Message Date
Alec Koumjian
a22773bdde Instruct authors of state modules to check for the test parameter 2012-07-03 14:17:52 -07:00
Alec Koumjian
bdb4055ce2 Updating Virtualenv module test with cross-platform file.remove 2012-07-03 08:39:11 -07:00
Dan Colish
b43c256ea7 Adds file.remove to file module, #1545. Drive by spelling correction 2012-07-03 07:50:02 -07:00
Dan Colish
aacd9cc5bd Use getpass.getuser since os.getlogin requires a tty and tests do not
always run with one.
2012-06-30 23:31:01 -07:00
Dan Colish
abf50324d2 Fix integration.module.file tests on linux 2012-06-30 22:47:02 -07:00
Dan Colish
71e97d6921 Fix file.chown to report unknown users and groups. Add tests to prove it. 2012-06-30 17:33:34 -07:00
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
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
Jeff Schroeder
5e85497760 Gracefully skip the django module tests w/o mock 2012-06-30 14:53:55 -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
Matt Robenolt
d327e6bdf4 Adding tests for Django module commands 2012-06-30 14:24:22 -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
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
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
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
Thomas S Hatch
b13f723ed6 Add non recurse test 2012-06-15 22:41:36 -06:00
Thomas S Hatch
8de4dbc13d disable failing aliases tests 2012-06-05 18:11:15 -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
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
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
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
Thomas S Hatch
b97ec99999 Add initial aliases tests 2012-05-13 23:51:22 -06:00
Thomas S Hatch
04652619d8 Fix #1268, this adds the working test for recursive requisite errors 2012-05-13 23:16:45 -06:00
Thomas S Hatch
eead7e0dab Add test for recursive sls data checks 2012-05-13 21:31:46 -06:00
Jeff Schroeder
23a59c71d1 Cleaning up the publish module integration tests a bit 2012-05-09 21:42:38 -07:00
Jeff Schroeder
a561e224f2 DRY with the grains integration tests 2012-05-09 21:39:49 -07:00
Baiju Muthukadan
cb5e3ea089 Add testrunner boilerplate code to run tests 2012-05-05 19:39:23 +05:30
Marc Abramowitz
607eab025a Fix pip.freeze and add a test for it. 2012-05-02 19:07:21 -07:00
Thomas S Hatch
daa47eab29 make cmd tests use always available shells 2012-04-27 16:13:33 -06:00
Evan Borgstrom
a17dff3a02 When add_host re-ordered hosts it would leave out trailing new lines
This caused problems when adding another host and you'd end up with
entries such as:

```
192.168.1.2\t\thost2\thost2alias192.168.1.1\t\thost1\thost1alias
```

Test updated to reflect.
2012-04-12 23:50:00 -04:00
Thomas S Hatch
f95c8a74e4 Add test for ext_pillar 2012-04-08 21:34:55 -06:00
Thomas S Hatch
41a81f85d2 Merge pull request #1063 from fatbox/hosts-duplicate-entries
Ensure hosts.add_host isn't leaving duplicate entries around
2012-04-08 15:18:40 -07:00
Evan Borgstrom
2d66c50d74 Ensure hosts.add_host isn't leaving duplicate entries around
Given a state entry like the following:

```
host-staging-web:
  host:
    - present
    - ip: 10.102.130.100
    - names:
      - staging-web.fqdn.com
      - staging-web
      - alt-staging-hostname
```

You'd end up with three different entries in your hosts file:

```
10.102.130.100		staging-web.fqdn.com
10.102.130.100		staging-web.fqdn.com	staging-web
10.102.130.100		staging-web.fqdn.com	staging-web	alt-staging-hostname
```

This corrects it by removing the previous line before appending the
newly crafted on, and adds tests to prove it.
2012-04-08 14:33:30 -04:00
Thomas S Hatch
b8227350dc finish cp module tests with cp.hash_file 2012-04-04 12:00:52 -06:00
Thomas S Hatch
2178b0162b Add cp.is_cached test 2012-04-04 10:46:01 -06:00
Thomas S Hatch
0402ca6194 Add cp.list_minion test 2012-04-04 10:39:45 -06:00
Thomas S Hatch
9f4b4632db Add cp.list_states test 2012-04-04 10:28:57 -06:00
Thomas S Hatch
0d2519dd31 Add test for cp.cache_local_file 2012-04-04 10:25:02 -06:00