Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sig_failover_acceptance test. #2272

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions acceptance/sig_failover_acceptance/Test.topo
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions acceptance/sig_failover_acceptance/test
Original file line number Diff line number Diff line change
@@ -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 "$@"
2 changes: 1 addition & 1 deletion acceptance/sigutil/common.sh
Original file line number Diff line number Diff line change
@@ -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}

Expand Down