summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/simple
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge remote branch 'martins/master'Ronnie Sahlberg2012-04-181-1/+1
|\ | | | | | | (This used to be ctdb commit abe7ebe6c531f912efe4ebc1daade4d2af67574c)
| * Tests - turn of time logging by defaultMartin Schwenke2012-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We haven't seen problems related to time jumps for a long time. Turn this off by default. To switch it back on set $CTDB_TEST_TIME_LOGGING to any non-null value. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2aa9bbf3a52dde0707eb06acd91e57c8da5c717f)
* | tests: Check assigned IPs from ctdb outputAmitay Isaacs2012-04-131-5/+5
| | | | | | | | | | | | | | | | This fixes the test ctdb_config_add_ip when running against local daemons. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit b81c2c8a2360001fe73f9fd9aa1ba32665fdb0bb)
* | tests: Check for assigned IP addresses only if we are on real clusterAmitay Isaacs2012-04-131-9/+11
| | | | | | | | | | | | | | | | This fixes the ctdb_ip test when running against local daemons. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a108fc14d90b6d552736d19b0ea104f2508dc331)
* | tests: Add regular expression parsing for hop_count_bucketsAmitay Isaacs2012-04-131-1/+1
|/ | | | | | | | This fixes the test to check ctdb statistics output. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 98c633ab4824e0e4d28ab2eb2532e16eb859bd94)
* Add test for NoIPTakeoverRonnie Sahlberg2012-04-121-0/+83
| | | | (This used to be ctdb commit 79172330d10ae0d5a7e5bf724959c9e5784716b4)
* Merge remote branch 'martins/master'Ronnie Sahlberg2012-03-152-4/+4
|\ | | | | | | (This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
| * Tests - simple - make disconnected node tests handle changed error messageMartin Schwenke2012-02-132-4/+4
| | | | | | | | | | | | | | | | | | 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: add test tool and test that UPDATE_RECORD works on persistent databasesRonnie Sahlberg2012-03-121-0/+89
| | | | | | | | (This used to be ctdb commit f06634951331232cddf0b48eac3552b92aca5b93)
* | TESTS: Add test for wipedb commandRonnie Sahlberg2012-02-161-0/+68
| | | | | | | | (This used to be ctdb commit 4ea05fef886b0680d0ad0936c239a51fd75bf000)
* | READONLY: add test for creating and revoking delegationsRonnie Sahlberg2012-02-131-0/+163
|/ | | | (This used to be ctdb commit a7e7fa2169ee12f817336f6d03d5bb72df7ec020)
* TESTS: Add a test that verifies that RecoverPDBBySeqNum works as expected.Ronnie Sahlberg2012-02-081-0/+232
| | | | | | If this tunable is set to 1 AND the persistent database contains a record "__db_sequence_number__" then we will recover the whole database as-is instead of doing the record by record recovery (This used to be ctdb commit 3e5d2b61fcb4d0062d2573d99724f630a4fc4622)
* Tests - ctdb listvars test should allow alphanumericals in tunable names.Martin Schwenke2011-08-151-1/+1
| | | | | | | | This matches the new "LCP2PublicIPs" tunable. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0680437bf5f02aeaed6387370e58bbdba2c04f28)
* Test suite: Fix consistency in 26_ctdb_config_check_error_on_unreachable.Martin Schwenke2011-08-081-1/+1
| | | | | | | | | | | | | | The test currently waits until any node thinks that the test node is disconnected, and then uses node 0 as a proxy for testing. However, nodes may notice at different times that a node is disconnected, so this test can fail unnecessarily. We force the proxy node for the wait-until-disconnected to be the same as the proxy node used to launch the actual tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 73cfc304513358e99e6505c95f44a4d319201309)
* 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: Strip architecture suffix from CTDB RPM package version.Martin Schwenke2011-08-081-0/+3
| | | | | | | | Later versions of RPM seem to include it but we don't want it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6c8eedb21a5e231d4a26ac26706ea51f348a27e0)
* Test suite: remove getmonmode test.Martin Schwenke2011-08-081-59/+0
| | | | | | | | | | | | | | | This can't be made 100% reliable since the monitor mode can change underneath us due to some event. Therefore, the test is useless. Signed-off-by: Martin Schwenke <martin@meltin.net> Conflicts: tests/simple/20_ctdb_getmonmode.sh Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 98ccdc6241a73036c4f210bb510f1cb5cff588cc)
* Test suite: make time log use seconds since epoch.Martin Schwenke2011-08-031-1/+1
| | | | | | | | Easier to implement automatic checking. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 18db530880849b59445d7aa508bf218bdd77ea1c)
* Test suite: make time logging only happen on a real cluster, not local daemons.Martin Schwenke2011-08-031-3/+5
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a6b3a7b7db9aa5fc971aae11b9b012e72c7d240c)
* Test suite: add time logging.Martin Schwenke2011-08-031-0/+7
| | | | | | | | | | We're seeing some weirdness with CTDB controls timing out. We're wondering if time is jumping forward, so this creates a time log on each node that we can examine later if tests fail weirdly. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5d82d89ee99f10bead101aebda645a80435ba246)
* 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: make statistics test cope with changes to statistics output.Martin Schwenke2010-11-171-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9e88466a99b5245d5f0ebab553be8d2b9b9a58e2)
* Test suite: loosen the getmonmode test.Martin Schwenke2010-08-181-10/+3
| | | | | | | | Monitoring could be off at the beginning of the test. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6a33a7715067175869ea2f3f15b64c3371079a6b)
* Test suite: make addip test use $CTDB rather than ctdb in debug code.Martin Schwenke2010-08-111-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5bb6b28ab7b45b7242d100ae8f1483d02e1d0d1d)
* Test suite: remove unnecessary verbosity from enable/continue tests.Martin Schwenke2010-08-052-12/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 69c95b2a42f55b80cd8d91a90ab55166f964163b)
* Test suite: Fix typo in continue test.Martin Schwenke2010-08-051-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c2bce140da7c4b118394ee77bb9d0348d27e7e95)
* Test suite: weaken ctdb continue/enable tests for non-deterministic IPs.Martin Schwenke2010-08-052-13/+8
| | | | | | | | | | | | These tests currently wait for the old IPs to fail back to the test node. This isn't guaranteed with DeterministicIPs disabled. This changes those tests to wait until the test node gets at least 1 IP assigned. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e9b3f5b1b51d541a911a27eb4348b368f28d185e)
* Test suite - make the ctdb_fetch test cope with "Reqid wrap!" messages.Martin Schwenke2010-08-051-1/+1
| | | | | | | | | Recent CTDB notice the wrap and print this message. The test needs to cope. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b93b60ec96d02ce4f54921e85a5c5554d1fc0c55)
* Test suite: remove thaw/freeze tests.Martin Schwenke2010-08-052-103/+0
| | | | | | | | They test debugging commands that no longer operate as expected. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d33fa4d6557aab1938049f194c2de55f2c395bd2)
* Test suite - fix addip test.Martin Schwenke2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | The test currently checks that all existing IPs plus the newly added IP are on the test node after "ctdb addip" is run. With DeterministicIPs enabled, if the new IP is "before" other IPs then the other IPs may be shuffled by the deterministic IPs modulo algorithm. This will happen on the 1st recovery after the move. Sometimes this recovery happens before we get the list of IPs to check and sometimes after, so the test is racy. The fix is to simply check for the presence of the new IP and not worry about the others. This reduces whatever value this test had... but you can't have everything. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1ef7c8e64c7a39330be09ae4d00b70238133e0b5)
* Test suite - try to make addip test more reliable and add some debugging.Martin Schwenke2010-08-041-8/+12
| | | | | | | | | | | | | | | | This test is failing in some situations. The "ctdb addip" command works but the IP never appears in the "ctdb ip" output. Try restricting the last octet to be between 101-199. At the moment addresses like 10.0.2.1 are being chosen and these are often the address of the host machine in autocluster configurations... so might cause weirdness. Also add some debugging if checking for the IP address times out. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ae52cb63756bc60de8d32e01bac5d70975a1c7a0)
* Test suite: handle extra lines in statistics output.Martin Schwenke2010-07-261-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a476a56da2219c1047081032595c045f65f8ad3f)
* Test suite: handle change to disconnected node error message.Martin Schwenke2010-07-261-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d75d7b49cf729bace820b3225e5c6d069bbcbc53)
* Test suite: Make "ctdb ip" test backward compatible with older ctdb versions.Martin Schwenke2010-02-101-14/+7
| | | | | | | | | | | | Recent updates to the test meant that it only worked with the latest ctdb versions. This changes things so that we never bother matching the machine readable header, just the actual data in the output. It also takes a slightly more liberal approach in massaging the human readable output to ensure it matches the machine readable output. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8a1cb5dc1ddf82f3b9cbb23e40b3914b3d5c2783)
* tools/ctdb: display interfaces in "ctdb ip" and "ctdb ip -Y" outputsStefan Metzmacher2010-01-201-4/+9
| | | | | | metze (This used to be ctdb commit dffa2b05acce8b73c2fdd085311732bf57f01b7f)
* tests: add a all_ips_on_node() helper function that wraps ctdb ip -YStefan Metzmacher2010-01-203-4/+4
| | | | | | metze (This used to be ctdb commit c24fbea156dfdc9154e94eace725526e44cbcdac)
* tests/simple/11_ctdb_ip.sh: be more strict in checking ctdb ip -Y outputStefan Metzmacher2010-01-201-4/+13
| | | | | | metze (This used to be ctdb commit 27bde04966e22975777b4034dbaccfe158369110)
* Test suite: Add an optimisation in the getvar test.Martin Schwenke2009-12-181-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d9105ea79df198a20c2bfe471c4793d1dbba886e)
* tests: remove the persistent_unsafe writes test.Michael Adam2009-12-091-39/+0
| | | | | | | | | This is useless now that persistent write operations without transaction are forbidden. Michael (This used to be ctdb commit b022863d44026c19d5aae54aa485b670bea0540e)
* tests: remove persistent_safe write test.Michael Adam2009-12-091-39/+0
| | | | | | | | This is useless now that persistent writes without transactions are forbidden. Michael (This used to be ctdb commit 9ac82311d796e1fab31f8de62b8ccc754445093c)
* test: add test 54_ctdb_transaction_recovery.shMichael Adam2009-12-091-0/+66
| | | | | | | | | | | | | | | This is like the 53_ctdb_transaction test, but it additionally runs a loop with recoveries while the transactions are running. When called like this, the transaction loops run for 10 minutes: CTDB_TEST_TIMELIMIT=600 tests/scripts/run_tests tests/simple/54_ctdb_transaction_recovery.sh The default timelimit is 30 seconds. Michael (This used to be ctdb commit 2ff2679e8f3d50ebf735f2c420898a84268bdc95)
* test: get value for --timelimit from environment var CTDB_TEST_TIMELIMIT in ↵Michael Adam2009-12-091-1/+5
| | | | | | | | transaction test Michael (This used to be ctdb commit c13077ca64f6e6569c30ef7fcb044e5711dce1a3)
* Test suite: Remove the disable/enable monitor tests - they are useless.Martin Schwenke2009-10-212-200/+0
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8264c42969d4be7fc6c5b4d56f8b5ef7c62b3bfb)
* Test suite: Fix the timeouts on the skip share check tests.Martin Schwenke2009-10-212-84/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The timeout for waiting for state changes isn't very predictable. It is "about" MonitorInterval seconds... but can be longer given the duration of eventscript runs and other things. So, we change the timeout to MonitorInterval + EventScriptTimeout, hoping it never takes that long. Move the eventscript installation/removal from the old fake-tests into a function in the functions file. Implement supporting functions to create/remove/check-for various files that it handles. Also add a function that uses all of this that waits for the next monitor event (but only if all other monitor events pass). The final check in the skip share check tests uses the above and waits for a monitor event, and then checks that the node is still healthy. Also enhance the wait_until function to handle a command starting with '!' (as a separate word) to make it easy to wait for a file not to exist. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 25e82a8a667a54c6921ef076c63fdd738dd75d19)
* Test suite: Update 99_ctdb_uninstall_eventscript.sh to use ctdb_init().Martin Schwenke2009-10-201-0/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2b478b0f5f09dd06626592573f053706ac637edd)
* 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-1112-18/+18
| | | | | | | | | | | | | | | | | | | 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)
* tests: fix the 52_ctdb_fetch.sh test.Michael Adam2009-08-041-36/+9
| | | | | | | | | | | | | The parser for the output of the ctdb_fetch program did not match the output that ctdb_fetch generates. It seemed to rather come from the ctdb_bench test... This patch adapts the parser to correctly interpret the output of ctdb_fetch. Michael (This used to be ctdb commit 836b95f32724cf37e4f643f20653f78842613692)
* Test suite: Fixes for node state parsing plus new stop/continue tests.Martin Schwenke2009-07-296-193/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The parsing of "ctdb status -Y" output to determine various node states was implemented very strictly. Therefore, the parsing broke due to the addition of the new "stopped" state to the output of "ctdb status -Y". This relaxes the parsing so that it should work for versions prior to the introduction of the "stopped" state, as well as future versions that add new states to the end of the list of bits in output of "ctdb status -Y". Similarly the check for cluster unhealthy (in _cluster_is_healthy()) now just checks for a single 1 in any bit in the "ctdb status -Y" output, rather than checking for a particular number of 0s. New tests tests/simple/{41_ctdb_stop.sh,42_ctdb_continue.sh,43_stop_recmaster_yield.sh} do rudimentary testing of the stop and continue functions. Remove tests tests/simple/41_ctdb_ban.sh and tests/simple/42_ctdb_unban.sh. They were both unreliable. tests/simple/21_ctdb_disablemonitor.sh now schedules a restart, since one will be required. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 67c5bfb5f02c9d45a32d976021ede4fb2174dfe9)