summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/complex
Commit message (Collapse)AuthorAgeFilesLines
* tests/complex: Fix NFS tests to work with root_squashMartin Schwenke2013-07-233-49/+14
| | | | | | | | | Refactor the NFS test setup/cleanup code into new common functions. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 29e98017221326bdc9b1c4f7c05b3b495c1de29b)
* tests/complex: Add NFS test when CTDB is killed on one of the nodesAmitay Isaacs2013-01-071-0/+88
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit b849fb4923d6a34141fe19006a974de81508ceda)
* tests/complex: Fix broken ctdb_test_check_real_cluster()Martin Schwenke2012-07-261-0/+3
| | | | | | | | It doesn't set $h at all... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3f268805c14c51f23024267916eae161bada8a0e)
* tests: Complex tests must not be run from a cluster nodeMartin Schwenke2012-05-251-5/+6
| | | | | | | | | | | | | | Tickle tests fail if run from a node involved in the test. The condition is actually weaker than this: the test can't be run from a CTDB node that is hosting public addresses that may be used by the test. Rework ctdb_test_check_real_cluster() to support checking this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 14012781c3751a514055df29ea70adfb12ecb2d9)
* tests: Move the "ctdb reloadips" test from complex/ to simple/Martin Schwenke2012-05-141-108/+0
| | | | | | | | | 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: Add a test for "ctdb reloadips"Martin Schwenke2012-05-111-0/+108
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d2514051761ba23deee0e118c25afab2ab8d854e)
* 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-0/+10
| | | | | | | | | | | | | | | | | | 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: Rationalise integration test infrastructureMartin Schwenke2012-04-271-0/+129
| | | | | | | | | | | | | * run_tests no longer includes common.sh, which is only to be included by test cases. Therefore, it defines its own die() function. * TEST_SUBDIR is now set in common.sh * Move complex-only functions to complex/scripts/local.bash Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bfa1d6638d3e116640eb4e3bb71b21ba6ef8cae5)
* tests: Rename ctdb_test_functions.bash to integration.bashMartin Schwenke2012-04-2710-10/+10
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)
* tests: exportfs always outputs with options in bracketsAmitay Isaacs2012-04-131-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit bdd8b8ab20169936fa723fa77cead1b76b6cd0b5)
* Tests: new test to check that "ctdb delip" removes the IP from interface.Martin Schwenke2012-02-061-0/+115
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a63e603cb7e21a7334c6a07bc4415ff089dab3c1)
* config can be in /etc/default/ instead of /etc/sysconfig/Mathieu Parent2011-11-081-1/+7
| | | | | | | | ... on Debian system and derivated. (ctdb_diagnostics still hardcodes /etc/sysconfig/) (This used to be ctdb commit 1341329f6125d491b82c873f793af819e677f714)
* Test suite: CTDB_SAMBA_SKIP_SHARE_CHECK test now uses _loadconfig().Martin Schwenke2011-08-031-9/+3
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 651e6703b6dc4d11ba7d6d0b44d3be1f485a0f75)
* Test suite: CTDB_NFS_SKIP_SHARE_CHECK test now uses _loadconfig().Martin Schwenke2011-08-031-9/+3
| | | | | | | | | The manual replacement of loadconfig() had bit rotted and no longer worked. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bf23e7166385d305c6860b37c120f70a9aa33aa5)
* Test suite: Make NFS tickle test more flexible.Martin Schwenke2010-08-271-5/+5
| | | | | | | | Use onnode any where possible rather than a fixed node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 51561720d2b4db5b307da3d410661075e2a6c3ca)
* Test suite: Fix NFS tickle test.Martin Schwenke2010-08-271-3/+10
| | | | | | | | | | | | We now kill ctdbd on the test node instead of disabling it. This ensures that the only tickles we see will come from the takeover node. We also sleep for TickleUpdateInterval before checking for asking ctdb about the tickles. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 48cd8325c070f6942aa13a25269021e4c8ed188f)
* Test suite: Tweak NFS tickle test.Martin Schwenke2010-08-261-2/+3
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c32ffd203e42a39010ce2d6e98253e8e48de515a)
* Test suite: Fix typos in NFS tickle test.Martin Schwenke2010-08-261-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c35d3e6341bc4e288393efa429b68bf6568b9b11)
* Test suite: NFS tickle test uses gettickles if events.d/61.nfstickle missing.Martin Schwenke2010-08-261-7/+11
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4763ccbfeaedd0fd953dbeda17ef9af41386688b)
* Test suite: Make the CIFS tickle test wait until it sees the required tickle.Martin Schwenke2009-11-191-1/+9
| | | | | | | | | | The test depended on the exit code of "ctdb gettickles", which always succeeds. This change wraps the command in a function that checks whether the tickle we're interested in is registered. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c4b05a731e1bee8f5b46529773a4f5389b2b6064)
* Test suite: Fix the NFS and CIFS tickle tests.Martin Schwenke2009-11-132-7/+9
| | | | | | | | | | | | | | | | | | The NFS test sleeps for MonitorInterval to give CTDB time to record an NFS tickle. However, this isn't always long enough. This changes the test to wait until a monitor event has actually occurred. The CIFS test assumes that Samba is able to register a tickle with CTDB before it notices that netstat has registered the tickle and can use onnode to ask CTDB about it. That is an incorrect assumption - sometimes we can get to the point of asking CTDB about the tickle before Samba and CTDB have processed it. This adds a timeout loop that makes the CIFS test wait until the tickle has been registered or fail after 10 seconds. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 20a9d35933d89dc7eb710075f360686a49d78609)
* Test suite: Fix the timeouts on the skip share check tests.Martin Schwenke2009-10-212-27/+43
| | | | | | | | | | | | | | | | | | | | | | | | | 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: A timeout of MonitorInterval seconds sometimes isn't enough.Martin Schwenke2009-10-202-2/+2
| | | | | | | | | | Monitor events sometimes happen a little bit more than MonitorInterval seconds apart. This changes some timeouts to MonitorInterval + 1 seconds. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6ef4364b3349145b2fec23e0431cd6df6dcadd41)
* Test suite: New tests for validating SKIP_SHARE_CHECK options.Martin Schwenke2009-10-202-0/+259
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f50d64a8ac91415ca297216d2103ff940076f02b)
* Test suite: Update "complex" tests for wait_until_node_has_status() change.Martin Schwenke2009-09-117-7/+7
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 31216fd48117526c943e42d137ce24ef89fa0009)
* Test suite: fix minor typo in complex/32_cifs_tickle.shMartin Schwenke2009-08-271-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit cd65d8acb97aa9f83ff0d0585bf09caef2d2f3eb)
* Test suite: Retrieval NFS_TICKLE_SHARED_DIRECTORY more defensively.Martin Schwenke2009-07-301-1/+2
| | | | | | | | | | In complex/31_nfs_tickle.sh we run sed against a file that might not exist, causing potential garbage from stderr in the output. Check that the file exists before running sed. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f9b71757f034732647228d4b8a8f00528028b6b0)
* Test suite: Better diagnostics for recent change to complex/31_nfs_tickle.sh.Martin Schwenke2009-07-301-1/+1
| | | | | | | | | | Add a -v so we see the output of the command that tries to get the value of NFS_TICKLE_SHARED_DIRECTORY. That way we can tell if a value was retrived OK or if we're using the default. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c53353c6402f378f29200313d82f1f9262d628b1)
* Test suite: complex/31_nfs_tickle.sh should use NFS_TICKLE_SHARED_DIRECTORY.Martin Schwenke2009-07-301-1/+6
| | | | | | | | | | Rather than hardcoding the location of the shared tickle directory, attempt to use the value of NFS_TICKLE_SHARED_DIRECTORY from /etc/sysconfig/nfs on node 0. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 878437a909ea44dfc3635f082e34741ee256e505)
* Test suite: Ask CTDB about CIFS tickles registered for the actual test node.Martin Schwenke2009-07-301-2/+2
| | | | | | | | | | This failed when node 0 had no public IPs because we would always run "ctdb gettickles" on node. We now ask node 0 for the tickles on the test node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8fcc4610de926f44e18ec85fb57ca5f7d3c28bd6)
* Test suite: Turn off strict host key checking in the SSH failover test.Martin Schwenke2009-07-301-2/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b7787255391eddef8458f81ff9b75d9116e2afd3)
* Test suite: fix test file permissions in complex/44_failover_nfs_oneway.sh.Martin Schwenke2009-07-301-1/+2
| | | | | | | | | | | Something, perhaps root_squash, causing permission denied on the test file after we copy it over with scp. This sets the initial permissions to be friendly and adds -p to the scp command to maintain those friendly permissions. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 52f21f5a92eb14df7540a2ae9e212d936e646c06)
* Test suite: new tests and code factoring.Martin Schwenke2009-07-087-101/+203
| | | | | | | | | | | | | * 2 new tests for NFS failover. * Factor repeated code from tests into new functions select_test_node_and_ips(), gratarp_sniff_start() and gratarp_sniff_wait_show(). Use these new functions in existing and new tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit de0b58e18fcc0f90075fca74077ab62ae8dab5da)
* Test suite: better debug info when the cluster is unexpectedly unhealthy.Martin Schwenke2009-07-065-5/+20
| | | | | | | | | | | | | | | 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)
* New tests for different aspects of failover.Martin Schwenke2009-07-033-0/+284
| | | | | | | | | | | | | | 3 separate tests: * Check that gratuitous ARPs are received and take effect. * Check that ping still works after failover. * Check, via SSH, that the hostname changes after failover. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 92011cc05bbdb517ec6a4573f5cb9f6f21c3059e)
* Updates to TCP tickle tests and supporting functions.Martin Schwenke2009-07-032-20/+4
| | | | | | | | | | | | | | | | | | | | * Removed a race from tpcdump_start(). It seems impossible to tell when tcpdump is actually ready to capture packets. So this function now generates some dummy ping packets and waits until it sees them in the output file. * tcpdump_start() sets $tcpdump_filter. This is the default filter for tcpdump_wait() and tcpdump_show(), but other filters may be passed to those functions. * New functions tcptickle_sniff_start() and tcptickle_sniff_wait_show() handle capturing TCP tickle packets. These are used by complex/31_nfs_tickle.sh and complex/32_cifs_tickle.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8e2a89935a969340bfead8ed040d74703947cb81)
* New tests for NFS and CIFS tickles.Martin Schwenke2009-06-162-0/+227
New tests/complex/ subdirectory contains 2 new tests to ensure that NFS and CIFS connections are tracked by CTDB and that tickle resets are sent when a node is disabled. Changes to ctdb_test_functions.bash to support these tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 31cc46eb157ca1301312f14879e4fb4da7d81088)