summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
* locking: Use separate locking helper binary for lockingAmitay Isaacs2013-05-241-0/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 7cde53a6cbe74b1e46f7e1bca298df82c08de866)
* tests: Unit test diff output should use filtered outputMartin Schwenke2013-05-071-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9721aae001b3023e9c8b4af2b143c0db3442d623)
* tests: Support waiting for "recovered" state in testsAmitay Isaacs2013-04-171-1/+4
| | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 2438f3a4944f7adbcae4cc1b9d5452714244afe7)
* tests/simple: Add test to check recovery daemon IP verificationMartin Schwenke2013-01-081-6/+18
| | | | | | | | 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 function ip2ipmask() for integration testingMartin Schwenke2013-01-071-0/+7
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8164d9b29bf9080ccc76b1305fb6c07f1ed61d55)
* tests: Local daemons should use --listen instead of --node-ipMartin Schwenke2013-01-071-1/+1
| | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 3221fce9ee2f6fdd3bb17a5e1629ad52a32f90d6)
* tests: Local daemons should use the logging ringbufferMartin Schwenke2012-10-221-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7547e011005f0dd5bd38e67572280126cf16e229)
* eventscripts: Auto-start/stop services in backgroundMartin Schwenke2012-10-031-1/+1
| | | | | | | | | | | If $CTDB_SERVICE_AUTOSTARTSTOP="yes" then service start/stop is done in the background with logging. Fix some unit tests for samba and winbind. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3a3dae4cb5ec8b4b8381a4013adda25b87641f3a)
* tests: select_test_node_and_ips() should try to avoid failingMartin Schwenke2012-07-261-1/+19
| | | | | | | | | | | | Sometimes "ctdb sync" doesn't do its job, so we end up with unassigned IPs. If $test_node isn't set then this is bad. However, try a few times to ensure it is set. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2fd0157382b42aa5c5212b8e743c6f589edc6662)
* 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: run_tests should exit with $status with -e optionMartin Schwenke2012-07-261-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 619af3e857c2ced3840abfd86135cc954796da97)
* tests: select_test_node_and_ips() should never select non-node -1Martin Schwenke2012-07-261-5/+4
| | | | | | | | Instead of selecting the 1st pnn found, select the 1st one that isn't -1. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f02e501342112aab67aee95f253e29a670b29273)
* run_tests: improve spacingMichael Adam2012-07-031-1/+2
| | | | (This used to be ctdb commit a0a0f5588445aeabe07b0e4d65087db454dc09da)
* tests: Use per node log files when running tests with local daemonsAmitay Isaacs2012-05-251-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 61df417821762d87ed01a7b5e64c35079940344d)
* tests: Fix a typo in daemons_setup()Martin Schwenke2012-05-141-2/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 863ad337fa3c4effe1fd370d3ba414027c600bd6)
* tests: New function get_ctdbd_command_line_option() for integration testingMartin Schwenke2012-05-141-0/+21
| | | | | | | | | This allows, for example, the public addresses file used by a particular daemon to be known. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f4b7d14f2e3c7345e7a09abb27c32923fb78cbc4)
* tests: Use per-daemon public_addresses file for local daemonsMartin Schwenke2012-05-141-6/+8
| | | | | | | | This allows a node's public addresses file to be hacked for testing. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c7d6e4557d00de674737e2c8d6cbebaa2461c303)
* tests: Fix wrapper scripts to handle options and tests without breakageMartin Schwenke2012-05-141-18/+42
| | | | | | | | | | | | | | | | | | | | | If the -V option is given and no tests are supplied, the "cd" command in run_tests.sh cause scripts/run_tests to interpret the argument to -V incorrectly. Therefore, the wrapper scripts can't use "cd" because they don't know what the options are doing! Instead scripts/run_tests searches for each test relative to the current directory and, if not previously found, then searches relative to the top-level tests directory. This is a much better way of doing things. Given that run_tests.sh and run_cluster_tests.sh were starting to contain duplicate complex logic, remove run_cluster_tests.sh and replace it with a symlink to run_tests.sh. Run_tests.sh checks $0 to see what options/defaults to use. Update INSTALL to deal with this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ed2db1f4e8d2b222d7f912a4a007ce48a23e83b0)
* tests: In integration tests, use --node-ip to avoid locking weirdnessMartin Schwenke2012-05-111-1/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a00e80c701a0f9695f41c24e0360c25c0873d49d)
* tests: New run_tests -C (cleanup) optionMartin Schwenke2012-04-271-1/+12
| | | | | | | | | Sets TEST_CLEANUP=true and causes $TEST_VAR_DIR to be removed... and potentially other cleanup actions in testcases. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3219f221a858e499f084b8beb44610537312602b)
* 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: Improve the logic for adding directories to $PATHMartin Schwenke2012-04-272-6/+29
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e6bfd3bdb3a35b2e7e7c41a6f37976772a54e3ce)
* tests: Update integration.sh to use TEST_VAR_DIRMartin Schwenke2012-04-271-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | There are 2 subtleties: * Local daemons currently use the in-tree tests/events.d/ subdirectory for their eventscripts. However, some tests install/remove test-specific eventscripts so now $TEST_VAR_DIR/events.d/ is used and the standard eventscripts are copied there at setup time. * The pgrep/pkill logic for killing local daemons currently relies on ctdbd being run with a full path to tests/bin/ctdbd. If the tests are installed and run against an installed daemon then this won't work. Therefore, ctdbd is now expected to be in $PATH and is found/killed by matching: ctdbd --socket=.* --nlist .* --nopublicipcheck This is complex but should avoid killing a real ctdbd running on a node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 301491802eec0e49e108f5aae7d7be379703d72c)
* tests: Add a -V option to set new variable TEST_VAR_DIRMartin Schwenke2012-04-271-12/+21
| | | | | | | | | | | | | | | | | | | Part of preparation to be able to install the tests. The current var/ subdirectories will end up somewhere in /usr/local/ or /usr/ and we don't want to put temporary files there. This creates a temporary TEST_VAR_DIR by default. If -V is specified then the given directory will be used as TEST_VAR_DIR. This allows the current behaviour where individual integration tests can be run against already-running daemons 9with sockets and other stuff already created) to save time and trouble. Yes, there are plans for a clean-up option... ;-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8e4ec9a40bb7d392d7474b067a74fa121c069007)
* tests/integration: Remove cabability for testcase optionMartin Schwenke2012-04-271-48/+0
| | | | | | | | | | This is unused and can't be used with the current test infrastructure. It may have been useful with ctdb_test_env but I don't think it was ever used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4aa879466dd46cb4e8710edbbaac1276521e475b)
* tests/integration: Use absolute path for socket symlinkMartin Schwenke2012-04-271-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 709cd5dfeb630096a1cd2062da666fee9ddca715)
* tests: Make run_tests -X more flexible - it now works with onnodeMartin Schwenke2012-04-271-2/+2
| | | | | | | | | Hardcoding "sh -x" is suboptimal because some scripts, like onnode, require bash. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 246809af64c03d26288abff5907ed46614e72b15)
* tests: run_tests should exit with failed test status if running with -HMartin Schwenke2012-04-271-1/+5
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6eb7fa572e7fc212332ddd68793e3f35161baf7c)
* tests: test_wrap can use $TEST_SCRIPTS_DIR for a little extra clarityMartin Schwenke2012-04-271-1/+4
| | | | | | | | Also add a comment to explain what is being added to $PATH. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 704a3e3b83aff63e8f7b0650c141776ed2c1f047)
* tests: test_wrap needs to set TEST_SCRIPTS_DIRAmitay Isaacs2012-04-271-0/+2
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 79e979d67e3a2a5a13ef8fd2ef8f56331ec51558)
* tests: CTDB_TEST_WRAPPER has to be an absolute path on a real clusterAmitay Isaacs2012-04-271-1/+2
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a0a7759d47ef5de4a8214273e39c50fb1f6e2e0c)
* tests: Fix trailing whitespace issues in integration.bashMartin Schwenke2012-04-271-9/+9
| | | | | | | | git complains... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d714cf7924674a7a0eb6d585eb74a6a4df26fc12)
* tests: Add new -H option for run_tests to avoid printing header/footerMartin Schwenke2012-04-271-3/+6
| | | | | | | | | This is useful for using run_tests to run one test at a time within an alternative test framework. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit dc71294a33e88baa4e85fa1fa66cab58a83c2607)
* tests: Add -e option to cause run_tests to exit on first test failureMartin Schwenke2012-04-271-1/+10
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f45295a3005474957852d0e7a5c3807e30ab519d)
* tests: Remove ctdb_test_envMartin Schwenke2012-04-273-33/+20
| | | | | | | | Move the contents to integration.bash and run_tests as appropriate. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6136ab02db261b26a2a58b526c913e37e8146841)
* tests: Programs run by tests should be found in $PATHMartin Schwenke2012-04-272-3/+6
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b5308142d03332d6d4e0c3b77283c772462fbb23)
* tests: Move relative directory path hack from run_tests to common.shMartin Schwenke2012-04-272-5/+5
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 66a7fece867966528689d2784a284e32d687a0f5)
* tests: Local daemons are no longer the default, now require run_tests -lMartin Schwenke2012-04-274-36/+29
| | | | | | | | | | | | | | | | | | 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-273-137/+15
| | | | | | | | | | | | | * 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-272-2/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)
* Merge remote branch 'martins/master'Ronnie Sahlberg2012-04-185-74/+265
|\ | | | | | | (This used to be ctdb commit abe7ebe6c531f912efe4ebc1daade4d2af67574c)
| * tests: More unit test factoring/rationalisation and bug fixesMartin Schwenke2012-04-182-2/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move some options from eventscripts/run_tests.sh to scripts/run_tests. Remove the former. Move some functions from eventscripts/scripts/local.sh to scripts/unit.sh. Both of these are modified during move so they are no longer eventscript-specific. Tweak */local.sh so that the new functions in unit.sh are used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7ff485687891732074c9fc9998502ca197663d02)
| * tests - run_tests needs to expand directories like "." and "..".Martin Schwenke2012-04-161-0/+4
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fd08fc6c88cb80190ce87325867de0391cf1af51)
| * tests - run_tests ignores trailing '/' on directoriesMartin Schwenke2012-04-161-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit dbec696930327ff07b39282e3084eef4ded064c0)
| * tests - run_tests includes common.sh, uses die()Martin Schwenke2012-04-161-3/+3
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 21df43c74bfcff420fdaf9df5440c25529c543d2)
| * tests - run_tests can take a directory as an argumentMartin Schwenke2012-04-161-5/+23
| | | | | | | | | | | | | | | | This makes it run all tests in the specified directory. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 89719384a74161ffa0c03602ecdd9e758d521d75)
| * tests - add -v option to set TEST_VERBOSE=trueMartin Schwenke2012-04-161-1/+4
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 43badc5418b9f533398cd579607d9f1fc0f8f417)
| * tests - move functions only used by scripts/run_tests into that scriptMartin Schwenke2012-04-162-62/+62
| | | | | | | | | | | | | | | | Along with minor logic tweaks and removal of test_exit(). Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 00713eb46cce638339845799bba2da041b3d02fb)
| * tests - add scripts/unit.shMartin Schwenke2012-04-161-0/+16
| | | | | | | | | | | | | | | | This will be sourced by all unit tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit afdaa5f032938d56ff315d9553cb285ebc413c4c)
| * tests - add scripts/common.shMartin Schwenke2012-04-161-0/+9
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a7ad94fe9f2e773567dbb6500469dd2dd2f2f04b)