Commit Graph

809 Commits

Author SHA1 Message Date
Thomas S Hatch
68b5d29ea6 Get tests runnign until pydsl migration is complete 2013-02-08 13:21:35 -07:00
Thomas S Hatch
3719982399 stub out another event test that needs refinement 2013-02-08 13:14:45 -07:00
Thomas S Hatch
107b97e952 Add test to verify loader modules 2013-02-08 11:14:22 -07:00
Thomas S Hatch
3d006ddd1c Stub out unreliable event test until it can be stabalized 2013-02-08 11:07:40 -07:00
Thomas S Hatch
42024cab39 Clean out unused code 2013-02-08 10:57:20 -07:00
Thomas S Hatch
3d1cf71a77 Combine compound matcher tests 2013-02-08 10:57:20 -07:00
Thomas S Hatch
2edd526c71 Remove unused import 2013-02-08 10:57:20 -07:00
Colton Myers
bae02c930e Add None checks for eventfired in event.py 2013-02-07 17:51:32 -07:00
Thomas S Hatch
5b16fed6cc remove unused import 2013-02-07 17:39:20 -07:00
Thomas S Hatch
8fb36351b3 remove unused import 2013-02-07 17:38:36 -07:00
Thomas S Hatch
52be720d62 Remove unused grains lookup 2013-02-07 17:37:13 -07:00
Colton Myers
37b025490b Fix indent style issue 2013-02-07 17:31:10 -07:00
Colton Myers
53f1c86013 Add pip.py test for upgrading packages 2013-02-07 17:31:10 -07:00
Thomas S Hatch
b86a8d6da8 Pylint cleanup for salt log tests 2013-02-07 15:50:43 -07:00
Thomas S Hatch
c5f5bd1e99 Fix tests to better reflect doc matching updates 2013-02-07 15:11:42 -07:00
Thomas S Hatch
8dadd37e0c Fix the sockdir path in eventlisten 2013-02-07 12:37:18 -07:00
Thomas S Hatch
4ec6722103 revert cmd_yaml change that broke basic functionality 2013-02-06 13:03:34 -07:00
Thomas S Hatch
47e08fc4fa Remove failing test, I am not sure how it ever passed... 2013-02-06 12:48:33 -07:00
Thomas S Hatch
59c4fdaf39 Merge pull request #3610 from s0undt3ch/develop
Fix test case and skip message.
2013-02-06 08:45:42 -08:00
Thomas S Hatch
5f0fc3a230 Merge pull request #3608 from s0undt3ch/issues/2587
Provide the information of git describe in a module when installing salt
2013-02-06 08:43:21 -08:00
Pedro Algarvio
aa721e89cf Fix integration.shell.call.CallTest.test_default_output. 2013-02-06 05:13:39 +00:00
Pedro Algarvio
df2ac900c3 Fix pydsl unittest skip message + PEP8. 2013-02-06 05:10:47 +00:00
Pedro Algarvio
f43b21516a Fix salt version unittest. 2013-02-06 04:59:26 +00:00
Denis Generalov
9325ec7bba Try to make some tests for sysctl module 2013-02-06 00:57:53 +04:00
Jack Kuan
9bf7f72a43 Now calling a state(id declaration) at compile/render time executes it using salt['state.high']().
Also fixed a bug: Now we prevent the use of extend() after ordered execution was turned on once.
2013-02-05 14:50:40 -05:00
Thomas S Hatch
f4005c0e0f Merge pull request #3546 from kjkuan/pydsl_include
Add support for #3483
2013-02-04 11:58:22 -08:00
Pedro Algarvio
8f851e0a9a Renamed environment variable and create directory if it does not exit.
New environment variable name is `SALT_XML_TEST_REPORTS_DIR`.
2013-02-02 18:27:59 +00:00
Pedro Algarvio
6efbc51aae Remove bad xml reports option.
* `xmlrunner` proved to be a way better choice than `junitxml` and it's even parsable by Bamboo. The output of `junitxml` is not.
* The output directory can be tweaked with the environment variable `SALT_XML_TEST_REPORTS`.
2013-02-02 18:22:31 +00:00
Pedro Algarvio
b994f3e697 Re-use the same file for JUnit xml text results instead of overriding. 2013-02-01 18:55:34 +00:00
Jack Kuan
b7571dd891 Add support for #3483([pydsl] Import Python definitons from included files). 2013-02-01 12:32:19 -05:00
Pedro Algarvio
17c6151cf8 Add --no-colours to runtests.py. Refs #3511. 2013-01-30 21:01:20 +00:00
Pedro Algarvio
17aee1fc32 Add JUnit compatible xml output to the tests suite. 2013-01-30 20:42:30 +00:00
Pedro Algarvio
ed7c4c97f8 Group parser options. 2013-01-30 20:10:45 +00:00
Thomas S Hatch
a6df51ab1a Fix test failure due to update in the default nested outputter 2013-01-29 10:23:22 -07:00
Thomas S Hatch
a58202c2f7 Add compound matcher tests 2013-01-29 10:20:02 -07:00
Thomas S Hatch
dd28185763 Merge pull request #3459 from archtaku/tests
Add tests for nested grain/pillar matching
2013-01-25 22:24:42 -08:00
Erik Johnson
77eeb47bea Add tests for nested grain/pillar matching
Also added tests for traditional grain matching when target grain is a
list.
2013-01-26 00:13:51 -06:00
Thomas S Hatch
4c95f0e0ea fix #3449 2013-01-25 21:16:11 -07:00
Jack Kuan
0976f42410 Fix test case skipping logic: if < py2.7 then no OrderedDict, so skip.
For ordered execution, PyDSL requires py2.7 or above. Although, it's
possible to make it work with a third-party OrderedDict implementation
like the yaml renderer does..., this is not bothered here.
2013-01-24 12:21:54 -05:00
Pedro Algarvio
eb38c4de5f Fix supervisor test. 2013-01-23 23:23:05 +00:00
Pedro Algarvio
34522907e8 One more grain.item fix to comply with new dict output. 2013-01-23 23:00:19 +00:00
Pedro Algarvio
0207416f3c Conform with the dict return type for 'salt.modules.grains.item'. 2013-01-23 22:51:45 +00:00
Jack Kuan
5ad5cd9b6e Fix a bug in the pydsl test case. 2013-01-21 10:27:06 -05:00
Thomas S Hatch
99172816ea Merge pull request #3329 from mjarco/fix-config-options-defaults
Default options were never returned if omit_pillar flag was set to false (or unset)
2013-01-20 20:17:39 -08:00
Jack Kuan
897f877bed Added docs for pydsl and fixed a syntax inconsistency. 2013-01-20 01:21:05 -05:00
Pedro Algarvio
3629fe88c0 Fix tests.unit.pydsl_test and tests.unit.stateconf_test.
No more errors are shown because the configuration files are not readable, and in fact, the minion configuration can be use, unlike what was said in the comment.
2013-01-20 04:09:07 +00:00
Thomas S Hatch
86ed822148 Single quotes 2013-01-19 18:22:54 -07:00
Michał Jarco
77f898b0cb Simplistic tests (still better than none) 2013-01-19 15:02:06 +01:00
Pedro Algarvio
09bba5b054 git describe sha signatures have a length of 8 chars. 2013-01-19 05:07:41 +00:00
Pedro Algarvio
7694829219 Also include the number of commits after the found tag. 2013-01-19 04:38:36 +00:00
Pedro Algarvio
d3391f4db0 Harden git describe parsing so it does not fail on awkward situations.
This issue came up because a user is using custom tags and git describe for him is something like `debian/0.11.1+ds-1-3-ga0afcb`.
Added unittests for this.
2013-01-19 02:31:00 +00:00
Thomas S Hatch
08471effee Merge pull request #3320 from kjkuan/pydsl-updates
Pydsl updates
2013-01-18 11:27:16 -08:00
Jack Kuan
a678901c48 Fix test cases for py2.6. 2013-01-18 14:14:42 -05:00
Jack Kuan
9c35844c56 Make pydsl work with stateconf.
- Added implicit ordering to pydsl.(turned on via __pydsl__.set(ordered=True))

- Fixed a KeyError bug in stateconf renderer that happens during id renaming.

- The stateconf renderer now generates a no-op start state as the
  "first" state in a sls file.(enabled via -s)

- Made the stateconf renderer take high state input via the new -p
  option, so we can pipe pydsl output into it.

- Added more and fixed some test cases for stateconf and pydsl.
2013-01-18 12:34:56 -05:00
Thomas S Hatch
e354080dd7 don explicitly add node on eventlisten 2013-01-17 14:00:53 -07:00
Thomas S Hatch
bbad93c386 Add skipif to a test that requires root 2013-01-17 13:29:49 -07:00
Pedro Algarvio
dcb8477f7d Fix phrasing. 2013-01-16 00:11:48 +00:00
Pedro Algarvio
d2f5461a09 Fix the test skip in case of a lower git describe parsed version info. 2013-01-16 00:02:20 +00:00
Pedro Algarvio
44b45ffa0c Too much spaces(PEP-8). 2013-01-15 22:55:20 +00:00
Pedro Algarvio
b1488b61c5 Fix integration.shell.key output tests. 2013-01-15 21:53:29 +00:00
Thomas S Hatch
603be37e2b Merge pull request #3280 from s0undt3ch/develop
Several deprecation fixes, enhancements, clarifications, for 0.12
2013-01-15 13:43:53 -08:00
Pedro Algarvio
b9afd32994 If the parsed version info is higher, then we're most likely about to release a new salt version. 2013-01-15 19:42:24 +00:00
Pedro Algarvio
4adaab4dce Update tests to the new deprecation message. 2013-01-15 19:42:01 +00:00
Pedro Algarvio
b2e5cbb56c Merge branch 'develop' of github.com:saltstack/salt into develop 2013-01-15 19:33:18 +00:00
Pedro Algarvio
392bb8ce1d Remove the deprecation config tests. Lower the salt call's timeout to 30 secs. Refs #3271. 2013-01-15 19:19:57 +00:00
Thomas S Hatch
a1de80e5c6 Merge pull request #3257 from mjarco/fix-local-jinja-template-resolution
Fix jinja template includes lookup with salt-call --local mode
2013-01-15 11:03:54 -08:00
Pedro Algarvio
9e804add7a Simplify logic of getting the temporary directory. 2013-01-15 17:50:09 +00:00
Pedro Algarvio
d61ef51e7a Show why git describe failed on the tests. 2013-01-15 14:16:39 +00:00
Thomas S Hatch
89525ad6d0 remove pre 0.12.0 test handles 2013-01-15 00:10:19 -07:00
Thomas S Hatch
4617a931be Remove debugging pprint 2013-01-14 23:53:18 -07:00
Thomas S Hatch
1ddcd715fb Reached 0.12, fix outputter test 2013-01-14 23:40:20 -07:00
Thomas S Hatch
ad452f0b64 clean up stray prints 2013-01-14 23:08:36 -07:00
Thomas S Hatch
7c8ca7e1d6 remove recursive git test
The problem here is that we will need to create a small static
git repo somewhere first, relying on the mozilla one causes
other tests to fail due to timeouts and makes the test run VERY
long
2013-01-14 22:55:24 -07:00
Thomas S Hatch
2ca04f4671 Stop downloading giant git repos in the test suite
THIS WAS NOT OK!!!
2013-01-14 22:51:21 -07:00
Thomas S Hatch
6aff022b98 Merge pull request #3269 from kjkuan/pydsl
A Python DSL(module and renderer) for generating Salt's highstate data structure.
2013-01-14 21:01:46 -08:00
Thomas S Hatch
a24ff1852a remove unused import 2013-01-14 21:50:56 -07:00
Jack Kuan
791ca1cb44 Add test cases and fixed some corner cases. 2013-01-14 23:29:35 -05:00
Jack Kuan
a8b8a6eb18 Add a test module for pydsl and some bug fixes. 2013-01-14 23:29:35 -05: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
36955b4560 Fix integration.shell.matcher.MatchTest.test_ipcadr.
Was skipping because of the latest output changes and how output parsing was done.
2013-01-14 13:04:23 +00:00
Pedro Algarvio
2f3bb49f83 Fix getting the output of git describe into salt's version string. Added a test case for this too. 2013-01-14 12:35:42 +00:00
Michał Jarco
7f782afb14 Fixed jinja_tests.
File roots contains lists of paths for each env.
2013-01-14 08:58:27 +01:00
Pedro Algarvio
e9ca0a26d7 A little longer timeout. 2013-01-13 18:18:34 +00:00
Pedro Algarvio
3ff77c1958 Wait for the integration tests local client cmd's for, at most, 30 seconds. 2013-01-13 12:49:10 +00:00
Pedro Algarvio
633a313587 Lower integration tests local client timeout to 5 minutes. 2013-01-13 11:31:04 +00:00
Thomas S Hatch
ad63c17227 overcome value error in win status test 2013-01-13 00:09:28 -07:00
Thomas S Hatch
bdae844eec fix outputter tests that come with changes in the default outputter 2013-01-13 00:01:30 -07:00
Pedro Algarvio
fd2739401c Adapt to the new local client events changes. Fixes #3214. 2013-01-11 19:03:53 +00:00
Pedro Algarvio
39f03c59cd The test suite local client now properly receives the events. Fixes #3214.
* We were instantiating the integration testing local client too soon in the process. Deferring it to a little latter made it all work.
* Added the ability to dump the master and minion testing configurations to files. Just prepend the `runtests` call with `DUMP_SALT_CONFIG=1` and you'll get the computed configuration files in `/tmp/salttest/{master,minion}`.
* We now also un-subscribe from the event's once done.
* Added `salt.utils.event.LocalClientEvent` just to differentiate from `salt.utils.event.MasterEvent` in the logs so we know who's who. It's just a subclass of the latter.
2013-01-11 16:21:04 +00:00
Thomas S Hatch
d95a8e612f clean up some double quotes 2013-01-10 00:25:02 -07:00
Pedro Algarvio
c20cb1da51 Fix logging unit tests. Thanks @shadowfax-chc. 2013-01-08 03:41:59 +00:00
Pedro Algarvio
f8073a08eb Warn about low mock version instead of mock not available. 2013-01-04 17:45:06 +00:00
László Vaskó
7ff2ab7d58 win_status_test: added pid explicitly 2012-12-31 11:45:54 +01:00
László Vaskó
d6d9e9ce47 win_status: finalize COM library properly 2012-12-31 11:45:54 +01:00
László Vaskó
51150f1427 win_status: handle if CommandLine is None 2012-12-31 11:45:54 +01:00
Thomas S Hatch
a601af6955 Merge pull request #3071 from s0undt3ch/hotfix/pylint/C0103
Fixes for pylint's C0103 msgid
2012-12-30 20:22:42 -08:00
Thomas S Hatch
66ae9bcc67 Merge pull request #3080 from vlaci/master
'status.procs' function implementation and tests for windows
2012-12-30 20:03:07 -08:00
László Vaskó
ecef344c61 Added 'status.procs' function for windows 2012-12-31 01:34:38 +01:00
Pedro Algarvio
d8d9d14d5a Fix the stateconf unit test. Refs #1775 2012-12-29 22:19:17 +00:00
Jeff Schroeder
8b74360493 Skip the git state tests if a dns lookup to github.com fails
This is the quickest clever thing I could think of while running the
unit tests offline in the car during a long road trip.
2012-12-21 23:32:11 -06:00
Jeff Schroeder
4da4dc25a1 Skip the virtualenv state test if virtualenv isn't installed 2012-12-21 21:35:58 -06:00
Ryan Schneider
8f8cc74b34 Some minor cleanup of unit and integration tests. 2012-12-18 17:39:16 -08:00
Pedro Algarvio
ab74952a37 Since salt versioning changed, so should the depending deprecations.
The are some output parser options which should be triggering warnings salt 0.10.6 and should start triggering failures when 0.10.7 came out. Adapt these dependable deprecations to the new versioning convention.
2012-12-15 00:13:31 +00:00
Thomas S Hatch
aa1c55f610 Add tests for pillar matching list objects Fix #2761 2012-12-12 16:37:21 -07:00
Thomas S Hatch
f94637b4b4 Add a pilla rlist to test advanced pillar matching 2012-12-12 16:30:17 -07:00
Thomas S Hatch
648e6b8eca Fix eventlisten for changes made to 0.10.6 2012-12-12 13:14:13 -07:00
David Boucha
6765a56032 Use TMP_STATE_TREE 2012-12-12 11:49:28 -07:00
David Boucha
dbc5d4ca9c Fixes #2594 Verify that changes in req file work
After the first invocation of this venv, new additions to the
requirements.txt would not be honored.
2012-12-12 11:49:28 -07:00
Pedro Algarvio
c0455f8fa9 Support creating state files at runtime.
We now support runtime created files that can be used like `salt://my-temp-file.txt`.
Just make sure you write them to `os.path.join(integration.TMP_STATE_TREE, 'my-temp-file.txt')`.
2012-12-12 18:38:39 +00:00
Pedro Algarvio
952779aa26 More code reuse in SaltReturnAssertsMixIn.
The methods `assertSaltTrueReturn`, `assertSaltFalseReturn` and `assertSaltNoneReturn` now reuse the code from `__getWithinSaltReturn` making `__assertReturn` obsolete and for that removed.
2012-12-12 17:11:44 +00:00
Pedro Algarvio
b9e72e7c3c Abstract SaltReturnAssertsMixIn to allow more tests using it.
* Created a method which gets a deep keyed value in a salt state return. For example, allow getting, `ret['changes']['new']`.
* Created a method which tries to make sure the correct type of the passed keys for the above added method.
* Also added were the methods, `assertInSaltReturn`, `assertNotInSaltReturn`, `assertInSaltReturnRegexpMatches`, which simplified the existing `assertInSaltComment`, `assertNotInSaltComment`, `assertSaltCommentRegexpMatches`, `assertSaltStateChangesEqual` and `assertSaltStateChangesNotEqual`, also allowing to do similar tests in every key(deep or not) of a salt state return dictionary.
2012-12-12 13:38:03 +00:00
Pedro Algarvio
7c6feb8c18 Fix a bug! It's basestring not string. 2012-12-12 00:33:54 +00:00
Joseph Hall
d0f101650d Give each minion its own pkidir (still using identical keys) 2012-12-11 14:41:40 -07:00
Ramón Cahenzli
a30f2ee244 This root or that root? :) 2012-12-11 16:37:30 +01:00
Pedro Algarvio
f76facf045 Missed one logging handler method. 2012-12-11 12:57:06 +00:00
Thomas S Hatch
9d427c868d Merge pull request #2861 from s0undt3ch/hotfix/headers
Header updates. More copyright to the SaltSatck team. Code author to me(where applicable).
2012-12-11 04:50:37 -08:00
Pedro Algarvio
8c2cadcc13 Mimic some logging handler attributes and methods. 2012-12-11 12:18:48 +00:00
Pedro Algarvio
64a0d631e1 Fix rvm unit tests. 2012-12-11 11:27:21 +00:00
Pedro Algarvio
7c5a5d0bd3 Header updates. More copyright to the SaltSatck team. Code author to me(where applicable). 2012-12-11 10:23:37 +00:00
Pedro Algarvio
8d092afddc Don't assume digits in logging format strings. Refs #2859, fixes #2853.
Sorry @ryanschneider for stepping in on your fix.

Nothing is assumed now, and several checks are made. If any of the checks fail, nothing else is done in `salt.log.Logging.__new__()`.
Added a test case which will take care of possible regressions on this bug fix.
2012-12-11 10:10:03 +00:00
Thomas S Hatch
17ee950955 Merge branch 'small-changes' of git://github.com/holmboe/salt into holmboe-small-changes
Conflicts:
	salt/modules/systemd.py
2012-12-08 21:52:51 -07:00
Henrik Holmboe
5bcce96761 Update import in unit test.
https://travis-ci.org/holmboe/salt/jobs/3563157
2012-12-08 10:37:26 +01:00
Henrik Holmboe
a607016198 Update import in unit test.
https://travis-ci.org/holmboe/salt/jobs/3563086
2012-12-08 09:44:51 +01:00
Pedro Algarvio
5ca7762784 Don't switch assertion case. Fix test. 2012-12-07 19:05:19 +00:00
Pedro Algarvio
871516b4cf Migrated test.integration.modules.state to use SaltReturnAssertsMixIn. 2012-12-07 18:44:06 +00:00
Pedro Algarvio
4348734697 Add integration.SaltReturnAssertsMixIn where it was lacking in previous commits. 2012-12-07 17:13:58 +00:00
Pedro Algarvio
0baa63c19f Remove deprecated tests functions.
Removed `ModuleCase.assert_success()` and `ModuleCase.state_result()` which are now better tested using `SaltReturnAssertsMixIn`
2012-12-07 17:09:11 +00:00
Pedro Algarvio
e03a2606a1 Migrated test.integration.states.supervisord to use SaltReturnAssertsMixIn. 2012-12-07 17:03:24 +00:00
Pedro Algarvio
cbea092b0c Migrated test.integration.states.rabbitmq_* to use SaltReturnAssertsMixIn. 2012-12-07 17:01:31 +00:00
Pedro Algarvio
fc3b272809 Migrated test.integration.states.pip to use SaltReturnAssertsMixIn.
* Added `assertSaltCommentRegexpMatches()` to `SaltReturnAssertsMixIn` to add the ability to match salt comments using regular expressions.
2012-12-07 16:59:24 +00:00
Pedro Algarvio
156ce07bde Migrated test.integration.states.host to use SaltReturnAssertsMixIn. 2012-12-07 16:35:20 +00:00
Pedro Algarvio
c1c3b31d0b Migrated test.integration.states.git to use SaltReturnAssertsMixIn. 2012-12-07 16:33:38 +00:00
Pedro Algarvio
b210d59eb8 Migrated test.integration.states.file to use SaltReturnAssertsMixIn. 2012-12-07 16:25:26 +00:00
Pedro Algarvio
4b1747468b Adapted tests.integration.states.ssh to use SaltReturnAssertsMixIn.
* Two new methods were added to `SaltReturnAssertsMixIn`, `SaltReturnAssertsMixIn.assertSaltStateChangesEqual()` and `SaltReturnAssertsMixIn.assertSaltStateChangesNotEqual()`, in order to be able to test salt state returns. These methods, besides asserting that the state was correctly applied using `SaltReturnAssertsMixIn.assertSaltTrueReturn()`, are also able to test for what's in the `changes` key of salt's return, it can even "go inside" the `changes` dictionary, just have a look at what was done in `tests.integration.states.ssh`.
2012-12-07 12:46:02 +00:00
Pedro Algarvio
6c22f65a56 test_issue_2731_masterless() should clean-up after. 2012-12-05 21:24:19 +00:00
Pedro Algarvio
957f9c61b7 Quiet down these tests a little bit. 2012-12-04 19:14:35 +00:00
Pedro Algarvio
2d15b79114 Fix sync minions Process target. Correct sync'ed output. 2012-12-04 17:36:45 +00:00
Pedro Algarvio
65094c744a Stop using py27_subprocess under python 2.6 2012-12-04 16:29:53 +00:00
Pedro Algarvio
42799e0953 Fix '--clean/--no-clean' logic needed to sync minions. 2012-12-04 13:36:33 +00:00
Pedro Algarvio
f66c7741ff Allow more time for minions to sync. 2012-12-04 13:02:56 +00:00
Pedro Algarvio
a004639b99 Reuse getting a local client code with SaltClientTestCaseMixIn. 2012-12-04 11:51:37 +00:00
Pedro Algarvio
e2d404950b Show us the pid for which the test suite is running under. 2012-12-04 11:24:24 +00:00
Pedro Algarvio
08aaecee12 Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources 2012-12-04 00:55:50 +00:00
Pedro Algarvio
b0f594f452 run_script timeout's are not supported under windows. 2012-12-03 23:58:08 +00:00
Pedro Algarvio
3b0388c8f4 Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources 2012-12-03 23:42:23 +00:00
Pedro Algarvio
b866ca3af0 Just detach from parent group. 2012-12-03 23:41:45 +00:00
Pedro Algarvio
9e89f357aa Remove unused code. 2012-12-03 23:36:20 +00:00
Pedro Algarvio
5d274e8b7d Let's keep using multiprocessing. 2012-12-03 23:35:32 +00:00
Pedro Algarvio
2246bf3d33 Remove unused code. 2012-12-03 23:32:58 +00:00
Pedro Algarvio
7b10a7cd64 Merge branch 'develop' of github.com:saltstack/salt into hotfix/gdb-resources 2012-12-03 23:31:29 +00:00