forked from scionproto/scion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for old and new br configuration with(out) shim dispatcher
- Loading branch information
1 parent
0ee169c
commit a4d776f
Showing
11 changed files
with
131 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("//acceptance/common:topogen.bzl", "topogen_test") | ||
|
||
topogen_test( | ||
name = "test", | ||
src = "test.py", | ||
args = ["--executable=end2end_integration:$(location //tools/end2end_integration)"], | ||
data = ["//tools/end2end_integration"], | ||
topo = "//acceptance/old_new_br/testdata:topology.topo", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright 2023 ETH Zurich | ||
|
||
import time | ||
|
||
from acceptance.common import base | ||
from acceptance.common import scion | ||
# from plumbum import local | ||
|
||
|
||
class Test(base.TestTopogen): | ||
""" | ||
Constructs a simple test topology with one core, four leaf ASes. | ||
Each of them will run a different mix between BR that will replicate | ||
the old behaviour (i.e., they will send traffic to its own AS to the | ||
endhost default port) and routers with the new behaviour (i.e., they | ||
will rewrite the underlay UDP/IP destination port with the UDP/SCION | ||
port). | ||
AS 1-ff00:0:1 is core. | ||
AS 1-ff00:0:2, 1-ff00:0:3 | ||
We use the shortnames AS1, AS2, etc. for the ASes above. | ||
AS1 contains a BR with the port rewriting configuration to the default | ||
range. It also includes a shim dispatcher. | ||
AS2 contains a BR with a configuration that reassembles the old | ||
behaviour, i.e., sending all traffic to default endhost port 30041. | ||
It also includes a shim dispatcher. | ||
AS3 contains a BR with the port rewriting configuration to the default | ||
range. It does not include the shim dispatcher. | ||
""" | ||
|
||
def setup_prepare(self): | ||
super().setup_prepare() | ||
|
||
br_as_2_id = "br1-ff00_0_2-1" | ||
|
||
br_as_2_file = self.artifacts / "gen" / "ASff00_0_2" \ | ||
/ ("%s.toml" % br_as_2_id) | ||
scion.update_toml({"router.endhost_start_port": 0}, [br_as_2_file]) | ||
scion.update_toml({"router.endhost_end_port": 0}, [br_as_2_file]) | ||
|
||
def setup_start(self): | ||
super().setup_start() | ||
time.sleep(10) # Give applications time to download configurations | ||
|
||
def _run(self): | ||
ping_test = self.get_executable("end2end_integration") | ||
ping_test["-d", "-outDir", self.artifacts].run_fg() | ||
|
||
|
||
if __name__ == "__main__": | ||
base.main(Test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exports_files([ | ||
"topology.topo", | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- # Gateway Topology | ||
ASes: | ||
"1-ff00:0:1": | ||
core: true | ||
voting: true | ||
authoritative: true | ||
issuing: true | ||
"1-ff00:0:2": | ||
cert_issuer: 1-ff00:0:1 | ||
"1-ff00:0:3": | ||
cert_issuer: 1-ff00:0:1 | ||
test_dispatcher: False | ||
links: | ||
- {a: "1-ff00:0:1#2", b: "1-ff00:0:2#1", linkAtoB: CHILD} | ||
- {a: "1-ff00:0:1#3", b: "1-ff00:0:3#1", linkAtoB: CHILD} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters