Commit Graph

25 Commits

Author SHA1 Message Date
Pedro Algarvio
89befb8827 Switch open() for salt.utils.fopen() 2014-11-26 18:02:24 +00:00
Pedro Algarvio
4d7ca91424 Remove unnecessary ©️ and :license: from file headers 2014-05-26 19:26:15 +01:00
Pedro Algarvio
c8038d87b1 Use KNOWN_BINARY_NAMES from salt.modules.virtualenv 2014-01-11 12:19:29 -07:00
Pedro Algarvio
2cab3227fd The virtualenv binary can have multiple CLI names. 2014-01-02 20:27:18 +00: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
e18ba0758b Don't include authorship in generated documentation, the Sphinx way. 2013-09-16 17:24:00 +01:00
Pedro Algarvio
9eac31d6dd Use proper pip mirrors in integration.states.virtualenv.VirtualenvTest.test_issue_2594_non_invalidated_cache 2013-08-30 19:32:39 +00:00
Pedro Algarvio
b880af89e1 Switched arguments in SaltReturnAssertsMixIn.assertInSaltComment() 2013-08-22 19:02:17 +01:00
Pedro Algarvio
5c3a406e17 Let us not use a deprecated option ourselves unless for testing the deprecation. 2013-07-13 19:55:50 +01:00
Pedro Algarvio
d7f2856365 Updated integration.states.virtualenv test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:03 +01:00
Pedro Algarvio
663f54ef9f Update copyright years of changed files. Added __main__ execution to tests/integration/states/pip.py. 2013-06-28 00:12:57 +01:00
Pedro Algarvio
222be7b446 Make sure every test module is runnable by __main__.
* Double to single quotes
2013-06-28 00:12:56 +01:00
Chris Rebert
9ed364980d is not 0 => != 0 2013-04-30 10:32:21 -07:00
Pedro Algarvio
55b166f38c Fix issues around salt.modules.file, salt.states.files and respective tests.
* Updated `salt.modules.file.makedirs` to properly work. Any path passed to this function should be a directory, ie, if `/tmp/foo/bar` is passed, `/tmp/foo/bar` should be a directory, not `/tmp/foo`.
* Since `salt.modules.file.makedirs` was updated, `salt.states.file.append` needed to be updated to pass the proper directory to create.
* Minor formatting change
2013-04-25 16:36:19 +01:00
Jeff Schroeder
4da4dc25a1 Skip the virtualenv state test if virtualenv isn't installed 2012-12-21 21:35:58 -06: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
Ramón Cahenzli
a30f2ee244 This root or that root? :) 2012-12-11 16:37:30 +01: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
3401445e8b Expose what's happening behind the scenes for test_user_if_present_with_gid()
* Expose what's happening in `integration.states.user.UserTest.test_user_if_present_with_gid()`.
* Update code that was using the old `SaltReturnAssertsMixIn`.
2012-11-21 12:19:18 +00:00
Pedro Algarvio
495e7244c8 Fix pip requirements file permissions in case of non root runas.
* In `salt.modules.pip.install()` we first check if file is already cached(in case being called from `salt.states.virtualenv.managed()`), if it's not, then try to cache it.
* If requirements and `runas` is passed, since  `salt.fileclient`'s cache needs to be private, we create a temporary file with the contents of the requirements file, owned by the `runas` user, which then gets passed to the pip command.
* Always delete the user, even if test(`integration.states.virtualenv.VirtualenvTest.test_issue_1959_virtualenv_runas`) fails.
* Minor PEP-8.
2012-11-21 09:08:22 +00:00
Pedro Algarvio
eda67f0110 Show salt comment on assertTrue(ret['result']) failed calls.
* Created a mix which tests for the required assertion(True/False) and in case of a failure, shows salt comment kwarg in the raised assertion error so we know what was the original(salt's) failure.
2012-11-20 16:09:57 +00:00
Pedro Algarvio
e04c872c66 Convert the remaining tests hard-coding temporary paths. 2012-11-06 12:44:53 +00:00
Pedro Algarvio
e87a408dcd Correct license. 2012-10-01 10:16:21 +01:00
Pedro Algarvio
064b3a60c2 Add test case for #1959. 2012-09-30 12:20:38 +01:00