1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

204 Commits

Author SHA1 Message Date
Martin Schwenke
c394b7d065 Tests - eventscripts - ip stub command should print errors to stderr
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 236d572556e447e2d82d14d2c8a40ed8cb98944d)
2012-03-22 15:30:27 +11:00
Martin Schwenke
6e260553f5 Eventscript tests - implement ip route in stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)
2012-03-22 15:30:27 +11:00
Martin Schwenke
d0f25b3c37 Eventscript tests - implement ip rule in stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)
2012-03-22 15:30:27 +11:00
Martin Schwenke
60b5ff0e4b Eventscript tests - make ip command stub vaguely maintainable
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)
2012-03-22 15:30:27 +11:00
Martin Schwenke
3b024ab2bd Eventscript tests - make error message consistent with recent change
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)
2012-03-22 15:30:27 +11:00
Martin Schwenke
c497e4bc19 Tests: eventscripts - fix breakage in some NFS tests
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)
2012-02-06 16:02:09 +11:00
Martin Schwenke
4e01fedea5 Tests: eventscripts - make init test pass with recent change to 10.interface
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)
2012-02-06 16:02:09 +11:00
Martin Schwenke
36462d46f4 Tests: eventscripts - add tests for CTDB_DELETE_UNEXPECTED_IPS="yes"
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 00373958a5d5fb8c9b99548d5b9f327e78669162)
2011-12-19 11:29:46 +11:00
Mathieu Parent
4617a0e9cf config can be in /etc/default/ instead of /etc/sysconfig/
... on Debian system and derivated.

(ctdb_diagnostics still hardcodes /etc/sysconfig/)

(This used to be ctdb commit 1341329f6125d491b82c873f793af819e677f714)
2011-11-08 16:31:15 +11:00
Martin Schwenke
882fb55bec Tests - eventscripts - add some multievent tests
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)
2011-08-31 17:29:14 +10:00
Martin Schwenke
0048849bd2 Tests - eventscripts - allow "ctdb scriptstatus" output to be primed
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f527ffb55b514b5cb4df3471a0e17ab71307e8a1)
2011-08-31 17:27:05 +10:00
Martin Schwenke
91d5edee80 Tests - eventscripts - ctdb stub - implement scriptstatus, tweaks
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit edc34d01a1ad83b1335c976593a006166b196569)
2011-08-30 16:51:55 +10:00
Martin Schwenke
84c67c378e Tests - eventscripts - formatting tweak in simple_test()
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 698af79545986cf788686feb06c4677a10eec770)
2011-08-30 16:51:55 +10:00
Martin Schwenke
c8e87d9f00 Tests - eventscripts - new function simple_test_event()
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)
2011-08-30 16:51:55 +10:00
Martin Schwenke
af1a0245b6 Tests - eventscripts - output format tweaks
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8f8dc5636436db28ce7d0edd706a4adf2624e71b)
2011-08-30 16:51:55 +10:00
Martin Schwenke
3167f50b6c Tests - eventscripts - add extra filename format for multi-event tests
$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)
2011-08-30 16:51:55 +10:00
Martin Schwenke
1a8d5e0ec7 Tests - eventscripts - add die() function and use it
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0446eaa7798fd0ddf8d8f067c56d19892a13a317)
2011-08-30 16:51:55 +10:00
Martin Schwenke
e4ba51effd Tests - eventscripts - remove undefined argument in some simple_test calls
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c490024aba39cf94cbc9f8f41ecb3d336b1c82a8)
2011-08-30 16:51:55 +10:00
Martin Schwenke
dcd37aadef Tests - evenscripts - add symlink to ctdb.sysconfig
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)
2011-08-30 16:51:55 +10:00
Martin Schwenke
857e144a97 Tests - eventscripts - Samba TCP port checking fixes
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)
2011-08-30 16:51:55 +10:00
Martin Schwenke
5de459f94e Tests - eventscripts - TCP port checking, no working checkers
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit b231aa629b909a7dfd071236c7e730e3cc4a1a54)
2011-08-30 16:51:55 +10:00
Martin Schwenke
9b8e25d03b Tests - eventscripts - new Samba TCP port checking test - no nmap
This one should fall back to netstat.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0a08068f736efe56b4799e1f1f90539d257deb71)
2011-08-30 16:51:55 +10:00
Martin Schwenke
fe730830a7 Tests - eventscripts - nmap and netstat stubs can pretend they weren't found
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 47f2843b4db767bcc724d8f972e0c2a850d5826f)
2011-08-30 16:51:55 +10:00
Martin Schwenke
7fc7ebb5ac Tests - eventscripts - new Samba tests to test TCP port checking
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9e3e6ab3edf0f79d5973eb39ed843d3c369c665d)
2011-08-30 16:51:55 +10:00
Martin Schwenke
764b425a96 Tests - eventscripts - add a new ctdb_not_implemented() function
This allowed a single ctdb command to be defined as not-implemented
and provided the associated output from the ctdb stub in
$ctdb_not_implemented.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3852c091f5e0ecba06b7131ca04b73a0cd632f23)
2011-08-30 16:51:55 +10:00
Martin Schwenke
bda5f71c13 Tests - eventscripts - new function setup_nmap_output_filter()
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ef6131ecb068f7d8402cc782359509ba54b5adb0)
2011-08-30 16:51:55 +10:00
Martin Schwenke
5574b3b6fe Tests - eventscripts - add some output filtering
This allows $OUT_FILTER to be set to one or more sed commands to
filter eventscript output.  This allows expected output to be
generalised.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a1d424045c53f5b148952eade6161af8248ed4df)
2011-08-30 16:51:55 +10:00
Martin Schwenke
58687f52be Tests - eventscripts - ctdb default default level is 0.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fcf40500c2158dfbe2390fad7bf0614cc575df14)
2011-08-30 16:51:55 +10:00
Martin Schwenke
c9305f5dda Tests - eventscripts - add output for "not implemented" in ctdb stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 1d02e3c6a7fb5ad5edb21298deba415ba9519f3d)
2011-08-30 16:51:55 +10:00
Martin Schwenke
e88df4289f Tests - eventscripts - add an nmap stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6ff9545a0fd58f0728b769c7b36d3b6ab7366321)
2011-08-30 16:51:55 +10:00
Martin Schwenke
7b2e79ab7f Tests - eventscripts - stop timeouts waiting for backgrounded testparm
Not sleeping at all speeds up the tests.  However, it can also cause
timeouts.  Therefore, every time sleep is run we force the stub to do
a short 0.1s sleep instead of whatever is specified.  This should be
enough to avoid races.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 59a1d54bcc15058f7b69e8596b32b26427a3ae57)
2011-08-30 16:51:55 +10:00
Martin Schwenke
6eb339e2c7 Tests - add getdebug and checktcpport to ctdb eventscripts stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9c6fd7d21c99e605e20620c5c6b4e695c02af771)
2011-08-30 16:51:55 +10:00
Martin Schwenke
21c17cc100 Tests - add hooks to simulate ctdb commands that aren't implemented
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit e9bdfd43af3ed28a7f69a36e3fb037f252a23869)
2011-08-30 16:51:55 +10:00
Martin Schwenke
d2527e3e5b Tests - add eventscripts testing stub for sleep command.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit aedff41ee1df0a1a573476844993fa8eda2f34bf)
2011-08-30 16:51:55 +10:00
Martin Schwenke
7d7851dd45 Tests - Change variable used to fake listening TCP ports.
Change from $FAKE_NETSTAT_TCP_LISTEN to $FAKE_TCP_LISTEN.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f19ba38e382034fba769145d0bfc81b2c2941563)
2011-08-30 16:51:55 +10:00
Martin Schwenke
62f2d160ac Tests - new NFS share checking tests
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ea0db472c2ce138c723aa7e633b72ac9d8b8a6a3)
2011-08-30 16:51:55 +10:00
Martin Schwenke
f3c590c199 Tests - eventscripts exportfs stub should splits lines
The real exportfs splits lines longer than 15 characters.  The stub
should do that too...

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fb3e123b097d9e36d281c3ab4f3e9a4799fa27bc)
2011-08-30 16:51:55 +10:00
Martin Schwenke
625e0c5aea Tests - add -T (trace) option to eventscripts run_test.sh
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 08eeb788523afe19760b00f40339b702eb193712)
2011-08-30 16:51:54 +10:00
Ronnie Sahlberg
81292ac0e6 Change the errors for 10.interface to clearly state ERROR: for error messages
Update the tests system to catch the new error strings generated by this change

(This used to be ctdb commit a2c30d88348da47d1a733a16e4c7d83c3becb6df)
2011-08-15 15:53:04 +10:00
Ronnie Sahlberg
569ea5c4e1 Merge remote branch 'martins/eventscript_tests'
(This used to be ctdb commit 4e670d9bc1bdeb2abd7e846bc36e02f0aa0d7309)
2011-08-15 15:43:15 +10:00
Martin Schwenke
65ff8b4b7b Tests - exportfs stub needs to print out export options.
This is needed due to bd39b91ad12fd05271a7fced0e6f9d8c4eba92e6.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 92f8e31f6995836b1668639a4dac2862efee269a)
2011-08-15 15:42:20 +10:00
Ronnie Sahlberg
2c5f1d7ccc Merge remote branch 'martins/eventscript.60.nfs.rpc'
(This used to be ctdb commit 2e30a2bb4371a846c7a768affa15883211642d5c)
2011-08-15 15:20:18 +10:00
Martin Schwenke
3b43805a31 Tests: re-enable the NFS eventscript tests - they work again.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3e145ab1bb61ed2087ec5ce6183ee24802686ed3)
2011-08-12 16:30:54 +10:00
Martin Schwenke
881054a0ad Tests: Re-enable the Samba eventscript tests.
They work again.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 2036764bfd1a4571fcfcca22099c2b9a95a02c57)
2011-08-11 15:33:46 +10:00
Martin Schwenke
9f98ec85d9 Revert "Tests: tweak some samba tests to cope with debug from ctdb_check_tcp_ports()."
This reverts commit 557ac30e60516742da10b83bfbbbb41430c977a2.

(This used to be ctdb commit 9600cc7a6b7b854fac1a5b080129e3df8fcbd84e)
2011-08-11 15:32:28 +10:00
Martin Schwenke
d8e342d71a Tests - Disable the Samba and NFS eventscript tests.
They're broken and not worth fixing without infrastructure changes so
disable them by taking away the execute bit.  This is somewhat easier
than trying to merge in all the other tests but not these ones.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 151151353e58f59b15be9313e22b7d4f71ee0de8)
2011-08-08 16:11:14 +10:00
Martin Schwenke
958414ceeb Tests - Tweak 10.interfaces 802.ad bonding test to work with current code.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d3271d316f6d1561e66cbc4cc1b1e8af63895459)
2011-08-08 15:53:28 +10:00
Martin Schwenke
b30143eb78 Tests - implement "ctdb -Y ip -v" in stub for eventscript testing.
This is pretty limited but it gets 10.interfaces tests working.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7130963430e530fa4dd5e6fe132bd7122349cc5f)
2011-08-08 15:42:45 +10:00
Martin Schwenke
7e5c48c84c Tests - stub ip program should assume interface name if "dev" not specified.
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)
2011-08-08 14:45:30 +10:00
Martin Schwenke
2c9c77f6dc Tests: update tests to work with previous commit.
Issues:

* 10.monitor no longer prints a message when there is no
  public_addresses file.

* Extra bonding test added to check workaround for IEEE 802.3ad
  Dynamic link aggregation bonding mode bug.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 01c941ab4c764c5aac0d7c0f90fca89775956d41)
2011-08-08 13:47:13 +10:00