summaryrefslogtreecommitdiff
path: root/ctdb/tests
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-scripts: Allow load_script_options() to specify an event scriptMartin Schwenke2018-05-121-3/+16
| | | | | | | | | | | | | | | This allows other scripts to use the given options for a particular event script. One interesting example is that the ctdb_natgw tool should look for configuration in events.d/11.natgw.options. In the future this will be something like events/failover/11.natgw.options, so require the component to be specified even though it isn't yet used. Test support is also updated. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Separate support script for 06.nfsMartin Schwenke2018-05-121-1/+6
| | | | | | | | Including 60.nfs was too simple a hack, since we will want to do some magic to use the configuration from 60.nfs for 06.nfs. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Continue running if a testcase is not executableMartin Schwenke2018-05-121-2/+11
| | | | | | | | | At the moment the whole test run aborts without printing a summary of results but inexplicably succeeds. Instead, generate a clear failure for a non-executable testcase. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Change default volatile database directoryMartin Schwenke2018-05-012-3/+2
| | | | | | | | | | | | Volatile databases now have their own subdirectory. This makes things easier if we later recommend mounting a tmpfs on the volatile database directory, rather than supporting the current CTDB_DBDIR=tmpfs magic. No need to create database directories for local daemon tests. ctdbd will do that. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: CTDB_DBDIR_PERSISTENT should not depend on CTDB_DBDIRMartin Schwenke2018-05-013-8/+11
| | | | | | | Add new variable CTDB_DBDIR_BASE, just for event script unit tests. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Fix location of persistent databasesMartin Schwenke2018-05-012-2/+2
| | | | | | | | | Always use CTDB_DBDIR_PERSISTENT, which is setup by the test infrastructure. The persistent database directory is not (necessarily) relative to the volatile one. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-docs: Move remaining test options to READMEMartin Schwenke2018-05-011-0/+26
| | | | | | | | Test options do not belong in the user documentation. Move them to the README file in the tests/ subdirectory. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Make local daemon tests depend on CTDB_TEST_MODEMartin Schwenke2018-05-011-2/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Add testing environment variable CTDB_TEST_MODEMartin Schwenke2018-05-012-0/+19
| | | | | | | | | | | This is a generic indicator that tests are being run. For local daemons, this will replace --sloppy-start and --nopublicipcheck - it also does --nosetsched, which isn't being removed at this point. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Ensure notify.sh is available to local daemonsMartin Schwenke2018-05-011-1/+1
| | | | | | | | Changes to notification configuration are coming, so ensure notify.sh is always "installed" for local daemons. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Fix a typoMartin Schwenke2018-04-301-1/+1
| | | | | | | | 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): Mon Apr 30 14:26:43 CEST 2018 on sn-devel-144
* ctdb-tests: Simplify a testMartin Schwenke2018-04-301-8/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Delete unused fake /etc/sysconfig/ctdb fileMartin Schwenke2018-03-281-1/+0
| | | | | | | | | | | The only remaining item is a setting of CTDB_DEBUGLEVEL, which is not required. 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): Wed Mar 28 07:27:58 CEST 2018 on sn-devel-144
* ctdb-scripts: Tunables are now loaded from ctdb.tunablesMartin Schwenke2018-03-284-16/+3
| | | | | | | | | | | | Using CTDB_SET_TunableVariables in the main configuration file is no longer supported. The only subtlety is an unexpected order change in one of the unit test results. This is because the old implementation implicitly sorted the tunable variables via the set command. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Rename setup_config() to setup_tunable_config()Martin Schwenke2018-03-284-11/+16
| | | | | | | | | Drop the "CTDB_SET_" prefix from variable names and add it back for now. When there is a better way of setting tunables then this function will support that. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Script options into per-script fileMartin Schwenke2018-03-281-6/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 91.lvs testsMartin Schwenke2018-03-281-3/+5
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 60.nfs (and 06.nfs) testsMartin Schwenke2018-03-2817-8/+43
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 50.samba testsMartin Schwenke2018-03-282-3/+11
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 49.winbind testsMartin Schwenke2018-03-283-2/+10
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 41.httpd testsMartin Schwenke2018-03-284-1/+9
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 40.vsftpd testsMartin Schwenke2018-03-284-1/+9
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 31.clamd testsMartin Schwenke2018-03-284-2/+11
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 20.multipathd testsMartin Schwenke2018-03-281-1/+4
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 13.per_ip_routing testsMartin Schwenke2018-03-285-4/+14
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 11.natgw testsMartin Schwenke2018-03-2813-15/+38
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 10.interface testsMartin Schwenke2018-03-286-2/+10
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Use setup_script_options() in 05.system testsMartin Schwenke2018-03-2814-4/+26
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: New function setup_script_options()Martin Schwenke2018-03-281-0/+12
| | | | | | | | Currently exports the variable assignment on each line. Later this can be changed to handle actual per-script configuration. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Remove unused functions and stubsMartin Schwenke2018-03-283-236/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: statd-callout script setup modularisationMartin Schwenke2018-03-288-22/+15
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 91.lvs event script setup modularisationMartin Schwenke2018-03-2813-34/+22
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 60.nfs (and 06.nfs) event script setup modularisationMartin Schwenke2018-03-2842-83/+124
| | | | | | | Includes gratuitous changes to get lines below 80 columns. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 50.samba event script setup modularisationMartin Schwenke2018-03-2817-30/+49
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 49.winbind event script setup modularisationMartin Schwenke2018-03-288-12/+13
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 41.httpd event script setup modularisationMartin Schwenke2018-03-287-10/+13
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 40.vsftpd event script setup modularisationMartin Schwenke2018-03-287-10/+13
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 31.clamd event script setup modularisationMartin Schwenke2018-03-285-10/+22
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 20.multipathd event script setup modularisationMartin Schwenke2018-03-285-5/+5
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 13.per_ip_routing event script setup modularisationMartin Schwenke2018-03-2824-48/+30
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 11.natgw event script setup modularisationMartin Schwenke2018-03-2822-42/+60
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 10.interface event script setup modularisationMartin Schwenke2018-03-2835-48/+61
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 05.system event script setup modularisationMartin Schwenke2018-03-2816-54/+60
| | | | | | | | Do initial test setup using setup() function. Rename usage setting functions to make them more obvious. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 01.reclock event script setup modularisationMartin Schwenke2018-03-286-6/+9
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 00.ctdb testing setup modularisationMartin Schwenke2018-03-2815-51/+44
| | | | | | | Switch to generic setup() function and set variables there. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Define generic setup() functionMartin Schwenke2018-03-281-0/+8
| | | | | | | | Create default setup() function that aborts. This function will be redefined by each support script and used to do the setup. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: statd-callout.sh simple 80 column fixupsMartin Schwenke2018-03-281-1/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 60.nfs.sh simple 80 column fixups and reorderingMartin Schwenke2018-03-281-15/+16
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 20.multipathd.sh 80 column fixupsMartin Schwenke2018-03-281-3/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: 11.natgw.sh simple 80 column fixupsMartin Schwenke2018-03-281-2/+6
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>