Commit Graph

365 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Pedro Algarvio
e18ba0758b Don't include authorship in generated documentation, the Sphinx way. 2013-09-16 17:24:00 +01: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
Chris Rebert
90f257df13 add salt.utils.kwargs_warn_until() 2013-09-10 17:12:25 -07:00
Pedro Algarvio
70937172ce Adapt mocked tests to the changes in #6833 2013-09-10 11:13:16 +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
7cdddf8bf8 Fix unit.log_test.TestLog.test_issue_2853_regex_TypeError to import the proper(renamed) logging module. 2013-08-30 19:32:39 +00:00
Pedro Algarvio
598fc60e3c Fix unit.log_test.TestLog.test_issue_2853_regex_TypeError by importing salt's logging from the proper module. 2013-08-30 19:32:39 +00:00
Pedro Algarvio
51a01ef79b Added mocked pip installation test-case for when pip's version is <=1.1 2013-08-29 10:57:50 +00:00
Pedro Algarvio
25a72358ab Skip this test until properly mocked. 2013-08-28 15:21:29 +00:00