ldb: Release ldb 1.3.0
[Samba.git] / ctdb / tests / eventscripts / README
blob304cdba185a898519a00ad92bb1441ba11a04d05
1 eventscript unit tests
2 ======================
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.
9 Test case filenames look like:
11   <eventscript>.<event>.NNN.sh
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.
19 Examples:
21 * ../run_tests.sh .
23   Run all tests, displaying minimal output.
25 * ../run_tests.sh -s .
27   Run all tests, displaying minimal output and a summary.
29 * ../run_tests.sh -s ./10.interface.*.sh
31   Run all the tests against the 10.interface eventscript.
33 * ../run_tests.sh -v -s .
35   Run all tests, displaying extra output and a summary.
37 * ../run_tests.sh -sq .
39   Run all tests, displaying only a summary.
41 * ../run_tests.sh -X ./10.interface.startup.002.sh
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.