summaryrefslogtreecommitdiff
path: root/ctdb/tests
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-01-05 15:58:29 +1100
committerAmitay Isaacs <amitay@samba.org>2016-01-25 07:18:25 +0100
commitdf6cca2bc03df2208a76126fa98b1c4d2306b67f (patch)
tree2e1534c415851e5edbdafa1311d5e96b2ed0f4e9 /ctdb/tests
parent3b64c27ca6def4f0ec7f6c5b543977f9a48647f9 (diff)
downloadsamba-df6cca2bc03df2208a76126fa98b1c4d2306b67f.tar.gz
ctdb-tools: Drop support for setting and viewing NAT gateway capability
This is no longer used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests')
-rwxr-xr-xctdb/tests/eventscripts/stubs/ctdb8
-rw-r--r--ctdb/tests/src/ctdb_test_stubs.c6
-rwxr-xr-xctdb/tests/tool/stubby.getcapabilities.001.sh1
-rwxr-xr-xctdb/tests/tool/stubby.getcapabilities.002.sh1
-rwxr-xr-xctdb/tests/tool/stubby.getcapabilities.004.sh5
5 files changed, 3 insertions, 18 deletions
diff --git a/ctdb/tests/eventscripts/stubs/ctdb b/ctdb/tests/eventscripts/stubs/ctdb
index 4ed99102e56..825cd042ac3 100755
--- a/ctdb/tests/eventscripts/stubs/ctdb
+++ b/ctdb/tests/eventscripts/stubs/ctdb
@@ -243,13 +243,6 @@ ctdb_shutdown ()
######################################################################
-FAKE_CTDB_NATGW_STATE="${FAKE_CTDB_STATE}/natgw_state"
-
-ctdb_setnatgwstate ()
-{
- echo "$2" >"$FAKE_CTDB_NATGW_STATE"
-}
-
# This is only used by the NAT gateway code at the moment, so use a
# hack. Assume that $CTDB_NATGW_NODES contains all nodes in the
# cluster (which is what current tests assume). Use the PNN to find
@@ -468,7 +461,6 @@ case "$1" in
disable) ctdb_disable "$@";;
moveip) ctdb_moveip "$@";;
shutdown) ctdb_shutdown "$@";;
- setnatgwstate) ctdb_setnatgwstate "$@" ;;
setvar) ctdb_setvar "$@" ;;
nodestatus) ctdb_nodestatus "$@" ;;
*) not_implemented "$1" ;;
diff --git a/ctdb/tests/src/ctdb_test_stubs.c b/ctdb/tests/src/ctdb_test_stubs.c
index cd9c97e7bad..83ba3987d01 100644
--- a/ctdb/tests/src/ctdb_test_stubs.c
+++ b/ctdb/tests/src/ctdb_test_stubs.c
@@ -27,7 +27,7 @@ static struct ctdb_node_capabilities *global_caps = NULL;
* EOF or a blank line terminates input.
*
* By default, capablities for each node are
- * CTDB_CAP_RECMASTER|CTDB_CAP_LMASTER|CTDB_CAP_NATGW. These 3
+ * CTDB_CAP_RECMASTER|CTDB_CAP_LMASTER. These 2
* capabilities can be faked off by adding, for example,
* -CTDB_CAP_RECMASTER. LVS can be faked on by adding
* CTDB_CAP_LVS.
@@ -90,7 +90,7 @@ static void ctdb_test_stubs_read_nodemap(struct ctdb_context *ctdb)
talloc_free(ip);
ip = talloc_strdup(ctdb, "0.0.0.0");
}
- capabilities = CTDB_CAP_RECMASTER|CTDB_CAP_LMASTER|CTDB_CAP_NATGW;
+ capabilities = CTDB_CAP_RECMASTER|CTDB_CAP_LMASTER;
tok = strtok(NULL, " \t");
while (tok != NULL) {
@@ -102,8 +102,6 @@ static void ctdb_test_stubs_read_nodemap(struct ctdb_context *ctdb)
capabilities &= ~CTDB_CAP_RECMASTER;
} else if (strcmp(tok, "-CTDB_CAP_LMASTER") == 0) {
capabilities &= ~CTDB_CAP_LMASTER;
- } else if (strcmp(tok, "-CTDB_CAP_NATGW") == 0) {
- capabilities &= ~CTDB_CAP_NATGW;
} else if (strcmp(tok, "CTDB_CAP_LVS") == 0) {
capabilities |= CTDB_CAP_LVS;
} else if (strcmp(tok, "TIMEOUT") == 0) {
diff --git a/ctdb/tests/tool/stubby.getcapabilities.001.sh b/ctdb/tests/tool/stubby.getcapabilities.001.sh
index df4a659008f..e89f7a015f8 100755
--- a/ctdb/tests/tool/stubby.getcapabilities.001.sh
+++ b/ctdb/tests/tool/stubby.getcapabilities.001.sh
@@ -8,7 +8,6 @@ required_result 0 <<EOF
RECMASTER: YES
LMASTER: YES
LVS: NO
-NATGW: YES
EOF
simple_test <<EOF
diff --git a/ctdb/tests/tool/stubby.getcapabilities.002.sh b/ctdb/tests/tool/stubby.getcapabilities.002.sh
index 9a37c4a93ec..112a912fd04 100755
--- a/ctdb/tests/tool/stubby.getcapabilities.002.sh
+++ b/ctdb/tests/tool/stubby.getcapabilities.002.sh
@@ -8,7 +8,6 @@ required_result 0 <<EOF
RECMASTER: YES
LMASTER: YES
LVS: NO
-NATGW: YES
EOF
simple_test <<EOF
diff --git a/ctdb/tests/tool/stubby.getcapabilities.004.sh b/ctdb/tests/tool/stubby.getcapabilities.004.sh
index d3e24b492a7..4412883d4f1 100755
--- a/ctdb/tests/tool/stubby.getcapabilities.004.sh
+++ b/ctdb/tests/tool/stubby.getcapabilities.004.sh
@@ -10,7 +10,7 @@ input="\
NODEMAP
0 192.168.20.41 0x0 CURRENT RECMASTER CTDB_CAP_LVS
1 192.168.20.42 0x0 -CTDB_CAP_LMASTER
-2 192.168.20.43 0x0 -CTDB_CAP_RECMASTER -CTDB_CAP_NATGW
+2 192.168.20.43 0x0 -CTDB_CAP_RECMASTER
IFACES
:Name:LinkStatus:References:
@@ -27,7 +27,6 @@ required_result 0 <<EOF
RECMASTER: YES
LMASTER: YES
LVS: YES
-NATGW: YES
EOF
simple_test -n 0 <<EOF
@@ -38,7 +37,6 @@ required_result 0 <<EOF
RECMASTER: YES
LMASTER: NO
LVS: NO
-NATGW: YES
EOF
simple_test -n 1 <<EOF
@@ -49,7 +47,6 @@ required_result 0 <<EOF
RECMASTER: NO
LMASTER: YES
LVS: NO
-NATGW: NO
EOF
simple_test -n 2 <<EOF