Commit graph

22 commits

Author SHA1 Message Date
Tomas Babej
0d1542ccd7
meta: Update various links to https 2021-03-12 07:58:04 -05:00
Max Rossmannek
8b91cd97a8 Enforce Python 3 in test_hooks/wrapper
This change was not included in the previous commit because the sed
command I used included the `/usr/bin/env` path to ensure I don't
replace any occurences of the word `python` which I did not wish to
replace.
2020-11-30 00:51:54 -05:00
Max Rossmannek
f35989be0e Enforce Python 3 for unittests
This commit updates all tests to enforce the Python3 executable. This is
necessary because the `assertRegex` function we use was renamed to this
name only in Python 3.2 [1]

For reference:
s;/usr/bin/env python;/usr/bin/env python3;g

[1]: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRegex
2020-11-30 00:51:54 -05:00
Wilhelm Schuermann
5cd1649db2 Tests: Add failing on-modify hook
- An on-modify hook that reverts all changes (i.e. returns the original
  task) should result in no changes.  Currently the "modified:"
  attribute gets updated despite no other changes being present.
2015-09-04 21:39:08 +02: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
Wilhelm Schuermann
8d5a77f490 Tests: Adjust wrapper to make hook env test work 2015-04-06 10:01:09 +02:00
Paul Beckingham
d31227d2e2 Tests: Add testing for hook args. Doesn't work. 2015-04-05 13:04:51 -04:00
Paul Beckingham
f454eecafb Unit Tests
- Corrected expected output.
- Added 'complete' task to the on-modify-misbehave4 test hook script.
2015-02-14 17:46:24 -05:00
Paul Beckingham
83519a44c6 Unit Tests
- Added feedback to the on-modify-misbehave2 test hook script.
2015-02-14 17:42:03 -05:00
Paul Beckingham
8ad0c1172e Unit Tests
- on-add now detects JSON emitted by hooks for different tasks.
2015-02-14 16:46:52 -05:00
Paul Beckingham
ab41e005c9 Unit Tests
- Added on-exit test for unexpected JSON output.
2015-02-14 16:19:36 -05:00
Paul Beckingham
bd785ffad5 Hooks
- Added a new on-launch-misbehave2 script that emits unexpected JSON.
2015-02-14 16:14:20 -05:00
Paul Beckingham
876820ee1a Unit Tests
- Restored bash as the interpreter for wrapper.sh.
2015-02-07 10:39:16 -05:00
Paul Beckingham
8b28c36485 Unit Tests
- Modified the test_hooks/* scripts to use /bin/sh, which is portable. When
  using /bin/bash, Cygwin and FreeBSD silently fail.
2015-02-07 10:22:07 -05:00
Paul Beckingham
1b69ac6ad2 Unit Tests
- The on-modify-misbehave1 test is not useful.
2015-02-07 08:57:27 -05: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
Paul Beckingham
10c1b5f902 Merge branch '2.4.1' of ssh://git.tasktools.org/tm/task into 2.4.1 2015-02-01 11:53:11 -05:00
Renato Alves
049ed04471 Unittest - Document the magic line in wrapper.sh 2015-02-01 06:23:34 +00:00
Paul Beckingham
3ff42af9c7 Unit Tests
- Added sample hooks that behave/misbehave in various ways.
2015-01-31 18:34:25 -05:00
Renato Alves
d68fa7ea8a Unittest - Template updated to include hook test examples 2015-01-19 14:58: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