Tomas Babej
75cf742a55
tests: Add taskrc_content property
2015-02-23 19:19:55 -05:00
Renato Alves
d211969236
Tests - clarify that USE_PATH alone is not enough.
2015-02-17 13:37:39 +00:00
Renato Alves
bd320b6729
Tests - Remove commented code
2015-02-17 12:24:13 +00:00
Renato Alves
3f004f547e
Tests - Don't hang if spawning taskw fails
2015-02-17 12:24:13 +00:00
Renato Alves
9180aa6e33
Tests - minor formatting changes
2015-02-16 15:37:31 +00:00
Renato Alves
32d837fb25
Tests - Convert add.t to python
...
* Also added UUID_regex to basetest.utils, likely to be reused
2015-02-16 15:36:38 +00:00
Renato Alves
4b839f2c83
Tests - Significant speed improvement at cost of CPU cycles
2015-02-16 01:59:47 +00:00
Renato Alves
1e1bd32c42
Tests - Rework how taskw is launched from python
...
* Should avoid some odd race conditions
2015-02-16 01:59:32 +00:00
Renato Alves
880ab5d665
Tests - Correct use of non-existent exception
2015-02-15 19:43:09 +00:00
Renato Alves
1bd26fe9ab
Tests - Default to having Python objects as "hook log"
2015-02-15 18:10:36 +00:00
Renato Alves
80c01f3ffb
Tests - Remove assertTriggered, redundant with assertTriggeredCount
2015-02-15 18:10:36 +00:00
Renato Alves
1b218d68f5
Tests - Invalid JSON replies in hooks no longer fail the test framework
2015-02-15 18:10:36 +00:00
Renato Alves
e845a25ea6
Unittest - Replace the timestamp function on wrapper.sh
...
* %N is not supported by /bin/date on BSD systems
2015-02-01 20:35:11 +00:00
Renato Alves
6a3edc88a1
Unittest - properly implement Hook.assert* functions
2015-02-01 19:33:08 +00:00
Renato Alves
bb3555f217
Unittest - Bad exception formatting
2015-02-01 19:33:08 +00:00
Renato Alves
d1698eab2d
Fix usage of taskd.trust=strict on the test suite
...
* This reverts commit 67cb30fdce
.
* Code also now tests if taskd is listening on IPv4 or IPv6 interfaces.
2015-01-20 11:56:53 +00:00
Renato Alves
67cb30fdce
Unittest - default to taskd.trust="ignore hostname"
...
* The currently available taskd testing certificates fail if
taskd.trust is set to strict. See also: TW-1519
2015-01-19 15:07:06 +00:00
Renato Alves
db78851b40
Unittest - Hook testing, fixed a few mistakes
2015-01-19 14:54:11 +00:00
Renato Alves
d261a38d17
Unittest - Enhanced support for testing hooks (wip)
...
* It is now possible to test:
* Hook Input/Output on STDIN/STDOUT channels
* Exit code of hook script
* Execution count (how many times the hook was executed)
* Timestamp execution (when was the hook executed - milisec resolution)
2014-11-02 00:01:06 +00:00
Renato Alves
efdb31fb90
Unittest - default to not merging stdout/stderr during tests
...
* Tests will now check that stderr is used for errors
* Tests were adjusted to reflect the API change
2014-10-20 14:01:21 +01:00
Renato Alves
c9102fd79c
Unittest - SIGABORT was not being correctly identified
...
* In Python if the process receives a signal, the exit code is negative
2014-10-20 13:52:02 +01:00
Renato Alves
b4f33ec0c6
Unittest - Replace None by objects representing the state of stdout/err
2014-10-20 13:29:30 +01:00
Renato Alves
bb060d5ff8
Unittest - Allow specifying custom timeout for slow commands.
...
* Useful when testing with big tasks (1000+ annotations) or sync
operations that take longer than 1 second (default)
2014-10-16 20:52:17 +01:00
Renato Alves
cf5c7abd01
Unittest - Workaround race condition when killing slow processes
...
* In some cases the process finishes normally very close to the timeout
2014-10-16 16:47:10 +01:00
Renato Alves
53fd37cae2
Unittest - Also propagate the correct exit code
2014-10-10 16:42:41 +01:00
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