Browse Source

Add a minimal bwfile network with V3BandwidthsFile /tmp/bwfile

Closes 26801.
teor 4 years ago
parent
commit
0d2f884aa1
3 changed files with 18 additions and 0 deletions
  1. 7 0
      README
  2. 9 0
      networks/bwfile
  3. 2 0
      torrc_templates/authority-bwfile.tmpl

+ 7 - 0
README

@@ -118,6 +118,13 @@ HS Connection Tests:
   # Default behavior is one client connects to each HS
   ./chutney stop networks/hs-025
 
+Bandwidth File Tests:
+  ./tools/test-network.sh --flavour bwfile
+  # Warning: Can't open bandwidth file at configured location: /tmp/bwfile
+  # Create a bwfile with no bandwidths, that is valid for a few days
+  date +%s > /tmp/bwfile
+  ./tools/test-network.sh --flavour bwfile
+
 Waiting for the network:
 
   The tools/test-network.sh script waits CHUTNEY_START_TIME seconds

+ 9 - 0
networks/bwfile

@@ -0,0 +1,9 @@
+# By default, Authorities are not configured as exits
+Authority = Node(tag="a", authority=1, relay=1, torrc="authority-bwfile.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
+Client = Node(tag="c", client=1, torrc="client.tmpl")
+
+# The minimum number of authorities/relays/exits is 3, the minimum path length
+NODES = Authority.getN(2) + ExitRelay.getN(1) + Client.getN(1)
+
+ConfigureNodes(NODES)

+ 2 - 0
torrc_templates/authority-bwfile.tmpl

@@ -0,0 +1,2 @@
+${include:authority.tmpl}
+V3BandwidthsFile /tmp/bwfile