summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/eventscripts
Commit message (Collapse)AuthorAgeFilesLines
...
* tests/eventscripts: Add a policy routing unit test for "ip rule del" failureMartin Schwenke2012-09-111-0/+38
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0ce5b079f327aba55b62800ccb22d79976fac665)
* tests/eventscripts: Extra cases for policy routing missing config testMartin Schwenke2012-07-301-2/+5
| | | | | | | | Test the startup and monitor events too. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c29a943f9bbcfecb861e71d007c7698a53dc8773)
* tests/eventscripts: Rewrite the testparm stubMartin Schwenke2012-07-261-8/+23
| | | | | | | | | | It currently needs the real testparm command installed even though it only uses limited features. It is easy enough to fake up the functionality that 50.samba uses. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7ef9916bd95ff2472359a412eac5489f1aad2dce)
* tests/eventscripts: Tweak expected output for lockd:b restartMartin Schwenke2012-05-251-1/+1
| | | | | | | Commit 13acd58c41fba1a33894fbd654fed69ea0eac322 mades this test fail, since lockd:b and lockd:bs were incorrectly producing the same output. (This used to be ctdb commit fd3b73d7e634f16cbb99d7d5a548e12f00d1aadb)
* tests/eventscripts: Fix a policy routing testMartin Schwenke2012-05-111-1/+1
| | | | | | | | | The previous commit 55006ea8999ab3721fcde81b92692661065f0688 highlighted an error in this test. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9f20fbf91706db94f65f62dbd6a4e087890c1da9)
* tests/eventscripts: $CTDB_BASE needs to be in $TEST_VAR_DIRMartin Schwenke2012-05-111-1/+2
| | | | | | | | | | | | | The policy routing tests write the configuration file into $CTDB_BASE, as per rcommended practice. Unless this is in $TEST_VAR_DIR this won't work sensible when the tests are installed. Things are done slightly different than for /etc. Here we use symlinks and we want them to be dereferenced. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 61c80f58a8cfbaca7e669ef8cd95b4f6b5dc66c7)
* tests/eventscripts: $CTDB_ETCDIR should be in $TEST_VAR_DIRMartin Schwenke2012-04-271-12/+12
| | | | | | | | | | | | | The policy routing tests modify /etc/iproute2/rt_tables, so this directory should not be in the installation area. Instead the contents of tests/eventscripts/etc are copied into a place under $TEST_VAR_DIR where the directory can be modified with gay abandon. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a0afb4195caab39891a304b8b4eadd94cab7c4a7)
* tests/eventscripts: Use a canned ctdb.sysconfig rather than a linkMartin Schwenke2012-04-271-1/+2
| | | | | | | | | | | The link is hard to manage and has no real advantage. The canned config is 2 of the 3 currently non-comment/whitespace lines in config/ctdb.sysconfig. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 66d0b913301c3b1037278bcaa0452ecbe07248df)
* tests/eventscripts: Explicitly set CTDB_SERVICE_AUTOSTARTSTOP="yes"Martin Schwenke2012-04-272-0/+2
| | | | | | | | | No use depending on defaults in the initscript - the tests should control what is tested. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1c37abac5fd18c139aa55989d0fb6b475f4c22f1)
* tests/eventscripts: Be more defensive about removing the var directoryMartin Schwenke2012-04-271-1/+2
| | | | | | | | | Could add -r but that might avoid error. The only time it doesn't exist is the 1st time a top-level var directory is used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 047d97dc84a5943556efb31bb2856fd04835fffa)
* tests/eventscripts: Add sanity check to esnure events.d/ can be foundMartin Schwenke2012-04-271-0/+25
| | | | | | | | | If it can't, the installation is probably inconsistent, so a (hopefully) helpful message is printed. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit df732ca8e27f0f3417b4d5d259157bd0e0632124)
* tests/eventscripts: $FAKE_IP_STATE is always set in ip command stubMartin Schwenke2012-04-271-2/+0
| | | | | | | | No need for a default, especially since there is no sane default! Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b430a5f61cfdc28e967890602ce6dac0e922c07d)
* tests: Unit tests should use $TEST_VAR_DIRMartin Schwenke2012-04-271-7/+2
| | | | | | | | | This directory is already guaranteed to be absolute, so no check is needed. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 78f6f209eb15102f4e8baa9106583df0ef4bb693)
* tests: Make run_tests -X more flexible - it now works with onnodeMartin Schwenke2012-04-271-1/+5
| | | | | | | | | 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: Update README files and add new README files where missingMartin Schwenke2012-04-271-16/+20
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)
* tests: Programs run by tests should be found in $PATHMartin Schwenke2012-04-271-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b5308142d03332d6d4e0c3b77283c772462fbb23)
* tests: More unit test factoring/rationalisation and bug fixesMartin Schwenke2012-04-183-181/+9
| | | | | | | | | | | | | | | | | 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/eventscripts: Share directories must be absolute in eventscript testsMartin Schwenke2012-04-181-0/+5
| | | | | | | | | | This fixes eventscripts/scripts/local.sh:setup_generic() so that directories listed in $FAKE_SHARES are absolute instead of potentially relative (and, therefore, ignored by the NFS share check). Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8544162b7a4efa23c92bc0d2774df95bb7f0f463)
* tests/eventscripts: Tweak an error message in a policy routing testMartin Schwenke2012-04-171-1/+1
| | | | | | | | | It currently has my home directory pasted into it. That can't be right... ;-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5d6e71cf6e1e0665ec96e7e4e2cfd31f40ebabae)
* tests/eventscripts - Restructure according to new conventionMartin Schwenke2012-04-1677-110/+86
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eb13507713ba6732271b7c3024bfddbda6da5ffc)
* Tests - eventscripts - initial policy routing testsMartin Schwenke2012-03-2212-0/+422
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7d7488a49bc7e799f39f3da3fa81be7a2e14480a)
* Tests - eventscripts - new function simple_test_command()Martin Schwenke2012-03-221-15/+34
| | | | | | | | | Allows running arbitrary command and comparing output against expected. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit da2e9650a97f99e7d694659926d9958927edd8ad)
* Tests - eventscripts - change summary columnsMartin Schwenke2012-03-221-1/+1
| | | | | | | | To accommodate 13.per_ip-routing in output. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0142729c96b8bfecfabe35439071557bcc6ed4da)
* Tests - eventscripts - rationalise CTDB fakery supportMartin Schwenke2012-03-221-22/+4
| | | | | | | | | | | Remove functions for marking nodes as down/up. This is now done via ctdb disable/enable in the stub. Also more consistent temporary directory use. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1db9a533aacc6e02ddbadf76241429144a949e1c)
* Tests - eventscripts - improved support functions for handling public IPsMartin Schwenke2012-03-221-9/+27
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 299ce89fb3deeefcc7c01b20197dc6adee1e8194)
* Tests - eventscripts - add support functions for policy routing testingMartin Schwenke2012-03-221-0/+55
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79eec235ac9b051333751186c32924d92e6ebeff)
* Tests - eventscripts - fix hardcoding errorMartin Schwenke2012-03-221-1/+5
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9c30bf7fd3d94884e27a258571a28dca5e460177)
* Tests - eventscripts - stub ctdb command updatesMartin Schwenke2012-03-221-50/+158
| | | | | | | | | | * Proper IP (re)allocation using ctdbd's IP allocation algorithm. * Therefore, "ctdb ip" works sensibly. * Add enable, disable, moveip. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6d4b4b1293ba960d8fdf81958d6e8dd23c9d771a)
* Tests - eventscripts - more public IPs in default setupMartin Schwenke2012-03-221-0/+5
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 38396185effbcf313678c2e94d4bd20f534c4f03)
* Tests - eventscripts - add -A/-D optionsMartin Schwenke2012-03-222-2/+31
| | | | | | | | | Make it easier to spot differences between desired output and actual output. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d132a8f4a8c0573ac447713a71911f02b6f0d73c)
* Tests - eventscripts - ip stub command should print errors to stderrMartin Schwenke2012-03-221-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 236d572556e447e2d82d14d2c8a40ed8cb98944d)
* Eventscript tests - implement ip route in stubMartin Schwenke2012-03-221-3/+107
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)
* Eventscript tests - implement ip rule in stubMartin Schwenke2012-03-221-0/+122
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)
* Eventscript tests - make ip command stub vaguely maintainableMartin Schwenke2012-03-221-174/+198
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)
* Eventscript tests - make error message consistent with recent changeMartin Schwenke2012-03-221-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)
* Tests: eventscripts - fix breakage in some NFS testsMartin Schwenke2012-02-061-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 1341329f6125d491b82c873f793af819e677f714 either contains typos or attempts to influence the test depending on the host system. Whatever the cause, a test system (e.g. my laptop) might not have /etc/sysconfig/nfs, so that can't be used to cause the stub etc/sysconfig/nfs to be loaded. We make the tests work by default again, leaving in some flexibility over configuration file location. If the goal is to force a Debian-style test mode then: * The tests are currently probably quite RHEL-centric anyway, so more work is probably needed. * Use an environment variable to indicate the distro test mode and make functions like setup_nfs() remove all of the various configuration files and create one in the distro-specific location. I won't do this now... ENOTIME... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4aa4a5790ea9ad20e4d25404760c449b358b5260)
* Tests: eventscripts - make init test pass with recent change to 10.interfaceMartin Schwenke2012-02-061-1/+1
| | | | | | | | | e646142f4d28b5401235cd5edee325f7a29f8193 changes the output on the init event. This accommodates that change. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 48cb55aae47d11487bdf004a79df56779d1825a0)
* Tests: eventscripts - add tests for CTDB_DELETE_UNEXPECTED_IPS="yes"Martin Schwenke2011-12-192-0/+38
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 00373958a5d5fb8c9b99548d5b9f327e78669162)
* 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)
* Tests - eventscripts - add some multievent testsMartin Schwenke2011-08-317-0/+162
| | | | | | | | | Running "./run_tests -s simple/* multievent/*" results in a stupid summary. Will need to work on that... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 999c68948da1492ac4d728c6bf79ad4921d9e840)
* Tests - eventscripts - allow "ctdb scriptstatus" output to be primedMartin Schwenke2011-08-312-15/+32
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f527ffb55b514b5cb4df3471a0e17ab71307e8a1)
* Tests - eventscripts - ctdb stub - implement scriptstatus, tweaksMartin Schwenke2011-08-301-9/+28
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit edc34d01a1ad83b1335c976593a006166b196569)
* Tests - eventscripts - formatting tweak in simple_test()Martin Schwenke2011-08-301-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 698af79545986cf788686feb06c4677a10eec770)
* Tests - eventscripts - new function simple_test_event()Martin Schwenke2011-08-301-0/+11
| | | | | | | | Just like simple_test() but 1st arg is the event name. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 69e240e15488e228c0232fdc8804af778cb4e6fc)
* Tests - eventscripts - output format tweaksMartin Schwenke2011-08-301-12/+10
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8f8dc5636436db28ce7d0edd706a4adf2624e71b)
* Tests - eventscripts - add extra filename format for multi-event testsMartin Schwenke2011-08-301-7/+22
| | | | | | | | $event may not be set so we need to test for it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 80f14e590242b14829c6309ee908af0f2d33be1e)
* Tests - eventscripts - add die() function and use itMartin Schwenke2011-08-301-11/+8
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0446eaa7798fd0ddf8d8f067c56d19892a13a317)
* Tests - eventscripts - remove undefined argument in some simple_test callsMartin Schwenke2011-08-302-2/+2
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c490024aba39cf94cbc9f8f41ecb3d336b1c82a8)
* Tests - evenscripts - add symlink to ctdb.sysconfigMartin Schwenke2011-08-301-0/+1
| | | | | | | | | | Some of the tests expect the default to be CTDB_SERVICE_AUTOSTARTSTOP=yes Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f7de037e3be2e9910bee644dd1e93bae4912a194)
* Tests - eventscripts - Samba TCP port checking fixesMartin Schwenke2011-08-302-2/+2
| | | | | | | | Expect "ctdb checktcpport" to exit with 1 if not implemented. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 20885d592040eb3945524c558b593a1d50a57b43)