Commit Graph

41 Commits

Author SHA1 Message Date
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
Pedro Algarvio
e04c872c66 Convert the remaining tests hard-coding temporary paths. 2012-11-06 12:44:53 +00:00
Antti Andreimann
7085edf590 Use file.managed as a backend of file.recurse. Fixes #1583
Rewrite file.recurse state module to leverage existing file.managed and file.directory
modules to do the heavy lifting. This removes code duplication and will make
templates available for file.recurse.

These improvements will be visible to the end-user:
- All files in directory can now be templatized
- destination directory is no longer created in test mode
- When clean mode is enabled, the module is capable of replacing
  existing files with directories and vice versa
2012-10-24 17:15:29 -07: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
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
8ab5e6e9c2 Include some test cases to expose saltstack/salt#2028 2012-09-18 01:53:05 +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
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
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
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
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