Commit Graph

228 Commits

Author SHA1 Message Date
Scott Walton
b7ed775a07 Grammar 2012-10-19 11:42:32 +01:00
Scott Walton
340616a379 Added test framework for rabbitmq user #962 2012-10-19 11:42:01 +01:00
Thomas S Hatch
8c3fadf15e Fix python 2.6 compat issue in tests 2012-10-18 22:37:02 -06:00
Daniel Miller
1957700161 Add "file.patch" state function 2012-10-18 12:23:47 -04:00
Seth House
2e9ecdbaa4 Remove bash-ism from pip state test
This one is pretty silly; hopefully the regex match is still specific
enough to be a good test.

% bash -c '/tmp/someenv/bin/pip install something'
bash: /tmp/someenv/bin/pip: No such file or directory

% zsh -c '/tmp/someenv/bin/pip install something'
zsh:1: no such file or directory: /tmp/someenv/bin/pip
2012-10-15 15:31:47 -06:00
Pedro Algarvio
6533c48014 Just some renames. Refs #2227. 2012-10-12 11:53:40 +01:00
Pedro Algarvio
ae7e476bfc Handle some quoting issues while building the whitespace regex for file.append. Fixes #2227. 2012-10-12 11:45:27 +01:00
Pedro Algarvio
174ee8aab8 Fix #2167. Testcases included. 2012-10-06 01:05:04 +01:00
Pedro Algarvio
e87a408dcd Correct license. 2012-10-01 10:16:21 +01:00
Pedro Algarvio
064b3a60c2 Add test case for #1959. 2012-09-30 12:20:38 +01:00
Pedro Algarvio
420bfe830b Mark destructive tests with the destructiveTest decorator. 2012-09-29 23:16:08 +01:00
Scott Walton
ce4237e2bd Fixed test failures #2026 2012-09-27 20:04:18 +01:00
Scott Walton
768487995d Merge remote-tracking branch 'upstream/develop' into develop 2012-09-27 19:35:13 +01:00
Pedro Algarvio
eec932799a The pip module now uses cmd.run_all. Fixes #2113.
* In order to check if something went wrong while running the various pip commands using the command module, we need to know, at least, the return code, this way we can report the failure.
* `salt.modules.pip.uninstall()` now returns the `cmd.run_all` `dict` instead of a list of strings. **This breaks previous behaviour**.
* Added a test case for `salt.modules.pip.uninstall()` changes.
2012-09-27 18:33:50 +01:00
Pedro Algarvio
af9709dde5 Properly handle missing pip binary. Fixes #2087. 2012-09-27 12:06:09 +01:00
Pedro Algarvio
ec2486c9d8 Only test supervisor if conditions are proper. Refs #2026.
* Only the root user can run the supervisor state tests.
* Install supervisor on the travis-ci machine to run the tests.
2012-09-25 22:32:42 +01:00
Thomas S Hatch
43382b6d1c Merge pull request #2085 from s0undt3ch/issues/2028
Address `pip.installed` regarding weird packages setup. Fixes #2028.
2012-09-25 10:20:47 -07:00
Pedro Algarvio
41f0f4449e Address pip.installed regarding weird packages setup. Fixes #2028.
Some packages, carbon and graphite-web for example, install their packages to a specific root, using a `virtualenv` or not. `pip freeze` won't show those packages as installed.
2012-09-25 12:24:54 +01:00
Scott Walton
438ea792a7 Added state and test for stopping services #2026 2012-09-24 09:45:31 +01:00
Thomas S Hatch
282c8f4e3c clean out unused imports 2012-09-24 00:55:01 -06:00
Thomas S Hatch
cf1e87e185 Merge pull request #2031 from scott-w/develop
Add Supervisor Support
2012-09-23 22:56:45 -07:00
Pedro Algarvio
03c006debb Removed a test that was using state.template_str. Re-adding later.
The test was removed in order to have a clean pull request. A new issue will be opened because of that failing test.
2012-09-23 18:32:04 +01:00
Pedro Algarvio
c315e95b95 Move the state pip.installed tests to the proper place.
* Moved the state `pip.installed` tests to it's own module, the correct one.
* Added a test which checks for the presence of errors while running `pip.installed` introduced while fixing #2028
2012-09-23 18:16:11 +01:00
Pedro Algarvio
8ab5e6e9c2 Include some test cases to expose saltstack/salt#2028 2012-09-18 01:53:05 +01:00
Scott Walton
c581e7bab5 Added tests, and modified state/modules to pass #2026 2012-09-17 20:34:50 +01:00
Pedro Algarvio
b3a03e391f Fix #1864 - Support makedirs to salt.states.file.append() 2012-08-28 12:05:50 +01:00
Pedro Algarvio
d21e8c7b27 Another mkdir that should be included in previous commit. 2012-08-25 14:36:30 +01:00
Pedro Algarvio
6b2e12d9bf Don't fail on tests because we're trying to create a directory and it exists(and that's not the actual test). 2012-08-25 14:21:38 +01:00
Pedro Algarvio
759d67ffc0 Reverted back the --key-logfile deprecation.
On the parsers cleanup branch, I though about making the available options as equal as possible. Since the log_file setting for the master and the minion could be separately set,  I made the logfile option for the key also log_file. Yet, since there's no key specific config file, it shares master, one could only specify the log_file settings from the cli,   it could not be hardcoded on the config file, unless, we made a separate config file just for key.
So, in order to reduce required changes, and keep it all as backwards compatible as possible, the key log file options is now, once again, `--key-logfile` which will allow us to   hardcode it in the masters config file as `key_logfile`.
This will also, hopefully make travis behave better too.
2012-08-08 01:08:38 +01:00
Pedro Algarvio
c89928ec33 Typo. 2012-08-05 19:31:13 +01:00
Pedro Algarvio
a4b96eacfc Corrected last commit line placement. 2012-08-05 19:29:56 +01:00
Pedro Algarvio
dcc0efcd70 Re-add wrongly removed line. 2012-08-05 19:27:28 +01:00
Pedro Algarvio
d01b8da9aa Fix some tests when using --no-clean
When using `--no-clean` while running tests, some files/dirs still need to be removed, if not, test will fail. This commit tries to addresses those issues.
2012-08-05 19:23:12 +01:00
cheater
d07d6b8a7b Adding the gid_from_name parameter to the user.present state 2012-07-30 21:15:35 +02:00
Thomas S Hatch
e61ddfdcfc fix many a test 2012-07-23 13:00:54 -06:00
Intchanter
768e17b9d5 We return tuples, not lists 2012-07-20 08:31:36 -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
Larry Price
6a63f7c71c Destructive tests now fail properly. 2012-06-30 17:28:48 -07:00
Larry Price
0d1d01fba2 Adding the user creation tests.
These tests will create users on the test machine if you run them as root.
2012-06-30 17:00:27 -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
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
Larry Price
994d62431e found the issue, set cwd. 2012-06-30 11:43:32 -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
Larry Price
aa95c9d26b initial test case for user. 2012-06-30 09:43:44 -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
Dan Colish
f79b6e5ea0 Fix host file setup and fix tests.integration.states.host 2012-06-30 11:47:48 -07:00
L.C. Rees
cc8a921311 - more py3k fixes 2012-06-04 16:40:34 -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
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
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
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
Thomas S Hatch
a4864f9c80 Add initial compiler tests 2012-05-16 23:00:01 -06:00
Thomas S Hatch
5f9a7e87e4 Initial host state test 2012-05-14 23:56:45 -06:00
Thomas S Hatch
3abc36b4d2 Add tests for cmd state 2012-05-14 11:18:36 -06:00
Baiju Muthukadan
fa3b39f071 remove trailing whitespaces 2012-05-13 19:48:05 +05:30
Thomas S Hatch
6897542aa2 test the test interface for file.touch state 2012-05-13 02:07:54 -06:00
Thomas S Hatch
e363cf0105 test for file.touch 2012-05-13 02:06:46 -06:00
Thomas S Hatch
ac451b7498 test interface test for file.append 2012-05-13 02:02:20 -06:00
Thomas S Hatch
cc6175444c Add file.append test 2012-05-13 02:00:01 -06:00
Thomas S Hatch
23e4e82abf Add file.uncomment tests 2012-05-13 01:54:20 -06:00
Thomas S Hatch
e798e80891 test interface test for file.comment 2012-05-13 01:38:31 -06:00
Thomas S Hatch
b2dd62864a Add test for file.comment 2012-05-13 01:35:01 -06:00
Thomas S Hatch
58d56930c3 test interface for file.sed 2012-05-13 01:24:26 -06:00
Thomas S Hatch
dd25243cea test for file.sed 2012-05-13 01:20:28 -06:00
Thomas S Hatch
a85c66cc3e test for file.recurse interface 2012-05-13 01:02:05 -06:00
Thomas S Hatch
1a875571ba Test for file.recurse state 2012-05-13 00:54:28 -06:00
Thomas S Hatch
2ebd8a9827 Add test for file.directoty test interface 2012-05-13 00:27:00 -06:00
Thomas S Hatch
4c2200d351 tests for file.directory 2012-05-12 23:38:24 -06:00
Thomas S Hatch
75409f6b0c Add test interface test for file.managed 2012-05-12 23:27:00 -06:00
Thomas S Hatch
b811d8b5ba Add test for file.managed 2012-05-12 23:19:39 -06:00
Thomas S Hatch
a6c748dad7 verify file.absent test interface 2012-05-12 22:58:26 -06:00
Thomas S Hatch
5a94a41305 file.absent tests 2012-05-12 22:55:28 -06:00
Thomas S Hatch
ccdde36173 verify the test interface for file.symlink 2012-05-12 22:41:47 -06:00
Thomas S Hatch
9628f9a90b Add state integration test for file.symlink 2012-05-12 22:31:58 -06:00