ctdb-tests: Move eventd tests to UNIT/ subdirectory
[samba.git] / ctdb / tests / UNIT / eventscripts / README
1 eventscript unit tests
2 ======================
3
4 This directory contains some eventscript unit tests for CTDB.  These
5 tests can be run as a non-privileged user.  There are a lot of stub
6 implementations of commands (located in stubs/) used to make the
7 eventscripts think they're running against a real system.
8
9 Test case filenames look like:
10
11   <eventscript>.<event>.NNN.sh
12
13 The test helper functions will run <eventscript> with specified
14 options.  If using the simple_test() helper function then the 1st
15 <event> argument is automatically passed.  When simple_test_event() is
16 used the event name must be explicitly passed as the 1st argument -
17 this is more flexible and supports multiple events per test.
18
19 Examples:
20
21 * ../run_tests.sh .
22
23   Run all tests, displaying minimal output.
24
25 * ../run_tests.sh -s .
26
27   Run all tests, displaying minimal output and a summary.
28
29 * ../run_tests.sh -s ./10.interface.*.sh
30
31   Run all the tests against the 10.interface eventscript.
32
33 * ../run_tests.sh -v -s .
34
35   Run all tests, displaying extra output and a summary.
36
37 * ../run_tests.sh -sq .
38
39   Run all tests, displaying only a summary.
40
41 * ../run_tests.sh -X ./10.interface.startup.002.sh
42
43   Run a test and have the eventscript itself run with "sh -x".  This
44   will usually make a test fail because the (undesirable) trace output
45   will be included with the output of the eventscript.  However, this
46   is useful for finding out why a test might be failing.