6 Verify the output of the 'ctdb version' command.
8 This test assumes an RPM-based installation and needs to be skipped on
13 * An active CTDB cluster with at least 2 active nodes.
17 1. Verify that the status on all of the ctdb nodes is 'OK'.
18 2. Run the 'ctdb version' command on one of the cluster nodes.
19 3. Compare the version displayed with that listed by the rpm command
24 * The 'ctdb version' command displays the ctdb version number.
28 .
"${TEST_SCRIPTS_DIR}/integration.bash"
36 if ! try_command_on_node
-v 0 "rpm -qf $0" ; then
37 echo "No useful output from rpm, SKIPPING rest of test".
40 rpm_ver
="${out#ctdb-tests-}"
41 # Some version of RPM append the architecture to the version.
42 # And also remove the release suffix.
44 rpm_ver
="${rpm_ver%-*.${arch}}"
46 try_command_on_node
-v 0 "$CTDB version"
47 ctdb_ver
="${out#CTDB version: }"
49 if [ "$ctdb_ver" = "$rpm_ver" ] ; then
50 echo "OK: CTDB version = RPM version"
52 echo "BAD: CTDB version != RPM version"