summaryrefslogtreecommitdiff
path: root/ctdb/tests/simple/09_ctdb_ping.sh
Commit message (Collapse)AuthorAgeFilesLines
* tests: Rename ctdb_test_functions.bash to integration.bashMartin Schwenke2012-04-271-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)
* Tests - simple - make disconnected node tests handle changed error messageMartin Schwenke2012-02-131-1/+1
| | | | | | | | | Recent changes to nodestring parsing generalised the error message logged when trying to talk to a disconnected node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit db69a39ca010b2c8853b13466e30792dda350cdb)
* Test suite: Fix consistency in 09_ctdb_ping.sh.Martin Schwenke2011-08-081-1/+1
| | | | | | | | | Same problem as described in commit 283a85b42d9c0a26acb64d5abcc7f175e31e6e75. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7758fd0591467a758e5d22404aa59fcbc1e1cb8b)
* Test suite: fix typo in ctdb ping test grep pattern.Martin Schwenke2010-11-171-2/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ad18bfa398e582474afe25340368e39d4e74e3c6)
* Test suite: match changed output for ctdb ping to disconnected node.Martin Schwenke2010-11-171-1/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a9f5ae2a548e1096c086888adc886cb604d372fa)
* Test suite: The ctdb ping test should allow time to go backwards.Martin Schwenke2009-10-011-1/+1
| | | | | | | | | Time can actually go backwards during this test if ntpd happens to adjust it little bit. So we should cope... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 23ae9e9863ea90c6fb3f105403fd098041fa73f4)
* Test suite: wait_until_node_has_status() now uses "onnode any".Martin Schwenke2009-09-111-1/+1
| | | | | | | | | | | | | | | | | | | Many tests currently do this sort of thing: onnode 0 $CTDB_TEST_WRAPPER wait_until_node_has_status 1 disconnected In fact, they all use exactly the same "onnode 0 $CTDB_TEST_WRAPPER" idiom. This is both repetitious and dangerous, since node 0 might be shutdown during a test. Instead, we push "onnode any $CTDB_TEST_WRAPPER" (which selects a connected node) into wait_until_node_has_status() and just call that function directly in tests, like this: wait_until_node_has_status 1 disconnected Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a2aaef03d4d6bbd4b42f50f732254935d4d3469c)
* Test suite: better debug info when the cluster is unexpectedly unhealthy.Martin Schwenke2009-07-061-2/+5
| | | | | | | | | | | | | | | cluster_is_healthy() is now run locally in tests and internally causes _cluster_is_healthy() to be run on node 0. When it detects that the cluster is unhealthy and $ctdb_test_restart_scheduled is not true, debug information is printed. This replaces the previous use of $CTDB_TEST_CLEANING_UP. To avoid spurious debug on expected restarts, added scheduled restarts to several tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ee7caae3a55a64fb50cd28fa2fd4663c5dd83b4f)
* Separate test cleanup code in output and clean up ctdb restart code.Martin Schwenke2009-07-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ctdb_restart_when_done() now schedules a restart by setting an explicit variable that is respected in ctdb_test_exit(), rather than adding a restart to $ctdb_test_exit_hook. This means that restarts are all done in one place. * ctdb_test_exit() turns off "set -e" to make sure that all cleanup happens. * ctdb_test_exit() now prints a clear message indicating where the test ends and the cleanup begins. This message also includes the return code of the test. * Add debug in cluster_is_healthy to try to capture information about unexpected unhealthiness when a test starts. * Simplify simple/07_ctdb_process_exists.sh so that the exit code is generated more obviously. * Remove redundant calls to ctdb_test_exit at the end of tests, since they're done automatically via a trap. Also remove any preceding warnings of restarts or final hints about test success/failure. * Allow multi-digit debug levels in simple/12_ctdb_getdebug.sh and simple/13_ctdb_setdebug.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b6fa044a1364cbb3008085041453ee4885f7ced1)
* Delete some unstructured tests ({fetch,peristent,transaction}.sh) andMartin Schwenke2009-01-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | replace them with new simple tests (52_ctdb_fetch.sh, 53_ctdb_transaction.sh, 61_ctdb_persistent_safe.sh, 62_ctdb_persistent_unsafe.sh). Remove "_simple" from some test filenames in the simple subdirectory - that's redundant. Always run ctdb as $CTDB to allow $VALGRIND magic to be used. Use pgrep/pkill to detect/kill local daemons so those running under valgrind can be found too - to support this, always run local daemons with the full path to the executable. run_tests now supports -s option to print sumamry when done - with more and more tests, it is getting hard to follow progress. Sort the output of commands in 06_ctdb_getpid.sh to make sure they compare nicely and also allow the processes' executables to be called "memcheck" to catch those running under valgrind. Remove redundant calls to onnode in commands run from calls try_command_on_node in some tests. 41_ctdb_ban.sh and 42_ctdb_unban.sh avoid banning the recmaster, since this causes the recmaster to be reassigned and all nodes to be unbanned. Minor cleanups. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 33cdf3e4bcfadf8e20822ca352babf7acca16821)
* Remove old ctdbd.sh test script. Remove unneeded nodes.txt andMartin Schwenke2008-12-181-2/+2
| | | | | | | | | | | public_addresses files - these are now created in tests/var as needed. 09_ctdb_ping.sh now recognises new "node disconnected" message. Replace custom recovery detection code (which could not have been working) with a call to "ctdb recover" in 32_ctdb_enable_simple.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 486ed3b5b483f1c12c2d978ec6564bd33a2c6aee)
* With local daemons the sockets are now numbered starting from 0. FixMartin Schwenke2008-12-101-6/+6
| | | | | | | | | | | | | | setup of local daemons so that it correctly assigns no public IPs to a single node each time. Separate out daemon_setup so that the selection of the node with no public IPs is only done once at the beginning of testing. Clean up all current tests, mostly with a view to ensuring that a node selected for testing some kind of failover actually has public addresses assigned. Reenabled 01_ctdb_version.sh - it now passes if rpm doesn't do anything useful on the node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 86807e8b7b179cbe87e559fb3b1f02c8b1990dc4)
* Added use of $ctdb_test_exit_hook to function ctdb_test_exit. RemovedMartin Schwenke2008-12-091-1/+1
| | | | | | | | | | | | | sleeps from ban/unban tests. Now expect "ctdb ping" to return false if it fails, so made relevant change to 09_ctdb_ping.sh. New functions install_eventscript and uninstall_eventscript. New setup/cleanup tests 00_ctdb_install_eventscript.sh and 99_ctdb_uninstall_eventscript.sh. New test 21_ctdb_disablemonitor.sh, which is incredibly complex. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 23bffef2295772f5b795236d60b7fb6ea754b7fb)
* $PATH only inludes $CTDB_DIR/bin if we're using local sockets. RenameMartin Schwenke2008-12-031-2/+2
| | | | | | | | | $TEST_WRAP to $CTDB_TEST_WRAPPER - value now set using $CTDB_TEST_REMOTE_SCRIPTS_DIR if that is set. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a69545d7dec78eefb85a1598e5db4667cc210bf9)
* New test 09_ctdb_ping.sh. Add documentation and command-lineMartin Schwenke2008-11-241-0/+58
processing to all tests. New script ctdb_test_env sets up environment for tests, is now sourced by run_tests, and can also take a test on the command-line, complete with options. Various cleanups and improvements. Document tests that have been properly implemented in ctdbd.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 826e85fe5291067b8d0b9c22918d63024aa6141c)