Commit graph

45 commits

Author SHA1 Message Date
Renato Alves
40a95e1196 Unittest - Fix case where exit code was incorrectly registered 2014-10-10 16:19:39 +01:00
Renato Alves
27f21d375b Unittest - Clarify documentation of runSuccess/runError 2014-10-09 13:16:47 +01:00
Renato Alves
72823a453f Unittest - Helpers to manage hook scripts during tests 2014-10-08 20:29:56 +01:00
Paul Beckingham
071cf55c00 Unit Tests
- Added a default 'hooks=off' to the basetest class, after it was discovered
  that the scan for runnable hooks takes non-trivial time.
2014-09-27 16:49:06 -04:00
Renato Alves
8a4b33b0e3 Unittest - Say where taskd couldn't be found 2014-08-11 11:12:08 +01:00
Renato Alves
b49360c240 Unittest - Notes on env vars that affect test execution 2014-07-31 17:07:14 +01:00
Renato Alves
d9d3b47c31 Unittest - default to ../src/ as location for task/taskd binaries 2014-07-31 17:03:49 +01:00
Renato Alves
07cd033cbc Unittest - Readability and information improvements with test failures 2014-07-24 16:07:58 +01:00
Renato Alves
4a305d5e51 Unittest - Fix path to user tx.data 2014-07-19 02:55:49 +01:00
Renato Alves
974045da7a Unittest - Helper code to easily parse tx.data 2014-07-19 02:28:52 +01:00
Renato Alves
b58c6566af Unittest - Make client credentials available as a dictionary 2014-07-19 02:06:21 +01:00
Renato Alves
4c88726dab Unittest - Make taskd the first argument of Task()
* The most common case is to bind a client to a server and not
customizing the location of the task binary
2014-07-19 00:45:17 +01:00
Renato Alves
c5d4efd4d2 Unittest - No longer necessary to prefix strings with hash 2014-07-18 20:07:02 +01:00
Renato Alves
97d490e0fd Unittest - Use stderr for diagnostics too 2014-07-18 19:22:48 +01:00
Renato Alves
a88b3be093 Unittest - Memoize utils.which for faketime speedups 2014-07-18 17:23:19 +01:00
Renato Alves
d69533add1 Unittest - Add a memoize function for caching of function results 2014-07-18 17:22:17 +01:00
Renato Alves
00ee5b2289 Unittest - Skip tests that use faketime if not available 2014-07-18 17:20:27 +01:00
Renato Alves
15795e514d Unittest - Implement faketime for use in taskw 2014-07-18 17:12:28 +01:00
Renato Alves
02683aecd7 Unittest - Make is easier to reset env vars of task and taskd 2014-07-18 14:01:04 +01:00
Renato Alves
2a198d59fe Unittest - Add mechanism to skip task and taskd tests
* When testing multiple clients vs server versions, repeating client
tests is unnecessary. By setting the env variables TASKW_SKIP and
TASKD_SKIP it will now be possible to skip all task (client only) and
taskd (client + server) tests, respectively.
2014-07-18 13:33:51 +01:00
Renato Alves
72e8a73ae0 Unittest - Add prefixes to task and taskd temporary folders 2014-07-18 13:20:06 +01:00
Renato Alves
1f279ffde8 Unittest - Try to avoid racing conditions failures when capturing stdout/stderr
* The new unblocking strategy for subprocesses involves timeouts and
waiting periods. If the timeout is too short (or absent) tests may show
intermittent failure.
* Increasing the timeout may make tests a bit slower but more reliable.
2014-07-15 03:29:49 +01:00
Renato Alves
ea5186716e Unittest - Example of TAP diag use in template.t
* Also prettify its output with the amazing whitespace
2014-07-15 03:02:47 +01:00
Renato Alves
e3d0d2ff34 Unittest - Stream blocking tests can now be safely performed
* Processes that blocked waiting for stdin data will now be aborted
after a 1 second timeout.
* As a side-effect any process that takes longer than 1 second to
finish will also be aborted.
2014-07-15 02:43:57 +01:00
Renato Alves
7f9148efb4 Unittest - CommandError exception treats SIGABRT specially
* SIGABRT will be used to signal processes that failed to finish after
the process assigned time (default 1 second).
2014-07-15 02:40:56 +01:00
Renato Alves
04f5f7e2a8 Unittest - exit code may be None if process failed to finish 2014-07-15 01:37:17 +01:00
Renato Alves
45c73fc473 Unittest - Add code to check if taskd is available 2014-07-15 00:50:58 +01:00
Renato Alves
b77dfc6312 Unittest - Add which() backported from py3.3 2014-07-15 00:49:50 +01:00
Renato Alves
617183612c Unittest - Don't display "task diag" by default on error 2014-07-14 16:10:44 +01:00
Renato Alves
d354d13263 Unittest - Bring back diag() for generating TAP output
* Still needs work to make sure output is displayed after the test
status (not ok ...) and not before.
2014-07-14 11:38:04 +01:00
Renato Alves
4ae56838e4 Unittest - Include "task diag" output on error
* If any command passed to runSuccess or runError returns an unexpected
exit code, the output of 'task diag' will be added to stdout/stderr.
2014-07-14 00:25:43 +01:00
Renato Alves
906ca1a4aa Unittest - docstring clarification
* Clarify how the alias is supposed to work in case readers are not
familiar with what __call__ does.
2014-07-13 23:10:16 +01:00
Renato Alves
42cfda704f Unittest - Replacing old basetest framework
* Adapt bugs to work with the newer testing framework
2014-07-13 23:09:53 +01:00
Renato Alves
6a28c2d175 UnitTest - Alias for runSuccess
* Use t() (given t = Task()) as an alias to t.runSuccess()
2014-07-13 23:09:23 +01:00
Renato Alves
ceaf9d3462 Unittest - Add a line break on last line of initial config 2014-07-13 23:09:00 +01:00
Renato Alves
715a414abd UnitTests
* Taskd and Taskw classes for testing are now available
 * Testing of server and client can now be performed.
 * The newer test wrappers will eventually replace the BaseTest class
2014-07-06 02:03:04 +01:00
Renato Alves
b60682a1e4 Make wait time configurable. Could be needed in slower machines. 2014-07-06 01:03:32 +01:00
Renato Alves
c1dbe4fc3c Prevent reuse of Taskd after being destroyed 2014-07-06 01:03:32 +01:00
Paul Beckingham
5e1f596200 Unit Tests
- Added a 'diag' method to the Python test class.
2014-07-03 17:38:41 -04:00
Renato Alves
08c11da702 Testing
Expose location of taskd.log and taskd.pid
2014-05-17 22:05:30 +01:00
Renato Alves
29d5de1154 Testing
Add a class to manage one or more taskd servers running on the same
machine.
2014-05-17 21:44:51 +01:00
Renato Alves
f54494d45a Unittesting basemodule
merge_streams was not having the desired effect
2014-05-17 21:44:51 +01:00
Renato Alves
2e64231886 Refactor testing framework to allow using callTask* methods inside @classmethods 2014-04-13 20:11:28 +01:00
Renato Alves
02d175b10b Tests - Include task stdout/err if exit code != 0 2014-03-07 01:09:23 +00:00
Renato Alves
74bca0e5bf Unit tests - Add a BaseTestCase which prepares and isolates the environment of each test 2014-02-19 23:01:16 -05:00