Commit Graph

1685 Commits

Author SHA1 Message Date
regilero
5d248146df Remove wrong comments on prereq working test 2013-11-24 18:33:15 +01:00
regilero
aaa6f44677 Missing states for the mixed require and prereq mixed tests 2013-11-24 18:30:44 +01:00
regilero
8177f2b609 Add another working prereq simple test 2013-11-24 18:30:15 +01:00
regilero
0354e408e3 Comments on require test example 2013-11-24 18:28:59 +01:00
regilero
ddb99a570d require and prereq mixed tests, mostly failing, see #8785 2013-11-24 18:28:22 +01:00
Pedro Algarvio
f0bf78cdc0 Correct the state test case and respective expected output. 2013-11-24 12:15:20 +00:00
Pedro Algarvio
a752421b87 Expose a copy of the state dictionary to state functions.
Fixes #8343 since `__sls__` is now available in `__state__` and not on `kwargs`.
Closes #8709 since it's not the right approach.
Fixes #8710 and closes #8711 since I've cherry-picked the fix for #8710 in from #8711.
2013-11-24 11:08:33 +00: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
e4c68d1a94 small typo 2013-11-23 16:47: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
Mathieu Le Marec - Pasquet
50c1235502 add a test for #8707 2013-11-21 12:57:51 +01:00
Jeffrey C. Ollie
b1fb52a680 fix more funcion => function typos 2013-11-15 14:50:17 -06:00
Emil Stenqvist
f487d5568a Fix for issue #8519
Also added a test that fails prior to the fix, illustrating the problem.
2013-11-14 14:26:35 +01:00
Pedro Algarvio
8ba59ea6c6 Adapt the tests to the latest Jinja2 template changes. 2013-11-14 01:21:57 +00:00
Pedro Algarvio
55e0290da6 Fix the mocked contents pillar file state tests. 2013-11-12 07:55:03 +00:00
Pedro Algarvio
54fc502de0 Some more saltenv related tests. 2013-11-12 06:29:55 +00:00
Pedro Algarvio
f25f0a41b2 Deprecate env usage in favor of saltenv. 2013-11-12 01:01:51 +00:00
Pedro Algarvio
097aed1e7e Show the error in case of failure. 2013-11-12 01:01:51 +00:00
Pedro Algarvio
f4cba0d293 Deprecate env usage in favor of saltenv. 2013-11-12 01:01:50 +00:00
Pedro Algarvio
d88d34ca24 The GitHub IP changed. 2013-11-11 07:45:10 +00:00
Pedro Algarvio
4fb38e1e91 Merge pull request #8385 from s0undt3ch/hotfix/test-kwarg
Document passing arguments with equal signs. Refs a1ba178d.
2013-11-10 10:28:20 -08:00
Pedro Algarvio
a192d03ffb Only delete the file if it actually exists. 2013-11-10 15:36:39 +00:00
Pedro Algarvio
66cf8f1845 The argument name is arg, not args. 2013-11-10 15:36:11 +00:00
Pedro Algarvio
0f25353e08 Pass a relative path for proper test execution.
If we're trying to test a failure which happens when the path is not absolute, let's not pass it an absolute path in the first place.
2013-11-10 15:30:42 +00:00
Pedro Algarvio
c66fc86f79 Document passing arguments with equal signs. Refs a1ba178d.
Add additional documentation regarding arguments passing with equal signs for which salt tries hard to turn into keyword arguments. The problem now arises because non supported arguments immediately thrown an exception.
2013-11-10 11:40:01 +00:00
Joseph Hall
34360ac306 Merge pull request #8373 from s0undt3ch/develop
Typo
2013-11-09 05:29:57 -08:00
Pedro Algarvio
b5c9815e9a Arguments like pip==1.0 must not match yaml'ification as as keyword arguments. 2013-11-09 10:32:27 +00:00
Pedro Algarvio
544f7e127d Don't use the deprecated self.assertEquals(). 2013-11-09 09:01:18 +00:00
Pedro Algarvio
dfab7aab73 Adapt the runtests parser to support running the tests suite under a Docker container. 2013-11-08 20:20:03 +00:00
Pedro Algarvio
960118df29 Reintroduce the removed grains information.
Removed on 4617a931be and 52be720d62.
2013-11-08 19:50:38 +00:00
Pedro Algarvio
34ed606b0d Revert "Remove debugging pprint"
This reverts commit 4617a931be.
2013-11-08 19:39:30 +00:00
Pedro Algarvio
3b1f2126fb Revert "Remove unused grains lookup"
This reverts commit 52be720d62.
2013-11-08 19:39:12 +00:00
Thomas S Hatch
0ca3a1093b Merge pull request #8332 from s0undt3ch/issues/__sls__-KeyError
Take into account python types not just Yaml strings
2013-11-07 16:01:16 -08:00
Thomas S Hatch
d4ddb8344d Merge pull request #8329 from cachedout/#8259
Exception handling for missing id
2013-11-07 15:59:39 -08:00
Pedro Algarvio
77101231f2 Install a smaller and with less dependencies package. 2013-11-07 22:09:36 +00:00
Mike Place
00c7d36966 Exception handling for missing id
Refs #8259. We don't like tracebacks. Includes unit test.
2013-11-07 11:59:07 -07:00
Seth House
cf3df20aad Merge pull request #8323 from regilero/default-for-grains_filter_by
Default for filter_by method in module grains
2013-11-07 09:38:26 -08:00
Colton Myers
78662d270b Merge pull request #8325 from cachedout/#7860
Add a dir_mode to file.managed
2013-11-07 09:35:54 -08:00
Mike Place
2e6bf21635 Integration testing for file.managed dir_mode argument.
Added documentation for dir_mode to file.managed.
2013-11-07 10:19:16 -07:00
regilero
9dce9ac304 Add unit tests for grains.filter_by 2013-11-07 17:15:30 +01:00
Henrik Holmboe
043f9bf85a Fix typos 2013-11-07 10:06:37 +01:00
Thomas S Hatch
e64f7b0633 Merge pull request #8311 from s0undt3ch/issues/8196-environments
Some more `saltenv` related changes/fixes
2013-11-06 16:07:25 -08:00
Pedro Algarvio
0f9ded1a7a Fix the pip unit tests with regards to the latest saltenv changes. 2013-11-06 23:53:45 +00:00
Pedro Algarvio
ec0a4bca8e URL environment selection should also be using saltenv. 2013-11-06 23:36:40 +00:00
Thomas S Hatch
68d5b2c21a Merge pull request #8289 from jacksontj/develop
Covering case where kwarg cannot be un-yaml'd
2013-11-06 15:05:14 -08:00
Pedro Algarvio
b82a051aef Correctly trigger the issue reported on #8196. 2013-11-06 22:49:29 +00:00
Pedro Algarvio
3477300d7f Add a test case to check for proper env selection when passing ?env=foo. Refs #8196. 2013-11-06 22:47:55 +00:00
Thomas S Hatch
a343e69d02 Merge pull request #8230 from s0undt3ch/issues/8196-environments
Properly pass `__env__` to states.
2013-11-06 14:23:26 -08:00
Pedro Algarvio
962f8d4149 Support adding files to the testing prod state env. 2013-11-06 20:18:47 +00:00
Pedro Algarvio
9a22d3053e The pip module no longer accepts __env__ as a kwarg. 2013-11-06 20:15:23 +00:00
Pedro Algarvio
4c84b1da3e State unit tests need to have an hardcoded __env__. 2013-11-06 20:04:54 +00:00
Pedro Algarvio
56129e3610 Include the holy directory for the __env__ selection test cases. 2013-11-06 20:04:54 +00: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
0a03ecc6bc Add required state file. 2013-11-06 20:04:10 +00:00
Pedro Algarvio
e334e232d1 Forgot to add the top file. 2013-11-06 20:04:10 +00:00
Pedro Algarvio
ec76b188b1 Correctly trigger the issue reported on #8196. 2013-11-06 20:03:44 +00:00
Pedro Algarvio
2924f1c14a Add a test case to check for proper env selection when passing ?env=foo. Refs #8196. 2013-11-06 20:03:44 +00:00
Erik Johnson
5ef4b31e97 Include more information in test docstrings
This adds additional information that describes the relevant code being
tested, so that if there is a problem it is easier to trace it back to
where the problem lies.
2013-11-06 14:03:33 -06:00
Erik Johnson
3c799c0bd5 Add test for arguments with dashes in the arg name 2013-11-06 14:00:02 -06:00
Erik Johnson
f24fb7c26f Add test for unsupported kwarg 2013-11-06 13:38:30 -06:00
Thomas Jackson
01f2d119b1 Covering case where kwarg cannot be un-yaml'd
In the past the master has been taking the kwargs passed in and converting them to a string (kwy=value) and letting the minion de-yaml that arg string. In general this is okay, but it doesn't work well if you are calling from the python LocalClient interface-- since the kwarg you passed already had a type. With this change instead of converting the kwarg to a string it is converted to a dict with a flag to mark it as a kwarg dict, then it is unpacked on the minion side while still maintining type
2013-11-05 19:04:23 -08:00
Pedro Algarvio
c849c4b57f Moved test cases from #8195 to a better place. 2013-10-31 18:54:25 +00:00
regilero
089787cead Integration tests for #8174, #7905 & #8114: sls syntax errors 2013-10-31 14:30:25 +01:00
Pedro Algarvio
798e1830d5 Provide a default PATHEXT environment variable.
Added test case which relies on the `PATHEXT` environment variable.
2013-10-28 16:05:19 +00:00
Pedro Algarvio
c8c6dab678 Add some comments to explain whats going on. 2013-10-27 16:53:39 +00:00
Pedro Algarvio
79391f107b Provide a mocked version the tests to reach windows specific code. 2013-10-27 16:53:39 +00:00
Erik Johnson
a9d1c12481 Add unit test for salt.utils.which
This is a Linux-only test, it will need some mock love to make it
suitable to test for windows paths.
2013-10-27 16:53:39 +00:00
Thomas S Hatch
962b99693e Merge pull request #8117 from s0undt3ch/develop
Loader Test Cases
2013-10-26 13:05:04 -07:00
Pedro Algarvio
4b46ee5017 Remove unnecessary imports. 2013-10-26 18:59:44 +01:00
Pedro Algarvio
f96c01738e Provide the loader integration tests in it's own package. 2013-10-26 18:57:00 +01:00
Pedro Algarvio
3bedf7c751 Some more tests within the test case. 2013-10-26 18:45:21 +01:00
Pedro Algarvio
ce553415cc Provide test case to prove proper loader function override. Refs #8096. 2013-10-26 18:06:28 +01:00
Henrik Holmboe
c0aecc7c4b Use ElementTree from salt.utils._compat
Also remove duplicate import of ElementTree.
2013-10-26 18:46:17 +02:00
Xavier Barbosa
a5575aca13 deprecated assertEquals 2013-10-25 02:33:17 +02:00
Xavier Barbosa
a218aea003 fix jinja unittest 2013-10-25 02:33:16 +02:00
Xavier Barbosa
1309ef9887 fix jinja rendering of nested structures 2013-10-25 02:33:16 +02:00
Henrik Holmboe
c10ed8ea60 Fix my typo 2013-10-24 11:42:52 +02:00
Henrik Holmboe
77fd1acb7f Change assertEquals to assertEqual
According to
http://docs.python.org/2/library/unittest.html#deprecated-aliases
assertEquals is a deprecated alias of assertEqual.
2013-10-24 11:39:04 +02:00
regilero
3db62ebc3f Add file.blockreplace module and state. With unit tests. 2013-10-23 16:36:59 +02:00
Erik Johnson
95efdad8ba Remove ubuntu 32-bit target 2013-10-20 21:47:05 -05:00
Erik Johnson
7984a8c2cf Apparently the test framework doesn't like private member functions 2013-10-20 21:46:06 -05:00
Erik Johnson
81434578fc Fix function name 2013-10-20 21:29:36 -05:00
Erik Johnson
1c0d279c59 Fix import error 2013-10-20 20:50:28 -05:00
Erik Johnson
9397840021 More tweaks to package tests
This makes package tests work better on CentOS 5, and also adds a 32-bit
target for Ubuntu.
2013-10-20 20:27:45 -05:00
Erik Johnson
90d6d045f1 Move _wait_for_pkgdb_unlock inside of PkgTest class 2013-10-20 18:48:01 -05:00
Erik Johnson
63ee0f1e83 Add function to wait for pkgdb lock to clear
Arch pkg tests that call pkg.latest_version seem to fail on running
this function due to the package database still being locked from
previous tests. This adds a function that waits (in 5 second increments)
for up to 60 seconds for the pkgdb to be unlocked.

http://jenkins.saltstack.com/job/salt-rs-arch/474/artifact/salt-runtests.log/*view*/
2013-10-20 18:18:35 -05:00
Erik Johnson
c5f5b400e9 adjust redhat pkg targets for pkg tests 2013-10-20 17:04:27 -05:00
Erik Johnson
62a9385ddf Don't perform version spec pkg tests on FreeBSD
pkg_add does not support this, so this test will fail when
pkg.latest_version is run and an assertion is done to determine the
targeted version.
2013-10-20 16:00:14 -05:00
Erik Johnson
5dc08d552a adjust pkg targets for pkg tests 2013-10-20 15:48:57 -05:00
Erik Johnson
fe1c4487e3 add tests for installing 32-bit packages 2013-10-20 15:16:36 -05:00
Erik Johnson
c7fcc79747 Add tests for pkg.installed with version specification 2013-10-20 14:35:10 -05:00
Erik Johnson
9d75d7a425 Change packages for pkg.installed tests on Debian-based systems
Travis-CI uses Debian/Ubuntu VMs and bzr is on their base image, so this
causes these tests to fail on Travis. This replaces bzr for tests on
Debian-based OSes.
2013-10-19 10:48:10 -05:00
Erik Johnson
0205f28e4a Add pkg.installed tests 2013-10-19 09:50:48 -05:00
C. R. Oldham
66e3be46d1 Make sure multiple names clauses retain same order 2013-10-18 14:57:48 -06:00
Thomas S Hatch
ca77c58b41 Merge pull request #7942 from kretz/rbenv-support-in-gem
Support gem execution with rbenv ruby.
2013-10-18 09:59:55 -07:00
Martin Kretz
2e1db23b15 Added testcases to suppor rbevn in gem. 2013-10-18 13:44:45 +02:00
Thomas S Hatch
fef1647e97 Merge pull request #7889 from holmboe/virt-tmpl-refactor
Templating refactor in virt.py
2013-10-17 11:09:34 -07:00
Pedro Algarvio
9181ac81b9 Update the alternatives mocked unit tests to the new python_shell argument to cmd. 2013-10-16 23:43:27 +01:00
Pedro Algarvio
db670d1357 Don't fail if process already killed. 2013-10-16 23:27:19 +01:00
Pedro Algarvio
badf339b01 Improve code readability. 2013-10-16 21:51:51 +01:00
Henrik Holmboe
aa1bfc8947 Use same unit as input 2013-10-16 21:16:48 +02:00
Henrik Holmboe
f5fa6afe83 Add another unit test for disk controller 2013-10-16 21:10:59 +02:00
Henrik Holmboe
4460ed4d69 Add unit test for disk controller 2013-10-16 21:06:26 +02:00
Henrik Holmboe
fb569991b5 Add unit test for boot device 2013-10-16 20:53:37 +02:00
Thomas S Hatch
bbd159f8a0 Not sure why we are removing a file from the source halfway in a
test, this should fix the failing test, @s0undt3ch, if this break
something I am not seeing please let me know
2013-10-16 12:17:59 -06:00
Thomas S Hatch
3143cb6e48 import skipif 2013-10-16 12:13:16 -06:00
Pedro Algarvio
40d70fb13f os.getcwd() might thrown an OSError if it was deleted or moved.
Let's not fail because of that.
2013-10-16 17:32:22 +01:00
Pedro Algarvio
7de1cda6da The test needs to be executed as root to pass. 2013-10-16 17:27:05 +01:00
Pedro Algarvio
9f29d0012e Fix typo from 6bc5ea34. 2013-10-16 16:37:36 +01:00
Seth House
bd897c0bdb Add unit test for the "python" jinja filter
Missing from c91fe1c (pull req #7866).
2013-10-16 09:24:40 -06:00
Seth House
54cc36566e Added a pprint.pformat Jinja filter to match the file.serialize state 2013-10-16 09:23:14 -06:00
Henrik Holmboe
479050b5ee Fix logic regarding telnet console and port
Provide a (temporary) default. Previously it was possible to skip
specifying telnet_port and it would result in a incomplete XML.
2013-10-16 17:20:47 +02:00
Henrik Holmboe
9add77a02a Add unit test for tcp/telnet console 2013-10-16 17:04:11 +02:00
Henrik Holmboe
e29e0408b1 Make unit tests verify the disk entries in virt._gen_xml() 2013-10-16 16:05:09 +02:00
Henrik Holmboe
4345f3a126 assertEqual gives relevant information on fail 2013-10-16 10:18:03 +02:00
Henrik Holmboe
739a644a42 Use assertEqual, less to type 2013-10-16 10:14:50 +02:00
Henrik Holmboe
4e194c2782 Whitespace. 2013-10-16 10:08:28 +02:00
Henrik Holmboe
d4164d2eb7 Add unit test for virt._gen_vol_xml() 2013-10-16 09:58:37 +02:00
Thomas S Hatch
aa584dc255 Add ret value to test return data 2013-10-15 17:05:04 -06:00
Thomas S Hatch
ca0e967c13 Assign the ret value 2013-10-15 17:03:12 -06:00
Thomas S Hatch
6bc5ea34e9 Ensure that the ports are integers 2013-10-15 16:59:44 -06:00
Thomas S Hatch
8612f7c007 Add ref to ret in test_7754 2013-10-15 16:34:17 -06:00
Thomas S Hatch
52f2b0feb7 Merge pull request #7858 from s0undt3ch/issues/6714
Test for the presence of a yaml parsing log message. Fixes #6714.
2013-10-15 15:08:56 -07:00
Thomas S Hatch
c12ef31f16 Merge pull request #7855 from s0undt3ch/develop
Avoid unnecessary `KeyError`'s while testing.
2013-10-15 15:07:26 -07:00
Pedro Algarvio
9caffa11e7 Test for the presence of a yaml parsing log message. Fixes #6714.
Additionally, moved the yaml syntax error checking to the proper place.
2013-10-15 22:54:15 +01:00
Pedro Algarvio
1bf652541d Avoid unnecessary KeyError's while testing. 2013-10-15 22:42:21 +01:00
Colton Myers
3e565737c6 Merge pull request #7853 from s0undt3ch/issues/7754
Fix syslog logic checks for `file://`, `tcp://` and `udp://`. Fixes #7754
2013-10-15 14:22:43 -07:00
Pedro Algarvio
e72b4a3492 Fix syslog logic checks for file://, tcp:// and udp://. Fixes #7754. 2013-10-15 22:09:37 +01:00
C. R. Oldham
8793429f72 Make sure that ssh keys don't get added with incorrect encoding types. 2013-10-15 11:48:28 -06:00
David Anderson
ec4475cf30 Fix issue 5951 - correct __opts__['file_roots'] in ext_pillars 2013-10-11 11:53:00 -06:00
Thomas S Hatch
98444b8169 Merge pull request #7750 from holmboe/pkill
Prettify subcommand to kill minions
2013-10-11 08:04:34 -07:00
Henrik Holmboe
4a48dc791b Prettify subcommand to kill minions
I realize that this is just cosmetic change. And possibly that there is
a compatibility issue, if minionswarm is to be used on platforms that
don't have pkill.
2013-10-11 10:02:23 +02:00
David Anderson
25b0e3f89e Restore the pillar[master][file_roots] when returning the pillar 2013-10-10 15:12:00 -06:00
Pedro Algarvio
30e747060d Jinja needs to be "fed" Unicode data. Fixes #7576.
Additionally, what's returned from `render_jinja_tmpl` is also a Unicode string to that the `SLS_ENCODER` can properly encode them. Encoding UTF-8 data as UTF-8 data using the `SLS_ENCODER` does not, of course, work.
2013-10-08 00:11:44 +01:00
Pedro Algarvio
a5a87ca1fc Mimic the test case shown @ http://goo.gl/UI7uS8 2013-10-08 00:11:19 +01:00
Luper Rouch
db8eef8f32 Fixed empty file case in modules.file.append()
Lines are simply inserted at the beginning of the file for empty files.
2013-10-07 16:31:42 +02:00
Luper Rouch
e5631f2671 Checking for newline at EOF in modules.file.append() 2013-10-07 16:17:25 +02:00
Pedro Algarvio
8f0a19946d Fix test_issue_6973_state_highstate_exit_code. 2013-10-04 21:31:46 +01:00
Pedro Algarvio
c5082f2a77 Patch salt.utils.which to fix Django tests.
After the check added in 8deefc16, the django salt module integration test cases started to fail if the django administration script was not found in `$PATH`.
2013-10-04 19:07:11 +01:00
Pedro Algarvio
3c4f33a935 Adapt remaining test cases which relied on old versioning scheme. 2013-10-04 13:10:35 +01:00
Thomas S Hatch
bb0ca15ebc Merge pull request #7187 from ajithhub/nics_as_list
Reorganize NIC Profiles as list of interfaces
2013-10-04 04:35:18 -07:00
Pedro Algarvio
1c191fb8bf Support named version strings mathematical comparison. 2013-10-04 09:53:51 +01:00
Pedro Algarvio
738902b322 Update current deprecation messages to use named versions. 2013-10-04 09:53:51 +01:00
Pedro Algarvio
f0b78cd916 Format version on deprecation messages.
Add a test case to check if a deprecation message get it's `version` format holder properly populated.
2013-10-04 09:53:51 +01:00
Pedro Algarvio
a9ceedb5eb warn_until and kwargs_warn_until are now aware of named versions.
Updated the warnings tests cases accordingly.
2013-10-04 09:53:50 +01:00
Pedro Algarvio
8c9fe2c5c1 Fix the kwargs_warn_until unit test case. 2013-10-04 09:53:50 +01:00
Pedro Algarvio
f028a004ad Fix the warnings unit test.
Since the `warn_until` function now parses and instantiates a `SaltStackVersion`, the `bugfix` part of the version info is always shown.
2013-10-04 09:53:50 +01:00
Pedro Algarvio
800c918729 Let SaltStackVersion be the original one, not a MagicMock'ed one 2013-10-04 09:53:50 +01:00
Ajith Antony
b95a5d9fd0 Virt Template deploy, and serial xml tests
- Added virt templates to setup
- moved NIC xml string template to file
- added tests for serial xml
2013-10-03 13:21:34 -05:00
Pedro Algarvio
1a3c11c1ca Logs download should be done in a separate step. 2013-10-03 18:49:34 +01:00
Ajith Antony
c7ae3ba592 Nic profile changes
- Implement 3 styles of profile definition
- Support both config.options and config.get
- Replaces NIC substituions with template
- xml unit tests fixed up
2013-10-03 12:06:19 -05:00
Ajith Antony
6ce3973c13 added main run to simple.py 2013-10-03 11:50:49 -05:00
Seth House
a4619a9c1c Actually run the file.replace unit tests... 2013-10-03 09:28:32 -06:00
Pedro Algarvio
c8f1e457d7 Allow tests.integration.run_tests to execute more than one TestCase instance. 2013-10-03 16:09:57 +01:00
Pedro Algarvio
58b5a85b58 Some sleeping between commands. 2013-10-03 15:08:50 +01:00
Pedro Algarvio
67abab7b21 Set the VM name. 2013-10-03 13:36:08 +01:00
Pedro Algarvio
36e889b8ed Support downloading remote logs in Jenkins. 2013-10-03 12:52:05 +01:00
Pedro Algarvio
cf7a0b6205 Don't trigger state events on pydsl unit tests. 2013-10-03 00:59:03 +01:00
Henrik Holmboe
baf46300fa Remove unused import
We use ElementTree from salt._compat.
2013-10-02 16:17:19 +02:00
Henrik Holmboe
eea799c8c3 Specify reason for Python 2.7 requirement
While ElementTree is in Python 2.6, we need the expanded support
for xpath which was introduced in Python 2.7.

As discussed in #7264, it might be possible to install
`elementtree-1.3a3-20070912` for Python 2.6, but this is yet untested.
2013-09-30 10:40:13 +02:00
Pedro Algarvio
516e304b96 Let's try if mocking fixes the intermittent failures of the unit test. 2013-09-28 23:50:30 +01:00
Pedro Algarvio
707385c1c1 Use the salt testing requires_salt_modules decorator. 2013-09-28 18:57:38 +01:00
Pedro Algarvio
034d8f3a61 Skip tests if libvirt is not importable. 2013-09-28 18:55:15 +01:00
Pedro Algarvio
e194a9fabe Merge pull request #7494 from s0undt3ch/issues/7409-no-new-line-ssh-keys
Make sure there's a line break before writing new key
2013-09-28 03:07:43 -07:00
Pedro Algarvio
ec07e5ae49 Adapt test cases to fixed behaviour. 2013-09-28 00:00:59 +01:00
Pedro Algarvio
9b3d504e03 Fix unit tests regarding salt.utils.find._parse_interval 2013-09-28 00:00:59 +01:00
Pedro Algarvio
e7ddf159a1 Make sure there's a line break before writing new key. Fixes #7409. 2013-09-28 00:00:26 +01:00
Pedro Algarvio
2f3ed58541 Add test case which verifies the occurrence of #7409. 2013-09-28 00:00:25 +01:00
Thomas S Hatch
bd846ffdbb Merge pull request #7264 from holmboe/esxi-init
Introduce disk profiles and enable virt.init on an ESX host
2013-09-27 08:02:11 -07:00
Henrik Holmboe
5324d6a7eb Two integration tests for virt.get_profiles
This will test the default NIC and disk profiles for KVM and ESX.
2013-09-27 01:41:52 +02:00
Henrik Holmboe
3149499765 Add unit tests
In addition to custom ESX profile, test:

 - default KVM profile
 - default ESX profile
 - custom KVM profile
2013-09-27 01:39:07 +02:00
Henrik Holmboe
7ec34af486 Refactor profile loading to use YAML
This is done in order to more easily test configuration syntax errors,
as the the minion configuration file uses YAML.
2013-09-27 01:11:28 +02:00
Henrik Holmboe
008a1b7fc9 Compatibility import for ElementTree 2013-09-27 00:58:17 +02:00
Henrik Holmboe
a8d258cefc Use StringIO from salt._compat 2013-09-27 00:45:27 +02:00
Henrik Holmboe
da3799ba19 Add unit tests for a few functions in modules.virt
For:

 * modules.virt._disk_profile()
 * modules.virt._nic_profile()
 * modules.virt._gen_xml()
2013-09-26 17:21:37 +02:00
Pedro Algarvio
a9d5ac5a3e Add unit tests to salt.utils.format_call(). 2013-09-24 22:08:08 +01:00
Pedro Algarvio
4a18003231 Error signatures changed, lets update test cases. 2013-09-24 22:08:08 +01:00
Pedro Algarvio
83d23d9be7 Use salt.utils.is_windows(). 2013-09-24 22:08:08 +01:00
Pedro Algarvio
bacd2264ee State calls now fail if non-supported arguments are used. Fixes #6962.
* Removed `format_call` from `salt.state.State` since it was almost a one to one copy of `salt.utils.format_call`.
* The `format_call` in `salt.utils` was modified to accept initial return data(to provide the functionality from the removed `State.format_call`.
* While the function arguments are being queried/matched, those used are removed from a copy of the passed data. Once finished, any remaining keyword arguments which do not match those allowed on the `expected_extra_kws` keyword argument to `format_call` will raise a `SaltInvocationError`.

This will prevent any future bogus bug searching like what happened on #6912 because the wrong state function argument was being passed.
2013-09-24 22:08:07 +01:00
Pedro Algarvio
7ae519c34e Fix unit.states.rvm_test.TestRvmState.test_installed 2013-09-21 10:42:34 +01:00
Seth House
ea657eed48 Added unit and integration tests for the file.replace functions 2013-09-20 17:01:57 -06:00
Thomas S Hatch
1b261571ce Merge pull request #7338 from rca/template_error_context
Template error context
2013-09-19 13:09:04 -07:00
Pedro Algarvio
f75c59ecbf Properly handle shell unit tests which check versions. 2013-09-19 18:50:51 +01:00
Pedro Algarvio
012b8100bb Properly handle git describe with RC's and proper version comparison. 2013-09-19 18:42:37 +01:00
Pedro Algarvio
05be7064d5 0.17.0 has been tagged. The 0.16.x requires_network is no longer necessary. 2013-09-19 11:16:37 +01:00
Roberto Aguilar
ef968e7c64 Added tests for error template context. 2013-09-19 01:02:05 -07:00
Colton Myers
6aee81133a Merge pull request #7303 from dlanderson/mine_delete_issue_7226
Add mine.delete to remove specific mine functions.
2013-09-18 16:04:04 -07:00
Pedro Algarvio
124e067733 Revert "Add pylint checker for file encoding"
This reverts commit 126c80397a.
2013-09-18 22:25:42 +01:00
Pedro Algarvio
620f9189b2 Revert "Recognize UTF-8 BOM and some other cases"
This reverts commit 25d0315626.
2013-09-18 22:25:33 +01:00
Pedro Algarvio
abf3c4d2f7 Revert "Rename the pylint plugin module."
This reverts commit 79fb639ef6.
2013-09-18 22:25:07 +01:00
Pedro Algarvio
3b59028e49 Revert "Rename the plugin."
This reverts commit 5dc0bb7b42.
2013-09-18 22:24:14 +01:00
David Anderson
39690b4431 PEP8 fixes for integration.mine.MineTest 2013-09-18 15:22:46 -06:00
David Anderson
3f6de80e27 Add test for mine.delete module 2013-09-18 15:07:04 -06:00
David Anderson
8137097c9e Add test for mine.flush module 2013-09-18 14:49:12 -06:00
Pedro Algarvio
5dc0bb7b42 Rename the plugin. 2013-09-18 18:09:33 +01:00
Pedro Algarvio
79fb639ef6 Rename the pylint plugin module. 2013-09-18 18:06:16 +01:00
Henrik Holmboe
25d0315626 Recognize UTF-8 BOM and some other cases 2013-09-18 17:19:38 +02:00
Henrik Holmboe
126c80397a Add pylint checker for file encoding
Discussed in #7294.
2013-09-18 15:48:04 +02:00
Pedro Algarvio
e18ba0758b Don't include authorship in generated documentation, the Sphinx way. 2013-09-16 17:24:00 +01:00
David Anderson
583d0b8a3e Add with_retcode options for ShellCase functions 2013-09-13 10:51:25 -06:00
David Anderson
1d7309970f Add with_retcode option to ShellCase.run_call(). Also adds a test case for https://github.com/saltstack/salt/issues/6973 - expect a non-zero exit code when running "salt-call --retcode-passthrough state.highstate" 2013-09-13 10:12:11 -06:00
Pedro Algarvio
a8e70d527e List pip from the right place. 2013-09-11 10:54:43 +01:00
Thomas S Hatch
e644de7e76 Merge pull request #7164 from dlanderson/fix_issue_7154
Fix #7154 - cmd.* should fail when cwd does not exist
2013-09-10 21:11:30 -07:00
Thomas S Hatch
4ab8d5eba5 Merge pull request #7161 from cvrebert/kwargs_warn_until
Add kwargs_warn_until() function
2013-09-10 21:10:51 -07:00
Thomas S Hatch
80f4aff88c Merge pull request #7143 from s0undt3ch/hotfix/pip-tests
Adapt and fix the changes from #6833
2013-09-10 21:08:06 -07:00
David Anderson
9163d2a00f Fix test description 2013-09-10 21:03:35 -06:00
David Anderson
d5d0aba61e Fix #7154 - cmd.* should fail when cwd does not exist 2013-09-10 20:57:41 -06:00
Chris Rebert
90f257df13 add salt.utils.kwargs_warn_until() 2013-09-10 17:12:25 -07:00
David Anderson
b383440302 Fix issue 6800. cwd=target was being passed to _run_check which blew up if target dir did not already exist. 2013-09-10 13:45:30 -06:00
Pedro Algarvio
725acec48b track_processes is no longer a valid `kwarg'. 2013-09-10 17:49:38 +01:00
Pedro Algarvio
1a071c0d2f opts not `options' 2013-09-10 12:21:41 +01:00
Pedro Algarvio
d7c2266eed Set the proper variables to chain the remote reports download. 2013-09-10 12:15:39 +01:00
Pedro Algarvio
ddd68a4dc1 Grab the proper option name 2013-09-10 12:15:19 +01:00
Pedro Algarvio
40ba994141 Support "chained" remote reports download with the test run execution. 2013-09-10 12:05:59 +01:00
Pedro Algarvio
70937172ce Adapt mocked tests to the changes in #6833 2013-09-10 11:13:16 +01:00
Pedro Algarvio
fc5212dce0 Add a test case for #6833. Refs #7130. 2013-09-10 10:52:17 +01:00
Pedro Algarvio
bd707c4763 Finish what was started in 53abda36 2013-09-10 10:40:10 +01:00
Colton Myers
b980a49948 Merge pull request #7128 from s0undt3ch/hotfix/pip-tests
Add another pip installed VCS test case using `git+git://`
2013-09-09 14:04:43 -07:00
Pedro Algarvio
5874f171b5 Re-work the report download steps. 2013-09-09 21:52:58 +01:00
Pedro Algarvio
22873f63bb Add another pip installed VCS test case using git+git:// 2013-09-09 20:53:52 +01:00
Pedro Algarvio
ab2168885b Pass the parsed options to the methods. 2013-09-09 20:45:57 +01:00
Pedro Algarvio
db017a4edf Support passing the workspace to work in. 2013-09-09 20:43:27 +01:00
Pedro Algarvio
6ef007de78 Typo 2013-09-09 11:56:48 +01:00
Pedro Algarvio
ba276f0b2a More generic error message since the commands continue to execute. 2013-09-09 11:48:59 +01:00
Pedro Algarvio
022fd37cae Remove existing local coverage xml report prior to downloading a new one. 2013-09-09 11:24:58 +01:00
Pedro Algarvio
35fe2cf951 Of course the VM's are always being deleted!!!! 2013-09-09 00:02:08 +01:00
Pedro Algarvio
581f498c9f Are any exceptions being raised? 2013-09-08 23:41:38 +01:00
Pedro Algarvio
6ba8b9efeb Fix removed back slashed single quote. More info displayed. 2013-09-08 18:48:32 +01:00
Pedro Algarvio
d11e9fdc2f Also pipe stdout 2013-09-08 18:18:21 +01:00
Pedro Algarvio
68bcc826c5 Don't split up commands. 2013-09-08 18:14:03 +01:00
Pedro Algarvio
799fa765b9 Add support to download xml coverage reports 2013-09-08 17:43:55 +01:00
Pedro Algarvio
2cc993a0d5 Add code to download XML unit test reports 2013-09-08 16:32:35 +01:00
Pedro Algarvio
5679c04874 Remove the quotes. 2013-09-08 12:07:27 +01:00
Pedro Algarvio
2bdddf2713 33cdd9e remove one of the checks, re-add it. 2013-09-08 12:07:27 +01:00
Pedro Algarvio
d0e006eff3 Flush output. 2013-09-08 12:07:27 +01:00
Pedro Algarvio
9ca574a2b3 Sleep a little before running the test suite remotely. 2013-09-06 17:36:05 +01:00
Pedro Algarvio
c2fd114496 Better VM name. Zero left padding build numbers. 2013-09-06 17:13:05 +01:00
Pedro Algarvio
23aa412ae2 Random part of VM name from build number if available. 2013-09-06 16:36:26 +01:00
Pedro Algarvio
03491874d0 Get the correct environment variable name. 2013-09-06 14:42:20 +01:00
Pedro Algarvio
3d6debf33a More explicit environment variable names. Detect Jenkins environment. 2013-09-06 14:40:01 +01:00
Pedro Algarvio
63f4dedfa4 Fix script 2013-09-06 12:59:24 +01:00
Pedro Algarvio
768796aab9 Some more env printing 2013-09-06 12:55:27 +01:00
Pedro Algarvio
e7c4d1ca55 Separate output 2013-09-06 12:46:52 +01:00
Pedro Algarvio
3414e6b1f0 Need a peek at the environment for debugging purposes. 2013-09-06 12:45:01 +01:00
Pedro Algarvio
41079433a6 Use the __dict__ attribute. 2013-09-06 12:32:22 +01:00
Pedro Algarvio
363e6fa3d2 Allow for a stepped Jenkins execution. 2013-09-06 12:14:27 +01:00