summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/eventscripts/stubs/ip
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-tests: Add some tests for 11.natgw eventscriptMartin Schwenke2014-03-261-11/+73
| | | | | | | | | | | | | | This includes adding support for: * Configuring fake NATGW state in the eventscript unit tests * "natgwlist" and "setnatgwstate" in ctdb command stub * ip command stub to default to "main table" when no table specified, allow routes to be added without "dev" option (just add a default dev), support "metric" option Signed-off-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests-eventscripts: Testing support for promote_secondariesMartin Schwenke2014-02-131-2/+9
| | | | | | | | | Just enable this behaviour by default in the ip command stub, since 10.interface assumes/sets it. The rc.local replacement for set_proc() doesn't do anything... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb/tests/eventscripts: Improve ip command stub secondary handlingMartin Schwenke2014-01-311-22/+59
| | | | | | | | It should support primary and secondaries per network instead of per interface. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: in the stub "ip link show" command use echo instead of catMichael Adam2013-11-281-4/+2
| | | | | | | | | | | | This case of "ip link show" does not break autobuild with "Broken pipe" messages, but let's be consistent. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Nov 28 09:23:03 CET 2013 on sn-devel-104
* ctdb:tests: in the stub ip command, avoid broken pipe by using echo instead ↵Michael Adam2013-11-281-9/+3
| | | | | | | | | | | | of cat This fixes running "make autotest" from autobuild, since it prevents irritating error output in delete_ip_from_iface() when calling ip addr list ... | grep -Fq "inet ..." . Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* tests/eventscripts: Add tests for monitoring of missing interfacesMartin Schwenke2013-07-191-54/+72
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 53e4eca74429f76adc81d98e3d11d1bd61194d71)
* tests/eventscripts: New tests for 00.ctdb "init" eventMartin Schwenke2013-06-201-6/+19
| | | | | | | | | | | | | | | These test dropping of IPs and TDB checking. New stubs for date, tdbdump, tdbtool. Enhance ip stub to handle "ip addr show to ..." Tweak some infrastructure. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit aabf0bf41cb8ec344f06b69492fb6c2a27f9e900)
* tests/eventscripts: Modify ip stub to simulate invalid table IDMartin Schwenke2012-09-111-15/+36
| | | | | | | | | | This involves refactoring ip_route_check_table() into a new function ip_check_table() which tables the operation type (i.e. rule/route) as an argument. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit acdaa04079a9827885f32a7bc078d3365c89b474)
* 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 - 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)
* Tests - stub ip program should assume interface name if "dev" not specified.Martin Schwenke2011-08-081-1/+2
| | | | | | | | | | Currently it fails if you don't use the "dev" keyword. This makes it behave as expected. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4fa2073649f25993de4b8ef6b3e7172068a83a29)
* Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.Martin Schwenke2011-08-081-0/+204
This sets up a more useful convention and avoids future .gitignore problems. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 58c696dc600f1073e693930da061776b6fb199f2)