diff --git a/acceptance/sig_failover_acceptance/Test.topo b/acceptance/sig_failover_acceptance/Test.topo new file mode 100644 index 0000000000..52336fd443 --- /dev/null +++ b/acceptance/sig_failover_acceptance/Test.topo @@ -0,0 +1,18 @@ +--- # Topology for sig_failover_acceptance test. +defaults: + zookeepers: + 1: + addr: 127.0.0.1 +ASes: + "1-ff00:0:110": + core: true + mtu: 1400 + "1-ff00:0:111": + cert_issuer: 1-ff00:0:110 +links: + - {a: "1-ff00:0:110#1", b: "1-ff00:0:111#1", linkAtoB: CHILD} + - {a: "1-ff00:0:110#2", b: "1-ff00:0:111#2", linkAtoB: CHILD} +CAs: + CA1-1: + ISD: 1 + commonName: CA1-1 diff --git a/acceptance/sig_failover_acceptance/test b/acceptance/sig_failover_acceptance/test new file mode 100755 index 0000000000..7add4b6447 --- /dev/null +++ b/acceptance/sig_failover_acceptance/test @@ -0,0 +1,36 @@ +#!/bin/bash + +# This test checks whether path failover in SIG works as expected. +# It sets up two ASes connected by two paths. It disables one path +# and checks whether IP traffic is still going through. Then it +# enables the first path and disables the other one. It tries to pass +# IP packets between the ASes again. + +PROGRAM=`basename "$0"` +COMMAND="$1" +TEST_NAME="sig_failover" +TEST_TOPOLOGY="acceptance/sig_failover_acceptance/Test.topo" + +. acceptance/sigutil/common.sh + +test_run() { + set -e + # Make sure that pings go through in a vanilla setup. + ./bin/sig_ping_acceptance -d -log.console info + # Disable one of the two paths between the ASes by stopping the corresponding BR. + ./tools/dc stop scion_br1-ff00_0_110-2 + # Make sure that the pings still get through. + ./bin/sig_ping_acceptance -d -log.console info + # Enable the disabled path, disable the other path. + ./tools/dc start scion_br1-ff00_0_110-2 + ./tools/dc stop scion_br1-ff00_0_110-1 + # Make sure that the pings still get through. + ./bin/sig_ping_acceptance -d -log.console info + # Enable both paths again. + ./tools/dc start scion_br1-ff00_0_110-1 + # Make sure that the pings still get through. + ./bin/sig_ping_acceptance -d -log.console info +} + +shift +do_command $PROGRAM $COMMAND $TEST_NAME "$@" diff --git a/acceptance/sigutil/common.sh b/acceptance/sigutil/common.sh index ee0a4bbd3e..b9df8113dc 100755 --- a/acceptance/sigutil/common.sh +++ b/acceptance/sigutil/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -TEST_TOPOLOGY="topology/Tiny.topo" +TEST_TOPOLOGY=${TEST_TOPOLOGY:-topology/Tiny.topo} SRC_IA=${SRC_IA:-1-ff00:0:111} DST_IA=${DST_IA:-1-ff00:0:112}