summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/simple
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-tests: Add test for re-attaching detached databaseAmitay Isaacs2014-04-231-0/+33
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests: Update "ctdb detach" testMartin Schwenke2014-04-231-15/+56
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests: Add a simple test for "ctdb detach"Amitay Isaacs2014-04-141-0/+85
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Fix and extend read-only records testMartin Schwenke2014-03-281-93/+123
| | | | | | | | | | | | | This test currently counts the number of read-only-enabled databases and expects there to only be 1. It fails when there are existing databases with read-only already enabled. Instead, check just the test database. Clean up the test by adding some functions to check for precisely the read-only flags that should be set on a node after each operation. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Handle interactions with monitor eventsMartin Schwenke2014-02-131-7/+3
| | | | | | | | | | | | | | | In the first case, reconfiguration can longer happen in a monitor event, so this is no longer a problem. Drop it. Running a monitor event by hand no longer cancels the existing monitor event. Instead the hand-run event fails. So do this differently and just wait for a monitor event before continuing. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu Feb 13 04:05:57 CET 2014 on sn-devel-104
* ctdb-tests: Set CTDB_EVENT_HELPER when running with local daemonsAmitay Isaacs2014-01-161-0/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb/tests/integration: Decentralise the daemon restart codeMartin Schwenke2013-12-051-0/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Update daemons shutdown pseudo-testMartin Schwenke2013-12-052-3/+10
| | | | | | | | Don't scatter the TEST_LOCAL_DAEMONS logic around the code. Limit it to the local daemons file. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/simple: Local daemons version of setup_ctdb() overridesMartin Schwenke2013-12-051-1/+1
| | | | | | | | setup_ctdb() doesn't need to do anything on a cluster. To avoid a conditional, just override it for local daemons. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Remove the time logging codeMartin Schwenke2013-12-051-9/+0
| | | | | | | | This hasn't been required for a long time and is probably broken. If it is needed in future then we know where to find it. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/simple: Move the local daemons code to its own fileMartin Schwenke2013-12-052-0/+125
| | | | | | | This is just a straight move. The clever stuff will follow. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:tests:76_ctdb_pdb_recovery: change from using ctdb pstore to ctdb ptrans.Michael Adam2013-11-281-4/+2
| | | | | | | | | | This removes the requirement to create a temporary file and hence makes this test runnable against local daemons and against a real cluster without further changes. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a messageMichael Adam2013-11-281-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a messageMichael Adam2013-11-281-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests/simple: Nobody looks at /tmp/recloop.out so use /dev/null insteadMartin Schwenke2013-11-271-1/+1
| | | | | | | | | | | Otherwise this should use mktemp, something should look at the output and the file should be removed. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Nov 27 20:39:00 CET 2013 on sn-devel-104
* ctdb-tests/integration: Neaten up some of the persistent database testsMartin Schwenke2013-11-273-150/+135
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests/simple: User sleep_for() instead of sleepMartin Schwenke2013-11-271-2/+2
| | | | | | | Progress... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests/simple: Update persistent DB testsMartin Schwenke2013-11-273-13/+13
| | | | | | | | | | | * Low level DB checks should ignore the sequence number record. * A restart is needed after messing with the RecoverPDBBySeqNum tunable. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tools/ctdb: New ptrans commandMartin Schwenke2013-11-271-0/+127
| | | | | | | | Also add test. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests: CTDB tool should always be invoked as $CTDB instad of ctdbAmitay Isaacs2013-11-277-92/+92
| | | | | | | | $CTDB_TEST_WRAPPER is required only to run test functions or test binaries on remote nodes. For running ctdb command, $CTDB is sufficient. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests: No need to run onnode in parallel for single nodeAmitay Isaacs2013-11-273-6/+6
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests: Remove -q option to try_command_on_nodeAmitay Isaacs2013-11-2712-99/+99
| | | | | | | This option is always passed to onnode by default. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* tests: Fix calling of ctdb tool from testAmitay Isaacs2013-11-071-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 9381c33dfd40192b7532d942059c2959dfae059d)
* tests: No need to set sequence number when modifying persistent databaseAmitay Isaacs2013-10-041-10/+2
| | | | | | | | | With the new persistent transaction code, sequence numbers will be automatically updated whenever a record is updated. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 961dd5d0acbb971756944ea9f69992020ea7d9fc)
* tests: Add a simple test to test cluster wide database traverseAmitay Isaacs2013-09-261-0/+73
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 713c9ecc791e3319a2d109838471833de5a158c8)
* tests/simple: Fix the reloadips test to cope with changes to reloadipsMartin Schwenke2013-09-191-3/+3
| | | | | | | | Specifying nodes to reload no longer uses -n. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d921b2756d5f1c4ad7a35fe120f6fda9f5bf5686)
* tests/simple: Minimise the chance of a monitor event being cancelledMartin Schwenke2013-08-221-0/+4
| | | | | | | | | | | | | | A monitor event following a "ctdb delip" might reconfigure services. If the monitor event is cancelled then a service might be stopped but not yet restarted and this could result in the subsequent monitor events failing. This obviously needs to be fixed in CTDB itself. This will happen by making "ctdb reloadips" the supported way of reconfiguring IPs. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 618ea3660e36e7bd92b686e1ca8728cf63c3c068)
* tests/simple: Unreachable node test should wait for recovery to completeMartin Schwenke2013-08-141-0/+2
| | | | | | | | | This should minimise the chances of a control timing out. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 63be516673c5d9c0d543617bf1bb8bca919956a8)
* tests/simple: Fix the missing IP testMartin Schwenke2013-08-141-6/+8
| | | | | | | | | | | | | | | Update the missing IP test to wait until restarts are complete. Otherwise a service restart can collide with the following monitor event and cause chaos. Also, do not disable 10.interface until it matters. Disabling it too early can cause even more chaos if something goes wrong with the monitor step. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 4e3bd06916bd3adac213fb18c7c2a24854b02d45)
* tests/simple: Add -p in onnode test to help show groups of connectionsMartin Schwenke2013-07-221-1/+1
| | | | | | | | | | | Change the command from "true" to "hostname" since the former won't produce any output when used in combination with "onnode -p". This could just be changed to "echo" but the hostname might actually be useful. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ae3c03d80264e997b7da9f3279d7810e18b8a1df)
* tests: add a comment to recovery db corruption testMichael Adam2013-04-171-0/+7
| | | | | | | | | The comment explains that we use "ctdb stop" and "ctdb continue" but we should use "ctdb setcrecmasterrole off". Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 06ac62f890299021220214327f1b611c3cf00145)
* tests: Add a test for subsequent recoveries corrupting databasesAmitay Isaacs2013-04-171-0/+126
| | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit b1577a11d548479ff1a05702d106af9465921ad4)
* tests: Fix typo in variable nameAmitay Isaacs2013-04-151-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 043e18a8324ccb2c8ddd7b323ebedb5b0de1298d)
* tests: Add a test for recovery of persistent databasesAmitay Isaacs2013-01-091-0/+119
| | | | | | | | | | Ensure that RSN based recovery and __db_sequence_number__ based recovery methods for persistent databases work correctly. They should not cause corruption of the database. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 45d439a1ab093b420c27b1502ef109021833c7af)
* tests/simple: Add test to check recovery daemon IP verificationMartin Schwenke2013-01-081-0/+103
| | | | | | | | Also update ips_are_on_nodeglob() to handle negation. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 13a5944f8a27d43006acfffba76958693cae7702)
* tests: new simple integration test for delip interface garbage collectionMartin Schwenke2013-01-071-0/+62
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1a5410e8349cdb96fdc51aa5ecd4f5734f6798a5)
* tests: Do not check release suffix in ctdb version testAmitay Isaacs2012-10-311-1/+2
| | | | | | | | | release suffix added by RPM is to track packaging changes. Core CTDB version does not include the release suffix. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit aad1584da8a8425bc6f5163c95810e9d2390dc91)
* tests: Fix statistics test for new output lines from locking APIAmitay Isaacs2012-10-201-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1ee55c511b99e9f8a6fa4e34207267e953f09bae)
* tests/simple: ctdb stop/continue tests weren't actually checking IPsMartin Schwenke2012-07-262-2/+2
| | | | | | | | The correct variable is $test_node_ips, not $ips. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8d17dacee415dd0b4268805a366a86f83e33f27c)
* tests: simple tests against local daemons should check $TEST_LOCAL_DEAMONSMartin Schwenke2012-07-261-1/+1
| | | | | | | | Note the old $CTDB_TEST_REAL_CLUSTER - it doesn't exist anymore... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 47180dc75d15f3d61470705603565b718491c9f8)
* tests/simple: ctdb reloadips test should use $test_ipMartin Schwenke2012-07-261-6/+5
| | | | | | | | There's no point recalculating this value. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6e7bd9685406ae024d413a5d9d8c6e0d89b15567)
* tests: Fix ctdb_fetch test (parse extra lines of output)Amitay Isaacs2012-05-281-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0be452958db95c8253c362a1c08a1966e53a1f99)
* tests: Move the "ctdb reloadips" test from complex/ to simple/Martin Schwenke2012-05-141-0/+106
| | | | | | | | | This is made possible by separation of public addresses files for local daemons and the addition of get_ctdbd_command_line_option(). Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2bcd58b30d7cf6dd48ad7f019810c6965a44c85a)
* tests/simple: Fix typo in the test messageAmitay Isaacs2012-05-011-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c642b452e7b0272e32c02509ac579b790d9a03e7)
* tests/simple: Add new pseudo testcase to potentially shutdown local daemonsMartin Schwenke2012-04-271-0/+23
| | | | | | | | Only shuts them down if $TEST_CLEANUP is true. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eddfc02335202d853e29a89f08225ab44cac8a25)
* tests: Time logging in integration tests should use TEST_VAR_DIRMartin Schwenke2012-04-271-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 734cbd7def23236d418ebc6d813a748a84900101)
* tests/simple: Replace "tdbdump" with "ctdb cattdb"Martin Schwenke2012-04-271-15/+15
| | | | | | | | tdbdump may not be installed and would be an unnecessary dependency. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fbabc05569d91bf033f474d89f51b49490943332)
* tests: Update README files and add new README files where missingMartin Schwenke2012-04-271-0/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)
* tests: Local daemons are no longer the default, now require run_tests -lMartin Schwenke2012-04-271-1/+1
| | | | | | | | | | | | | | | | | | Testing with local daemons is the current default but this is not the most common use case. Therefore, we make local daemons optional by using the -l switch with run_tests or by setting TEST_LOCAL_DAEMONS to the number of daemons to be used (-l sets this to 3). TEST_LOCAL_DAEMONS replaces CTDB_TEST_NUM_DAEMONS and CTDB_TEST_REAL_CLUSTER is removed. Most relevant logic is moved from ctdb_test_env to integration.bash. ctdb_test_check_real_cluster() is moved from integration.bash to complex/scripts/local.bash. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 72ecae61c43b318ec94b527a12cbb0a382e8c3db)
* tests: Rename ctdb_test_functions.bash to integration.bashMartin Schwenke2012-04-2736-36/+36
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)