Commit graph

81 commits

Author SHA1 Message Date
Renato Alves
7fcb26f363 Tests: Increase timeout to 5 seconds 2015-04-26 15:28:51 +01:00
Renato Alves
233d97fbff Tests: Use IP address instead of hostname with taskd 2015-04-26 00:24:59 +01:00
Renato Alves
64be230639 Tests: Include taskd in USE_PATH warning 2015-04-25 23:59:49 +01:00
Renato Alves
a52bba46f1 Output taskd.log to stdout on taskd failures (not test errors) 2015-04-25 23:51:01 +01:00
Renato Alves
afec6d451f Tests: Force stopping taskd on 5mins timeout 2015-04-06 13:46:08 +01:00
Renato Alves
fd17a68930 Tests: expose 'args' passed to hook scripts
- Useful to validate that all the expected arguments were passed with
  correct escaping.
- Update test/template.t with one use-case for 'args'
2015-04-06 13:43:41 +01:00
Renato Alves
09d86eb165 Tests: Better diagnostics on taskd start failure. 2015-04-06 13:08:17 +01:00
Renato Alves
d76d5c3587 Tests: Make sleeptime in wait_conditional an argument 2015-03-27 10:53:18 +00:00
Renato Alves
526665d4ec Tests: Configurable check for taskd readyness
* Also increase the frequency from 1/s to 2/s
2015-03-27 10:51:38 +00:00
Renato Alves
357850177d Tests: common/reusable variables live in basetest.utils 2015-03-27 10:14:44 +00:00
Renato Alves
180c382de2 Tests - Finer control on which binaries to look for on PATH
* It is now possible to control whether taskw and/or taskd are looked up
on the PATH by setting TASK_USE_PATH/TASKD_USE_PATH to "1"
2015-03-03 01:46:53 +00:00
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