Commit Graph

87 Commits

Author SHA1 Message Date
Pedro Algarvio
8100b41c7e Fixed splitting named unittests from named integration tests.
This commit got lost somewhere. I could swear I committed this fix previously...
2013-08-21 19:23:16 +01:00
Pedro Algarvio
11060c85be Allow running a group of tests while still providing a test case name from another group. 2013-08-12 11:46:58 +01:00
Pedro Algarvio
305a5c2223 The parser destructive tests flag is now provided by salt-testing 2013-08-06 22:03:42 +01:00
Pedro Algarvio
94575cbb63 Finish what was started on f78fca32 2013-07-05 00:53:41 +01:00
Pedro Algarvio
f78fca3256 We don't need to pass -u when we're only passing unittests to -n. 2013-07-04 17:17:48 +01:00
Pedro Algarvio
007545eb70 Fix NameError 2013-06-28 00:12:58 +01:00
Pedro Algarvio
8cd0316b62 Heh! Salt! Not Salt Cloud! 2013-06-28 00:12:58 +01:00
Pedro Algarvio
a21b6e10a5 We don't want the tests in the coverage report. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
819e523c2b Use the defined SALT_ROOT as the source parameter for the coverage call. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
7990165e26 Remove debug logic to test coverage. 2013-06-28 00:12:58 +01:00
Pedro Algarvio
3033e0002b Let's make use of salt-testing code coverage testing option parser. 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
Pedro Algarvio
d4fd1baa2f Adapted the tests suite to work with salt-testing 2013-06-28 00:12:56 +01:00
ZHANG Cheng
c86564abb1 Fix typo 2013-06-22 23:31:37 +08:00
Thomas S Hatch
86db665d2d kill the print 2013-06-18 15:45:50 -06:00
Thomas S Hatch
535d0a00e3 Finish #5585 2013-06-17 13:05:08 -06:00
ZHANG Cheng
c8aee0451d Make it possible to run a single unit test 2013-06-17 23:38:13 +08:00
Chris Rebert
a6a356a3e4 runtests.py: use except-as syntax 2013-06-03 11:45:44 -06:00
Pedro Algarvio
8938b93b3f Run our own API based coverage 2013-06-02 09:07:39 +01:00
Pedro Algarvio
a61273bd71 Finally working. Cleaning up. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
662f5b23ca Output the coverage pickled data. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
63859e2915 Even more info from travis env. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
51460af985 Fix SyntaxError. 2013-05-31 12:48:53 +01:00
Pedro Algarvio
5ec8147fbb Add the .coveragerc file and some debugging output to see if the coverage file is generated. 2013-05-31 12:48:52 +01:00
Pedro Algarvio
852e38658b Let's know where(CWD) is the suite running from. 2013-05-31 12:48:52 +01:00
Thomas S Hatch
25fd45a688 Make --name a little more clear 2013-05-26 00:08:52 -06:00
Chris Rebert
c487d86fff tests: standardize to modern 'except FooError as err:' syntax 2013-05-03 19:55:50 -07:00
Chris Rebert
9ed364980d is not 0 => != 0 2013-04-30 10:32:21 -07:00
Pedro Algarvio
a43e0132f1 Improve logging logic in salt/template.py. Allow the test suite to set more logging levels. 2013-04-27 09:56:24 +01:00
Pedro Algarvio
7e0b13a493 Include the filesystem cleanup options group into the parser. 2013-04-19 22:36:02 +01: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
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
Ryan Schneider
8f8cc74b34 Some minor cleanup of unit and integration tests. 2012-12-18 17:39:16 -08: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
804b575b0d Add missing import. 2012-11-29 07:59:36 +00:00
Pedro Algarvio
b72469d4b0 New coverage version, handle it's version parsing properly. 2012-11-29 07:41:17 +00:00
Pedro Algarvio
04146f39f9 Tests wait timer is now colored(option to disable colors is also available), improves readability. 2012-11-21 10:01:45 +00:00
Pedro Algarvio
f6abd10ed9 Support logging.StreamHandler under python 2.6 which does not have a stream kwarg. 2012-11-20 15:52:20 +00:00
Pedro Algarvio
c5c637154a Try to get some system information out of Travis-CI. 2012-11-06 18:11:26 +00:00
Pedro Algarvio
af7ebf12f8 Try not to fail on travis-ci under python 2.6
* Raised max open files by 1024 since running in a vagrant machine 2048 was not enough, though, I think travis-ci defaults to a higher value.
* Wait a bit longer on the events testing.
* Separated the initial minions connected and minions synced into two different events and functions. Also corrected the `if` expected value when a timeout occurs.
2012-11-06 16:02:36 +00:00
Pedro Algarvio
75644992e2 Don't hard-code temporary paths on tests. Refs #2462. 2012-11-06 11:20:06 +00:00
Pedro Algarvio
b6cb78364f Switch integration tmp to the system's temporary directory.
While running the tests within a VirtualBox(vagrant) machine, if the salt source is mounted using shared folders, any tests involving hard links WILL fail. Any tests involving symlinks, can be made to work by setting some properties on the VirtualBox shared folder. By moving the tests `tmp` directory to `tempfile.gettempdir()` we avoid this false test case errors.
2012-10-05 00:52:00 +01:00
Pedro Algarvio
4c456864db Improve our tests runner.
* Show an error when the user tries to use `--xml` and `xmlrunner` is not installed.
* Add support to generate HTML reports of the tests coverage.
2012-10-02 13:04:22 +01:00
Pedro Algarvio
905fb835cd Improve runtests.py logging and report output.
* All logging messages are now logged on a log file. If verbose is enabled, the log messages are also logged to the console.
 * The tests report now also let's us know if there were no glitches.
2012-09-30 10:40:06 +01:00
Pedro Algarvio
e8766b7b8d Allow certain tests to marked as destructive.
* Some tests might be considered destructive, such as adding or removing users from the system. This change allows those tests to be skipped unless stated otherwise.

```python

from saltunittest import destructiveTest

class ATestCase(TestCase):

    @destructiveTest
    def test_some_destructive_code(self):
        """Some destructive code."""

```

On the console we get something like:
```
test_destructive (unit.config_test.ConfigTestCase) ... skipped 'Destructive tests are disabled'
```
2012-09-29 15:42:43 +01:00
Pedro Algarvio
6896fd0ab8 Allow disabling the tests report. 2012-09-29 12:48:50 +01:00