Commit Graph

48 Commits

Author SHA1 Message Date
regilero
58bfbff843 prereq tests for issue #8235 (yaml without lists) and error message difference in no-list mode 2013-11-25 12:46:02 +01:00
regilero
8024df8404 Add test for #8796: use does not inherit require. False test actually 2013-11-25 11:06:37 +01:00
regilero
8177f2b609 Add another working prereq simple test 2013-11-24 18:30:15 +01:00
regilero
ddb99a570d require and prereq mixed tests, mostly failing, see #8785 2013-11-24 18:28:22 +01:00
regilero
ab4ee0ba1f full sls require test, and yet to do check for require_in or prereq #8233 2013-11-23 18:56:07 +01:00
regilero
7b01991c0a require recursion and still not done prereq recursion 2013-11-23 18:20:15 +01:00
regilero
a99cd0eafd Use requisite 2013-11-23 17:26:37 +01:00
regilero
6a7d35bc59 commented test for issue #8211 complex prepreq 2013-11-23 16:59:10 +01:00
regilero
ceb5963094 Prereq and prerequ_in tests 2013-11-23 16:39:19 +01:00
regilero
407533dfa5 require and require_in tests 2013-11-23 16:37:57 +01:00
Pedro Algarvio
c170d1e572 Updated test cases to include environment selection in states using __env__. 2013-11-06 20:04:54 +00:00
Pedro Algarvio
ec76b188b1 Correctly trigger the issue reported on #8196. 2013-11-06 20:03:44 +00:00
Pedro Algarvio
c849c4b57f Moved test cases from #8195 to a better place. 2013-10-31 18:54:25 +00:00
Pedro Algarvio
b46bef99b9 Updated integration.modules.state test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:00 +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
340b45d801 fix pydsl test 2013-05-18 22:58:08 +00:00
Thomas S Hatch
123d52bdc6 Can't serialize pydev/stateconf, start on #5055 2013-05-18 22:47:14 +00:00
Thomas S Hatch
8fb36351b3 remove unused import 2013-02-07 17:38:36 -07:00
Thomas S Hatch
4c95f0e0ea fix #3449 2013-01-25 21:16:11 -07:00
Thomas S Hatch
bbad93c386 Add skipif to a test that requires root 2013-01-17 13:29:49 -07:00
Pedro Algarvio
0bf51ba5b0 Allow a test to specify it's own run_function timeout. Increase timeout for some tests. 2013-01-14 14:07:58 +00:00
Pedro Algarvio
871516b4cf Migrated test.integration.modules.state to use SaltReturnAssertsMixIn. 2012-12-07 18:44:06 +00:00
Pedro Algarvio
863bc7ef37 Add missing import. 2012-11-18 19:06:17 +00:00
Pedro Algarvio
c5fe83272f Even more open() to salt.utils.fopen(). 2012-11-18 18:57:10 +00:00
Jack Kuan
6c13f876b2 Merge branch 'develop', remote-tracking branch 'origin' into sls_render_pipe 2012-11-08 10:31:23 -05:00
Pedro Algarvio
e04c872c66 Convert the remaining tests hard-coding temporary paths. 2012-11-06 12:44:53 +00:00
Pedro Algarvio
75644992e2 Don't hard-code temporary paths on tests. Refs #2462. 2012-11-06 11:20:06 +00:00
Jack Kuan
f2d8c5cef3 Add yaml/json parsing to values of kwargs for state.single.
Also fixed an incorrect use sls_encoder in compile_template_str().
2012-11-06 01:26:08 -05:00
Pedro Algarvio
a1696c17d8 Finish fix of last commit. 2012-11-04 11:53:59 +00:00
Pedro Algarvio
33fa855bc4 We're apparently unable to have an empty last line in yaml literal strings. 2012-11-04 11:46:00 +00:00
Pedro Algarvio
5af62d01ac Fix integration.modules.state.StateModuleTest.test_issue_1896_file_append_source and still maintaining an empty line check. 2012-11-04 11:35:23 +00:00
Thomas S Hatch
f1dca86fd4 Fix some quotes 2012-09-28 17:40:30 -06:00
Pedro Algarvio
7f7b196f1e Include an invalid items test for state.template* functions. Refs #2068. 2012-09-28 17:56:13 +01:00
Pedro Algarvio
2211afa63a Properly render the high state loaded from templates. Fixes #2068.
Previously using `state.template` or `state.template_str` would not be checked/rendered into proper formatting resulting in some templates not being correctly executed. For example, the following template worked:
```
/tmp/issue-2068-template-str:
  virtualenv:
    - managed
    - no_site_packages: True
    - distribute: True

pep8-pip:
  pip:
    - installed
    - name: pep8
    - bin_env: /tmp/issue-2068-template-str
    - mirrors: http://testpypi.python.org/pypi
    - require:
      - virtualenv: /tmp/issue-2068-template-str
```
as opposed to the following which did not work:
```
/tmp/issue-2068-template-str:
  virtualenv.managed:
    - no_site_packages: True
    - distribute: True

pep8-pip:
  pip.installed:
    - name: pep8
    - bin_env: /tmp/issue-2068-template-str
    - mirrors: http://testpypi.python.org/pypi
    - require:
      - virtualenv: /tmp/issue-2068-template-str
```
The dotted names should be converted into lists for example, which was the problems with the two examples above.
2012-09-28 17:34:55 +01:00
Pedro Algarvio
677a08fe7d Update the test cases which better expose #2068. 2012-09-28 16:04:38 +01:00
Pedro Algarvio
cc10ed1906 Add include and exclude test cases. Refs #2068. 2012-09-28 01:17:37 +01:00
Pedro Algarvio
5ec829a46e Fix state tests. 2012-09-03 16:40:52 +01:00
Pedro Algarvio
a45c0bdce8 Fix saltstack/salt#1896
* Added `source` support to `salt.states.file.append()`
 * Added tests for the above.
2012-09-01 07:49:34 +01:00
Pedro Algarvio
8b645b339b Fix #1879. Searching/matching is now done on multiple lines.
* `salt.modules.file.contains()`, `salt.modules.file.contains_regex()`, `salt.modules.file.contains_glob()` and `salt.utils.find` now do the searching/matching against chunks of data; using defaults, 32KB chunks of data in files; instead of searching/matching line by line.
* Based on the above changes `salt.states.file.append()`, when checking if the text to append is already present, now uses `salt.modules.file.contains_regex()` in order to match spanning multiple lines ignoring the addition/deletion of white-space or new lines, except inside commas.
* The regex used on the above item is built at runtime using `salt.utils.build_whitepace_splited_regex()`, just feed the text to it and you'll get back the proper regex to the matching/searching on, for example `salt.modules.file.contains_regex()`.
* Added tests for all this code.
2012-08-28 10:03:11 +01:00
Pedro Algarvio
797defc320 Add the failing test for saltstack/salt#1879 2012-08-26 00:38:39 +01:00
Pedro Algarvio
22d69e43c7 Properly catch some more state SLS syntax errors.
Sort keys before checking for same key in rule. Fixes #1876.
2012-08-25 14:44:07 +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
Thomas S Hatch
7477583c97 Add test for recuse error 2012-06-19 10:29:14 -06:00
Thomas S Hatch
b13f723ed6 Add non recurse test 2012-06-15 22:41:36 -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
Baiju Muthukadan
cb5e3ea089 Add testrunner boilerplate code to run tests 2012-05-05 19:39:23 +05:30
Thomas S Hatch
d00133e343 Add some tests for states 2012-03-29 17:18:32 -06:00