regilero
1319755c55
Fix typo in mysql unit test
2013-12-01 00:34:29 +00:00
Mathieu Le Marec - Pasquet
228c987b76
feat: buildout support
...
This fixes #8856 .
2013-11-29 18:51:20 +00:00
Pedro Algarvio
880c9b5cff
Fix PEP8 E261 - White space before inline comment
2013-11-27 12:56:35 +00:00
Pedro Algarvio
b34377612e
Remove extra white-space.
2013-11-27 12:54:34 +00:00
Pedro Algarvio
f2e3a4aebe
Fix PyLint C0322 and C0324 - Spaces around opertor and commas
2013-11-27 12:48:53 +00:00
Pedro Algarvio
0ae1a15c61
PEP8 E302 and E303 blank lines fixes.
2013-11-27 12:11:45 +00:00
Pedro Algarvio
d02a2bc224
Include the python encoding file header on tests.
2013-11-27 11:19:24 +00:00
Mike Place
ad3a4e11b3
Oops. Didn't see the naming scheme for unit tests.
2013-11-26 15:27:43 -07:00
Mike Place
3326dbfd98
First-pass at establishing a unit-testing framework for the mysql execution module.
2013-11-26 15:16:42 -07:00
Mathieu Le Marec - Pasquet
50c1235502
add a test for #8707
2013-11-21 12:57:51 +01:00
Pedro Algarvio
544f7e127d
Don't use the deprecated self.assertEquals()
.
2013-11-09 09:01:18 +00:00
regilero
9dce9ac304
Add unit tests for grains.filter_by
2013-11-07 17:15:30 +01:00
Pedro Algarvio
0f9ded1a7a
Fix the pip unit tests with regards to the latest saltenv
changes.
2013-11-06 23:53:45 +00:00
Henrik Holmboe
c0aecc7c4b
Use ElementTree from salt.utils._compat
...
Also remove duplicate import of ElementTree.
2013-10-26 18:46:17 +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
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
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
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
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
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
Seth House
a4619a9c1c
Actually run the file.replace unit tests...
2013-10-03 09:28:32 -06: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
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
Seth House
ea657eed48
Added unit and integration tests for the file.replace functions
2013-09-20 17:01:57 -06:00
Pedro Algarvio
e18ba0758b
Don't include authorship in generated documentation, the Sphinx way.
2013-09-16 17:24:00 +01:00
Pedro Algarvio
70937172ce
Adapt mocked tests to the changes in #6833
2013-09-10 11:13:16 +01:00
Pedro Algarvio
6e694791fb
Allow tests to be properly skipped if mock
is not installed.
2013-08-26 17:05:44 +00:00
Pedro Algarvio
d33415c73a
Adapted unit.modules.rvm_test
to use salttesting.mock
2013-08-26 13:00:10 +00:00
Pedro Algarvio
220aa48e24
Adapted unit.modules.poptgres_test
to use salttesting.mock
2013-08-26 13:00:10 +00:00
Pedro Algarvio
6bc17f0c1b
Adapted unit.modules.pip_test
to use salttesting.mock
2013-08-26 13:00:10 +00:00
Pedro Algarvio
64d20afec9
Adapted unit.modules.gem_test
to use salttesting.mock
2013-08-26 13:00:10 +00:00
Pedro Algarvio
2acd67bc59
Adapted unit.modules.archive_test
to use salttesting.mock
2013-08-26 13:00:07 +00:00
Pedro Algarvio
8646fcb012
Adapted unit.modules.win_status_test
to use salttesting.mock
2013-08-26 12:59:15 +00:00
Pedro Algarvio
fe0d7dc048
Adapted unit.modules.alternatives_test
to use salttesting.mock
2013-08-26 12:59:12 +00:00
Pedro Algarvio
371f08a959
Adapted unit.modules.virtualenv
to use salttesting.mock
2013-08-26 12:58:04 +00:00
Pedro Algarvio
c78738b87a
Adapt test results to the expected output.
2013-08-22 19:02:32 +01:00
Pedro Algarvio
bd002f97da
Revert "By enforcing absolute imports, there's no need for module name aliases."
...
This reverts commit a1a2b49a72
.
2013-08-20 23:44:05 +01:00
Pedro Algarvio
9353dcafd3
Revert "salt.modules.cmdmod
renamed to salt.modules.cmd
while enforcing absolute imports."
...
This reverts commit 3fa341280b
.
2013-08-20 23:44:03 +01:00
Pedro Algarvio
3fa341280b
salt.modules.cmdmod
renamed to salt.modules.cmd
while enforcing absolute imports.
2013-08-19 13:45:56 +01:00
Pedro Algarvio
a1a2b49a72
By enforcing absolute imports, there's no need for module name aliases.
2013-08-19 13:23:46 +01:00
Pedro Algarvio
7b3ba67bc7
Fix the test_install_pre_argument_in_resulting_command
test case.
...
It now checks if the `--pre` output is present in versions >= 1.4 or not in versions < 1.4
2013-08-09 12:14:56 +01:00
Joseph Hall
d539e6e8ff
Merge pull request #6433 from s0undt3ch/sprint/mock-salt.modules.archive
...
Complete the work started on the sprint for `salt.modules.archive`
2013-07-30 07:21:24 -07:00
Pedro Algarvio
fe1736bbcd
Fix the mocked test for archive.unrar
.
2013-07-30 06:14:13 +01:00
Pedro Algarvio
189bc4e45e
Added mocked tests for salt.modules.archive.unrar()
2013-07-30 05:36:19 +01:00
Pedro Algarvio
16c4057c4f
Added mocked tests for salt.modules.archive.zip()
. Excludes as a list
2013-07-30 05:01:39 +01:00
Pedro Algarvio
39d0006931
Added mocked tests for salt.modules.archive.unzip()
. Excludes as a list
2013-07-30 05:00:58 +01:00
Pedro Algarvio
34b22afad9
Added mocked tests for salt.modules.archive.rar()
2013-07-30 04:59:28 +01:00
Pedro Algarvio
1a7b68b1a3
Added mocked tests for salt.modules.archive.unzip()
2013-07-30 04:52:31 +01:00
Pedro Algarvio
2f2047aa47
Added mocked tests for salt.modules.archive.zip()
2013-07-30 04:22:02 +01:00
Pedro Algarvio
a7c7cca94e
Test if an exception is raised if the required binary is not found.
2013-07-29 23:29:58 +01:00
Thomas S Hatch
b2e41aceeb
Merge pull request #6402 from s0undt3ch/sprint/mock-salt.modules.archive
...
Updates and fixes to `salt.modules.archive` and `salt.utils.decorators.which`
2013-07-29 09:29:13 -07:00
Pedro Algarvio
14980b7497
Update the archive.tar
mocked test to the new usage.
2013-07-29 06:57:27 +01:00
Pedro Algarvio
4855c9427c
Simplify our decorator code and make it reusable.
2013-07-28 22:55:27 +01:00
Joseph Hall
d64dfdc70a
Merge pull request #6395 from s0undt3ch/sprint/mock-salt.modules.alternatives
...
Also test for `retcode > 0`.
2013-07-28 05:18:29 -07:00
Pedro Algarvio
5d0af6268e
Mocked test for salt.modules.archive.gunzip()
2013-07-28 12:51:13 +01:00
Pedro Algarvio
99b8f2f70f
Mocked test for salt.modules.archive.gzip()
2013-07-28 12:50:05 +01:00
Pedro Algarvio
3d17053e3f
Also test for retcode > 0
.
2013-07-28 12:41:15 +01:00
Pedro Algarvio
dcdb9bf686
Mocked test for salt.modules.archive.tar()
2013-07-27 19:24:49 +01:00
Thomas S Hatch
bca8014b00
Merge pull request #6347 from s0undt3ch/sprint/mock-salt.modules.alternatives
...
Mocked tests for `salt.modules.alternatives`
2013-07-27 10:14:17 -07:00
Pedro Algarvio
aabf18d76a
Remove un-neded import.
2013-07-27 18:11:55 +01:00
Pedro Algarvio
43b513e78f
Mocked test for salt.modules.alternatives.remove()
2013-07-27 18:07:18 +01:00
Pedro Algarvio
fa811882cc
Mocked test for salt.modules.alternatives.install()
2013-07-27 18:04:04 +01:00
Pedro Algarvio
6f10a44279
Mocked test for salt.modules.alternatives.check_installed()
2013-07-27 17:59:16 +01:00
Pedro Algarvio
068f0d6948
Mocked test for salt.modules.alternatives.show_current()
2013-07-27 17:56:05 +01:00
Pedro Algarvio
4b2ef2c3c8
Mocked test for salt.modules.alternatives.display()
2013-07-27 17:26:54 +01:00
Pedro Algarvio
07e7366728
user
and runas
now raise an exception. "There can be only one".
...
* Always show the deprecation message `runas` is not `None`.
* If both `user` and `runas` are used, that's an error! Full Stop!
* If `runas` is being used and `user` is not, adapt the code and don't fail.
2013-07-27 13:34:58 +01:00
Pedro Algarvio
5ee8073979
Test the deprecated runas
argument to salt.modules.pip
.
2013-07-27 13:06:36 +01:00
Pedro Algarvio
a33f9d771b
Alaways show triggered deprecation warnings on the unit test.
2013-07-27 13:04:59 +01:00
Pedro Algarvio
98c63b9671
Test if --pre
option argument ends up in the resulting command line for pip.install
.
2013-07-24 08:03:50 +01:00
Pedro Algarvio
d6b1e60fb1
Added a mocked test case for pip.list
with prefix matching.
2013-07-14 20:53:36 +01:00
Pedro Algarvio
01f489c79d
Added a mocked test case for pip.list
.
2013-07-14 19:30:08 +01:00
Pedro Algarvio
c83e767e06
Added a mocked test case for pip freeze
.
2013-07-14 19:25:44 +01:00
Pedro Algarvio
e17599a820
Added a mocked test case for --timeout
passing to pip uninstall
.
2013-07-14 19:02:41 +01:00
Pedro Algarvio
71c278384b
Added a mocked test case for --log
passing to pip uninstall
.
2013-07-14 19:01:27 +01:00
Pedro Algarvio
3e97e36e78
Added a mocked test case for --proxy
passing to pip uninstall
.
2013-07-14 18:59:23 +01:00
Pedro Algarvio
95ee5a9f36
Added a mocked test case for --proxy
passing to pip install
.
2013-07-14 18:59:22 +01:00
Pedro Algarvio
315c1f911d
Added a mocked test case for multiple --requirements
passing to pip uninstall
.
2013-07-14 18:59:22 +01:00
Pedro Algarvio
5435dc69e1
Added a mocked test case for multiple --requirements
passing to pip install
.
2013-07-14 18:59:22 +01:00
Pedro Algarvio
411c926146
Prefix tests with install
since they're testing the install command.
2013-07-14 18:59:22 +01:00
Pedro Algarvio
02034c4d86
Added a mocked test case for --no-install
passing to pip install
.
2013-07-14 18:59:18 +01:00
Pedro Algarvio
716f760e80
Added a mocked test case for --no-deps
passing to pip install
.
2013-07-14 18:59:13 +01:00
Pedro Algarvio
89fa6cecf4
Added a mocked test case for --ignore-installed
passing to pip install
.
2013-07-14 18:59:08 +01:00
Pedro Algarvio
892646bdee
Added a mocked test case for --force-reinstall
passing to pip install
.
2013-07-14 18:59:01 +01:00
Pedro Algarvio
03c88dac2c
Added a mocked test case for --upgrade
passing to pip install
.
2013-07-14 18:58:56 +01:00
Pedro Algarvio
27959701dc
Added support and a mocked test case for --global-options
passing to pip install
.
2013-07-14 18:58:49 +01:00
Pedro Algarvio
fd200c96b0
Added a mocked test case for --install-options
passing to pip install
.
...
* Replaced all occurrences of `basestring` with the `string_types` from salt's `_compat` module.
* Properly split install options on commas.
* Install options need to be quoted.
2013-07-14 18:58:44 +01:00
Pedro Algarvio
12d05e4b9a
Added a mocked test case for --exists-action
passing to pip install
.
...
* `exists_action` now only accepts it's valid settings, one of `s`, `i`, `w`, `b`, else, `CommandExecutionError`.
2013-07-14 18:58:37 +01:00
Pedro Algarvio
fb16313804
Added a mocked test case for --source
passing to pip install
.
2013-07-14 18:58:33 +01:00
Pedro Algarvio
85b0d7964d
Added a mocked test case for --no-download
passing to pip install
.
2013-07-14 18:58:28 +01:00
Pedro Algarvio
60ef910bad
Added a mocked test case for --download-cache
passing to pip install
.
2013-07-14 18:58:24 +01:00
Pedro Algarvio
bfcd91d700
Added a mocked test case for --download
passing to pip install
.
2013-07-14 18:58:12 +01:00
Pedro Algarvio
6fbbd5fb31
Added a mocked test case for --target
passing to pip install
.
2013-07-14 18:58:06 +01:00
Pedro Algarvio
aa8dda75c7
Added a mocked test case for --build
passing to pip install
.
2013-07-14 18:57:58 +01:00
Pedro Algarvio
6e0e8fddf9
Added a mocked test case for --no-index
passing to pip install
.
2013-07-14 18:57:52 +01:00
Pedro Algarvio
467d7de4e5
Added a mocked test case for --extra-index-url
passing to pip install
.
2013-07-14 18:57:47 +01:00
Pedro Algarvio
900682ac51
Added a mocked test case for --index-url
passing to pip install
.
2013-07-14 18:57:43 +01:00
Pedro Algarvio
d3c1c43781
Add tests for proper protocols to find_links
.
2013-07-14 18:57:42 +01:00
Pedro Algarvio
72600f67e6
Test string argument on pkgs
, editable
, find_links
and mirrors
.
2013-07-14 18:57:42 +01:00
Pedro Algarvio
3372034c07
Added a mocked test case for --timeout
passing to pip install
.
2013-07-14 18:57:37 +01:00
Pedro Algarvio
c582d721d9
Added a mocked test case for --log
passing to pip install
.
2013-07-14 18:57:29 +01:00
Pedro Algarvio
21698d187d
Update mocked test case to have the package name as last argument to the pip install
call.
2013-07-14 18:57:20 +01:00
Pedro Algarvio
5e58d4c4f3
Added mock test case for clear
, upgrade
and symlinks
for the virtualenv_mod
.
2013-07-14 13:23:18 +01:00
Pedro Algarvio
45c258e00b
Added test case for the prompt argument to virtualenv_mod
.
2013-07-14 13:04:11 +01:00
Pedro Algarvio
d8536c9f87
Add a mocked test case for salt.modules.virtualenv_mod
python argument.
...
* Updated the `virtualenv_mod` mock test case to patch `salt.utils.which` and `sys.modules` at class level as opposed to every function.
2013-07-14 12:53:23 +01:00
Pedro Algarvio
c65b1348fe
Fix Travis-CI for unit.modules.virtualenv_test.VirtualenvTestCase.test_no_site_packages_deprecation
...
Also mock the `virtualenv` module.
2013-07-13 23:23:30 +01:00
Pedro Algarvio
b6471e4099
Mock the virtualenv module in unit.modules.virtualenv_test.VirtualenvTestCase.test_issue_6031_multiple_extra_search_dirs
. Is Travis-CI still going to complain?
2013-07-13 23:14:12 +01:00
Pedro Algarvio
2b1cf0ac14
Patch _install_script()
since the virtualenv module will try to install some scripts.
2013-07-13 19:55:51 +01:00
Pedro Algarvio
05f2a23733
Make use of salttesting.helpers.ForceImportErrorOn
.
2013-07-13 19:55:50 +01:00
Pedro Algarvio
04133b07b4
Added mock test case to test getting the virtualenv version from shell and not from the module.
2013-07-13 19:55:50 +01:00
Pedro Algarvio
606c6d5ffb
Add test case which tests if non proper arguments raise an exception.
2013-07-13 19:55:50 +01:00
Pedro Algarvio
de572cb193
Fix the virtualenv
unittests which rely on it's version changing.
2013-07-13 19:55:49 +01:00
Pedro Algarvio
606413c063
Show a deprecation warning if no_site_packages
is used. Fixes #6027 .
...
If both `no_site_packages` and `system_site_packages` are used, throw an error.
Added the appropriate tests.
2013-07-13 19:55:49 +01:00
Pedro Algarvio
cde1c628ac
Added a test case to check for multiple extra search dirs support. Refs #6031 .
2013-07-13 19:55:49 +01:00
Pedro Algarvio
2fd8dc299a
Add test case to check for proper handling of --never-download
. Refs #6030 .
...
Also added assertions to check for proper deprecation logging messages output.
2013-07-13 19:55:49 +01:00
Pedro Algarvio
6126aa47be
Small code and print's cleanup.
2013-07-13 19:55:48 +01:00
Pedro Algarvio
8858d1183f
Add test case which tests for proper deprecated output based on virtualenv version.
2013-07-13 19:55:48 +01:00
Pedro Algarvio
64c9463a8b
Merge pull request #6143 from s0undt3ch/issues/6129-unexpected-__env__-keyword
...
Fix Issue #6129 unexpected `__env__` keyword
2013-07-13 11:53:19 -07:00
Pedro Algarvio
5bee1ca7f3
Re-implement 06ac67c84a
the right way since the state __env__
was being confused by the shell environment. Fixes #6129 .
2013-07-13 18:45:30 +01:00
Pedro Algarvio
269175145f
Update mocked rvm unit test since we now call cmd.run_all
instead of cmd.retcode
.
2013-07-13 17:46:46 +01:00
Pedro Algarvio
66d51a036f
Switch assertRaisesWithMessage
with assertRaises
. The first was not working as supposed.
2013-07-05 01:21:00 +01:00
Pedro Algarvio
3c3933d25e
Test for the proper exception, remove stray character left behind.
2013-07-05 00:57:47 +01:00
Pedro Algarvio
edf66fd3fe
pip
allows multiple --find-links
to be passed. Added mocked tests too.
2013-07-05 00:54:11 +01:00
Pedro Algarvio
e6aa92901d
Add multiple editable's and pkgs+editable's test cases.
2013-07-04 17:24:24 +01:00
Pedro Algarvio
6158edee2d
Add a mocked unit testcase to test for multiple mirrors support. Refs #5940 .
2013-07-04 15:01:05 +01:00
Pedro Algarvio
f8216aa584
Fix unit tests to expect the new, single quotes and less wasted white-space, output.
2013-07-04 14:50:07 +01:00
Pedro Algarvio
0631e31cb1
Updated unit.modules.win_status_test
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
86564ba1ce
Updated unit.modules.rvm_test
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00
Pedro Algarvio
7a5872b498
Updated unit.modules.postgres_test
test suite to use salttesting.helpers.ensure_in_syspath()
2013-06-28 00:13:03 +01:00