tor-commits
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2017
- 13 participants
- 1918 discussions

[translation/liveusb-creator] Update translations for liveusb-creator
by translation@torproject.org 12 Jun '17
by translation@torproject.org 12 Jun '17
12 Jun '17
commit d0dd672297747ea68b23393d17788838d41154fa
Author: Translation commit bot <translation(a)torproject.org>
Date: Mon Jun 12 15:15:31 2017 +0000
Update translations for liveusb-creator
---
fr/fr.po | 8 ++++----
fr_CA/fr_CA.po | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fr/fr.po b/fr/fr.po
index 392c8c5..880d72d 100644
--- a/fr/fr.po
+++ b/fr/fr.po
@@ -27,9 +27,9 @@ msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-06-09 17:50+0200\n"
-"PO-Revision-Date: 2017-06-10 01:55+0000\n"
-"Last-Translator: carolyn <carolyn(a)anhalt.org>\n"
+"POT-Creation-Date: 2017-06-10 07:50+0200\n"
+"PO-Revision-Date: 2017-06-12 15:01+0000\n"
+"Last-Translator: French language coordinator <french.coordinator(a)rbox.me>\n"
"Language-Team: French (http://www.transifex.com/otf/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -359,7 +359,7 @@ msgid ""
"The USB stick \"%(pretty_name)s\" is configured as non-removable by its "
"manufacturer and Tails will fail to start on it. Please try installing on a "
"different model."
-msgstr ""
+msgstr "La clé USB « %(pretty_name)s » est configurée comme non amovible par son fabricant et le démarrage de Tails échouera sur cette clé. Veuillez tenter de l'installer sur un modèle différent."
#: ../tails_installer/gui.py:498
#, python-format
diff --git a/fr_CA/fr_CA.po b/fr_CA/fr_CA.po
index 2fa0776..28f6b68 100644
--- a/fr_CA/fr_CA.po
+++ b/fr_CA/fr_CA.po
@@ -19,9 +19,9 @@ msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-06-09 17:50+0200\n"
-"PO-Revision-Date: 2017-06-10 01:55+0000\n"
-"Last-Translator: carolyn <carolyn(a)anhalt.org>\n"
+"POT-Creation-Date: 2017-06-10 07:50+0200\n"
+"PO-Revision-Date: 2017-06-12 15:01+0000\n"
+"Last-Translator: French language coordinator <french.coordinator(a)rbox.me>\n"
"Language-Team: French (Canada) (http://www.transifex.com/otf/torproject/language/fr_CA/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -351,7 +351,7 @@ msgid ""
"The USB stick \"%(pretty_name)s\" is configured as non-removable by its "
"manufacturer and Tails will fail to start on it. Please try installing on a "
"different model."
-msgstr ""
+msgstr "La clé USB « %(pretty_name)s » est configurée comme non amovible par son fabricant et le démarrage de Tails échouera sur cette clé. Veuillez tenter de l'installer sur un modèle différent."
#: ../tails_installer/gui.py:498
#, python-format
1
0

[tor-browser-bundle/master] Bumping tor browser branch for nightly builds
by gk@torproject.org 12 Jun '17
by gk@torproject.org 12 Jun '17
12 Jun '17
commit 5bb561cc765dabbd1ecbdee9c33dfe3df3a94cf3
Author: Georg Koppen <gk(a)torproject.org>
Date: Mon Jun 12 12:46:09 2017 +0000
Bumping tor browser branch for nightly builds
---
gitian/versions.nightly | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitian/versions.nightly b/gitian/versions.nightly
index 03c543c..df05fbd 100755
--- a/gitian/versions.nightly
+++ b/gitian/versions.nightly
@@ -13,11 +13,11 @@ DATA_OUTSIDE_APP_DIR=1
VERIFY_TAGS=0
-FIREFOX_VERSION=52.1.1esr
+FIREFOX_VERSION=52.2.0esr
TORBROWSER_UPDATE_CHANNEL=default
-TORBROWSER_TAG=tor-browser-${FIREFOX_VERSION}-7.0-1
+TORBROWSER_TAG=tor-browser-${FIREFOX_VERSION}-7.5-1
TOR_TAG=master
TORLAUNCHER_TAG=master
TORBUTTON_TAG=master
1
0

12 Jun '17
commit d943f29a601d16abbaddbd7fa40448d019bf6d97
Author: Georg Koppen <gk(a)torproject.org>
Date: Mon Jun 12 12:48:49 2017 +0000
NoScript version bump for nightly
---
gitian/versions.nightly | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitian/versions.nightly b/gitian/versions.nightly
index df05fbd..5a504d0 100755
--- a/gitian/versions.nightly
+++ b/gitian/versions.nightly
@@ -80,7 +80,7 @@ ELFUTILS_VER=0.166
## File names for the source packages
OPENSSL_PACKAGE=openssl-${OPENSSL_VER}.tar.gz
GMP_PACKAGE=gmp-${GMP_VER}.tar.bz2
-NOSCRIPT_PACKAGE=noscript_security_suite-5.0.4-fx+sm.xpi
+NOSCRIPT_PACKAGE=noscript_security_suite-5.0.5-fx+sm.xpi
CCTOOLS_PACKAGE=cctools.tar.gz
OSXSDK_PACKAGE=MacOSX10.7.sdk.tar.gz
MSVCR100_PACKAGE=msvcr100.dll
@@ -116,7 +116,7 @@ ELFUTILS_PACKAGE=elfutils-${ELFUTILS_VER}.tar.bz2
OPENSSL_HASH=6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
GMP_HASH=752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160
OSXSDK_HASH=da77bb0003fcca5ea8c4e8cb2da8828ded750c54afdcac29ec6f3b46ad5e3adf
-NOSCRIPT_HASH=cd8e5561bdd7331d9fdd510fb1bd1cb6460d64f351076b523d31361ff9853c76
+NOSCRIPT_HASH=bf1dee39f6e5936df2b03b794c1efc9236b440536a05fafcff667e33903e6aed
CCTOOLS_HASH=e908fdebc2886ee5491ebfc7e7950af451b3c4e2439c2d7a923ed06ad05113e4
MSVCR100_HASH=1221a09484964a6f38af5e34ee292b9afefccb3dc6e55435fd3aaf7c235d9067
PYCRYPTO_HASH=f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c
1
0

12 Jun '17
commit f28c1252c7a84b034b35d987fdddfc39a6cf45ba
Author: Georg Koppen <gk(a)torproject.org>
Date: Fri Jun 9 14:23:08 2017 +0000
Bug 22554: Don't set Battery API pref anymore
Mozilla made the Battery API chrome-only
(https://bugzilla.mozilla.org/show_bug.cgi?id=1313580) We therefore
don't need to take care of it anymore in Torbutton.
---
src/chrome/content/torbutton.js | 1 -
src/chrome/locale/en/torbutton.dtd | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 9af7c57..2d69b0c 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1732,7 +1732,6 @@ function torbutton_update_fingerprinting_prefs() {
m_tb_prefs.setBoolPref("webgl.min_capability_mode", mode);
m_tb_prefs.setBoolPref("webgl.disable-extensions", mode);
- m_tb_prefs.setBoolPref("dom.battery.enabled", !mode);
m_tb_prefs.setBoolPref("dom.network.enabled", !mode);
m_tb_prefs.setBoolPref("dom.enable_performance", !mode);
m_tb_prefs.setBoolPref("plugin.expose_full_path", !mode);
diff --git a/src/chrome/locale/en/torbutton.dtd b/src/chrome/locale/en/torbutton.dtd
index 6bc7141..608947c 100644
--- a/src/chrome/locale/en/torbutton.dtd
+++ b/src/chrome/locale/en/torbutton.dtd
@@ -30,7 +30,7 @@
<!ENTITY torbutton.prefs.restrict_thirdparty_tooltip "Keep this box checked to prevent various browser features from being abused to track you as you browse the web. Modified features include blob URLs, broadcast channels, the browser cache, cookies, favicons, HTTP Auth headers, link preconnects, localStorage, mediaSource URLs, OCSP requests, SharedWorkers, and TLS session tickets.">
<!ENTITY torbutton.prefs.resist_fingerprinting "Change details that distinguish you from other Tor Browser users">
<!ENTITY torbutton.prefs.resist_fingerprinting.accesskey "F">
-<!ENTITY torbutton.prefs.resist_fingerprinting_tooltip "Keep this box checked to hide things from websites that could be unique about you, including your battery status, computer performance, keyboard layout, locale, the location of installed plugins, the list of installed plugins, your network status, screen orientation, screen size, site-specific zoom levels, supported file types, system colors, and WebGL capabilities.">
+<!ENTITY torbutton.prefs.resist_fingerprinting_tooltip "Keep this box checked to hide things from websites that could be unique about you, including your computer performance, keyboard layout, locale, the location of installed plugins, the list of installed plugins, your network status, screen orientation, screen size, site-specific zoom levels, supported file types, system colors, and WebGL capabilities.">
<!ENTITY torbutton.prefs.sec_caption "Security Level">
<!ENTITY torbutton.prefs.sec_caption_tooltip "The Security Slider lets you disable certain browser features that may make your browser more vulnerable to hacking attempts.">
<!ENTITY torbutton.prefs.sec_low "Low (default)">
1
0

[tor-browser-bundle/master] Bug 22578: Reorder versions entries in config.yml file
by gk@torproject.org 12 Jun '17
by gk@torproject.org 12 Jun '17
12 Jun '17
commit 2a1052df903df3c0cd80ec59783e94aca68333fc
Author: Georg Koppen <gk(a)torproject.org>
Date: Mon Jun 12 10:41:55 2017 +0000
Bug 22578: Reorder versions entries in config.yml file
---
tools/update-responses/config.yml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/update-responses/config.yml b/tools/update-responses/config.yml
index b0017db..d12ef1c 100644
--- a/tools/update-responses/config.yml
+++ b/tools/update-responses/config.yml
@@ -22,12 +22,11 @@ channels:
alpha: 7.5a1
release: 6.0.1
versions:
- 6.0.1:
- platformVersion: 45.2.0
- detailsURL: https://blog.torproject.org/blog/tor-browser-601-released
+ 7.5a1:
+ platformVersion: 52.2.0
+ detailsURL: https://blog.torproject.org/blog/tor-browser-75a1-released
incremental_from:
- - 5.5.5
- - 6.0
+ - 7.0a4
migrate_archs:
osx32: osx64
migrate_langs:
@@ -38,11 +37,12 @@ versions:
minSupportedOSVersion: 13.0.0
osx64:
minSupportedOSVersion: 13.0.0
- 7.5a1:
- platformVersion: 52.2.0
- detailsURL: https://blog.torproject.org/blog/tor-browser-75a1-released
+ 6.0.1:
+ platformVersion: 45.2.0
+ detailsURL: https://blog.torproject.org/blog/tor-browser-601-released
incremental_from:
- - 7.0a4
+ - 5.5.5
+ - 6.0
migrate_archs:
osx32: osx64
migrate_langs:
1
0

[metrics-lib/master] Also check exception message in tests. Part of task-22280.
by karsten@torproject.org 12 Jun '17
by karsten@torproject.org 12 Jun '17
12 Jun '17
commit c39a15a2ffb929ffd844d79bf2b8d0d5bdc15620
Author: iwakeh <iwakeh(a)torproject.org>
Date: Thu Jun 1 08:44:28 2017 +0000
Also check exception message in tests. Part of task-22280.
---
.../descriptor/impl/ExitListImplTest.java | 13 +-
.../impl/ExtraInfoDescriptorImplTest.java | 379 +++++++++++----
.../descriptor/impl/MicrodescriptorImplTest.java | 27 +-
.../impl/RelayNetworkStatusConsensusImplTest.java | 517 +++++++++++++++++----
.../impl/RelayNetworkStatusImplTest.java | 9 +-
.../impl/RelayNetworkStatusVoteImplTest.java | 450 ++++++++++++++----
.../descriptor/impl/ServerDescriptorImplTest.java | 389 ++++++++++++----
7 files changed, 1415 insertions(+), 369 deletions(-)
diff --git a/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java b/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java
index 916c4df..5a67d53 100644
--- a/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java
@@ -9,13 +9,18 @@ import static org.junit.Assert.assertTrue;
import org.torproject.descriptor.DescriptorParseException;
import org.torproject.descriptor.ExitListEntry;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import java.util.HashMap;
import java.util.Map;
public class ExitListImplTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
@Test()
public void testAnnotatedInput() throws Exception {
ExitListImpl result = new ExitListImpl((tordnselAnnotation + input)
@@ -74,14 +79,18 @@ public class ExitListImplTest {
assertTrue("Map: " + map, map.containsKey("81.7.17.173"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testInsufficientInput0() throws Exception {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Missing 'ExitAddress' line in exit list entry.");
new ExitListImpl((tordnselAnnotation + insufficientInput[0])
.getBytes("US-ASCII"), fileName, false);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testInsufficientInput1() throws Exception {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Missing 'Published' line in exit list entry.");
new ExitListImpl((tordnselAnnotation + insufficientInput[1])
.getBytes("US-ASCII"), fileName, false);
}
diff --git a/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java b/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
index b745b07..e10fa7b 100644
--- a/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
@@ -970,8 +970,11 @@ public class ExtraInfoDescriptorImplTest {
assertNotNull(descriptor.getDirreqReadHistory());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExtraInfoLineMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'extra-info' is contained 0 times, but "
+ + "must be contained exactly once.");
DescriptorBuilder.createWithExtraInfoLine(null);
}
@@ -996,55 +999,81 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getFingerprint());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExtraInfoLineNotFirst()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Keyword 'extra-info' must be contained in the first line.");
DescriptorBuilder.createWithExtraInfoLine("geoip-db-digest "
+ "916A3CA8B7DF61473D5AE5B21711F35F301CE9E8\n"
+ "extra-info chaoscomputerclub5 "
+ "A9C039A5FD02FCA06303DCFAABE25C5912C63B26");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'extra-info "
+ + "A9C039A5FD02FCA06303DCFAABE25C5912C63B26' "
+ + "in extra-info descriptor.");
DescriptorBuilder.createWithExtraInfoLine("extra-info "
+ "A9C039A5FD02FCA06303DCFAABE25C5912C63B26");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameInvalidChar() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'extra-info "
+ + "chaoscomputerclub% A9C039A5FD02FCA06303DCFAABE25C5912C63B26'.");
DescriptorBuilder.createWithExtraInfoLine("extra-info "
+ "chaoscomputerclub% A9C039A5FD02FCA06303DCFAABE25C5912C63B26");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'extra-info "
+ + "chaoscomputerclub5ReallyLongNickname "
+ + "A9C039A5FD02FCA06303DCFAABE25C5912C63B26'.");
DescriptorBuilder.createWithExtraInfoLine("extra-info "
+ "chaoscomputerclub5ReallyLongNickname "
+ "A9C039A5FD02FCA06303DCFAABE25C5912C63B26");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintG() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'extra-info "
+ + "chaoscomputerclub5 G9C039A5FD02FCA06303DCFAABE25C5912C63B26'.");
DescriptorBuilder.createWithExtraInfoLine("extra-info "
+ "chaoscomputerclub5 G9C039A5FD02FCA06303DCFAABE25C5912C63B26");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooShort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'extra-info "
+ + "chaoscomputerclub5 A9C039A5FD02FCA06303DCFAABE25C5912C6'.");
DescriptorBuilder.createWithExtraInfoLine("extra-info "
+ "chaoscomputerclub5 A9C039A5FD02FCA06303DCFAABE25C5912C6");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'extra-info "
+ + "chaoscomputerclub5 A9C039A5FD02FCA06303DCFAABE25C5912C63B26A9C0'.");
DescriptorBuilder.createWithExtraInfoLine("extra-info "
+ "chaoscomputerclub5 A9C039A5FD02FCA06303DCFAABE25C5912C63B26"
+ "A9C0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublishedMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'published' is contained 0 times, "
+ + "but must be contained exactly once.");
DescriptorBuilder.createWithPublishedLine(null);
}
@@ -1062,9 +1091,13 @@ public class ExtraInfoDescriptorImplTest {
assertEquals(1328951316000L, descriptor.getPublishedMillis());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryNegativeBytes()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Negative bandwidth values are not allowed in "
+ + "line 'write-history 2012-02-11 09:03:39 (900 s) -4713350144,"
+ + "-4723824640,-4710717440,-4572675072'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-02-11 09:03:39 (900 s) "
+ "-4713350144,-4723824640,-4710717440,-4572675072");
@@ -1086,9 +1119,13 @@ public class ExtraInfoDescriptorImplTest {
+ "4707695616,4699666432,4650004480,4489718784");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testReadHistoryNegativeInterval()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Only positive interval lengths are allowed in "
+ + "line 'read-history 2012-02-11 09:03:39 (-900 s) 4707695616,"
+ + "4699666432,4650004480,4489718784'.");
DescriptorBuilder.createWithReadHistoryLine("read-history "
+ "2012-02-11 09:03:39 (-900 s) "
+ "4707695616,4699666432,4650004480,4489718784");
@@ -1102,17 +1139,25 @@ public class ExtraInfoDescriptorImplTest {
+ "4707695616,4699666432,4650004480,4489718784");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqWriteHistoryMissingBytesBegin()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line "
+ + "'dirreq-write-history 2012-02-11 09:03:39 (900 s) "
+ + ",64996352,60625920,67922944'.");
DescriptorBuilder.createWithDirreqWriteHistoryLine(
"dirreq-write-history 2012-02-11 09:03:39 (900 s) "
+ ",64996352,60625920,67922944");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqWriteHistoryMissingBytesMiddle()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line "
+ + "'dirreq-write-history 2012-02-11 09:03:39 (900 s) 81281024,,"
+ + "60625920,67922944'.");
DescriptorBuilder.createWithDirreqWriteHistoryLine(
"dirreq-write-history 2012-02-11 09:03:39 (900 s) "
+ "81281024,,60625920,67922944");
@@ -1126,9 +1171,13 @@ public class ExtraInfoDescriptorImplTest {
+ "67922944 bin_size=1024");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqReadHistoryMissingBytesEnd()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line "
+ + "'dirreq-read-history 2012-02-11 09:03:39 (900 s) "
+ + "17074176,16235520,16005120,'.");
DescriptorBuilder.createWithDirreqReadHistoryLine(
"dirreq-read-history 2012-02-11 09:03:39 (900 s) "
+ "17074176,16235520,16005120,");
@@ -1143,23 +1192,32 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getGeoipDbDigestSha1Hex());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipDbDigestTooShort()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'geoip-db-digest "
+ + "916A3CA8B7DF61473D5AE5B21711F35F301C'.");
DescriptorBuilder.createWithGeoipDbDigestLine("geoip-db-digest "
+ "916A3CA8B7DF61473D5AE5B21711F35F301C");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipDbDigestIllegalChars()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'geoip-db-digest "
+ + "&%6A3CA8B7DF61473D5AE5B21711F35F301CE9E8'.");
DescriptorBuilder.createWithGeoipDbDigestLine("geoip-db-digest "
+ "&%6A3CA8B7DF61473D5AE5B21711F35F301CE9E8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipDbDigestMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'geoip-db-digest' in extra-info "
+ + "descriptor.");
DescriptorBuilder.createWithGeoipDbDigestLine("geoip-db-digest");
}
@@ -1206,40 +1264,59 @@ public class ExtraInfoDescriptorImplTest {
assertFalse(ips.containsKey("pl"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipStartTimeDateOnly()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'geoip-start-time 2012-02-10' in "
+ + "extra-info descriptor.");
GeoipStatsBuilder.createWithGeoipStartTimeLine("geoip-start-time "
+ "2012-02-10");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsDash()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de-1152,cn=896,us=712"
+ + ",it=504,ru=352,fr=208,gb=208,ir=200' contains an illegal key in "
+ + "list element 'de-1152'.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de-1152,cn=896,us=712,it=504,ru=352,fr=208,"
+ "gb=208,ir=200");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsZero()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de=zero,cn=896,us=712"
+ + ",it=504,ru=352,fr=208,gb=208,ir=200' contains an illegal value in "
+ + "list element 'de=zero'.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de=zero,cn=896,us=712,it=504,ru=352,fr=208,"
+ "gb=208,ir=200");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsNone()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de=none,cn=896,us=712"
+ + ",it=504,ru=352,fr=208,gb=208,ir=200' contains an illegal value in "
+ + "list element 'de=none'.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de=none,cn=896,us=712,it=504,ru=352,fr=208,"
+ "gb=208,ir=200");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsOther()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de=1152,cn=896,"
+ + "us=712,it=504,ru=352,fr=208,gb=208,other=200' contains an "
+ + "illegal key in list element 'other=200'.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de=1152,cn=896,us=712,it=504,ru=352,fr=208,"
+ "gb=208,other=200");
@@ -1261,33 +1338,49 @@ public class ExtraInfoDescriptorImplTest {
+ "GB=208,IR=200");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsMissingBegin()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins ,cn=896,us=712,"
+ + "it=504,ru=352,fr=208,gb=208,ir=200' "
+ + "contains an illegal key in list element ''.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins ,cn=896,us=712,it=504,ru=352,fr=208,gb=208,"
+ "ir=200");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsMissingMiddle()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de=1152,,us=712,"
+ + "it=504,ru=352,fr=208,gb=208,ir=200' contains an illegal key in "
+ + "list element ''.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de=1152,,us=712,it=504,ru=352,fr=208,"
+ "gb=208,ir=200");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsMissingEnd()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de=1152,cn=896,"
+ + "us=712,it=504,ru=352,fr=208,gb=208,' contains an illegal key in "
+ + "list element ''.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de=1152,cn=896,us=712,it=504,ru=352,fr=208,"
+ "gb=208,");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testGeoipClientOriginsDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'geoip-client-origins de=1152,de=952,"
+ + "cn=896,us=712,it=504,ru=352,fr=208,gb=208,ir=200' contains "
+ + "duplicate key 'de'.");
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
"geoip-client-origins de=1152,de=952,cn=896,us=712,it=504,"
+ "ru=352,fr=208,gb=208,ir=200");
@@ -1346,9 +1439,12 @@ public class ExtraInfoDescriptorImplTest {
+ "2012-02-11 00:59:53 (172800 s) XXXXXXXXXXXXXXXXXXXXXXXXXXX");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqV3IpsThreeLetterCountry()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v3-ips usa=1544' contains an "
+ + "illegal key in list element 'usa=1544'.");
DirreqStatsBuilder.createWithDirreqV3IpsLine("dirreq-v3-ips "
+ "usa=1544");
}
@@ -1366,9 +1462,12 @@ public class ExtraInfoDescriptorImplTest {
DirreqStatsBuilder.createWithDirreqV2IpsLine("dirreq-v2-ips 00=8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqV3ReqsOneLetterCountry()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v3-reqs u=1744' contains an "
+ + "illegal key in list element 'u=1744'.");
DirreqStatsBuilder.createWithDirreqV3ReqsLine("dirreq-v3-reqs "
+ "u=1744");
}
@@ -1380,15 +1479,21 @@ public class ExtraInfoDescriptorImplTest {
assertNull(eid.getDirreqV3Reqs());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqV2ReqsNoNumber()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v2-reqs us=' contains an illegal "
+ + "value in list element 'us='.");
DirreqStatsBuilder.createWithDirreqV2ReqsLine("dirreq-v2-reqs us=");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirreqV3RespTwoEqualSigns()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v3-resp ok==10848' contains an "
+ + "illegal value in list element 'ok==10848'.");
DirreqStatsBuilder.createWithDirreqV3RespLine("dirreq-v3-resp "
+ "ok==10848");
}
@@ -1410,23 +1515,28 @@ public class ExtraInfoDescriptorImplTest {
+ "ok=1084 4801=ko");
}
- @Test(expected = DescriptorParseException.class)
- public void testDirreqV2RespNull()
- throws DescriptorParseException {
+ @Test
+ public void testDirreqV2RespNull() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Line 'dirreq-v2-resp ok=null' contains an illegal value in "
+ + "list element 'ok=null'.");
DirreqStatsBuilder.createWithDirreqV2RespLine("dirreq-v2-resp "
+ "ok=null");
}
- @Test(expected = DescriptorParseException.class)
- public void testDirreqV2ShareComma()
- throws DescriptorParseException {
+ @Test
+ public void testDirreqV2ShareComma() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dirreq-v2-share 0,37%'.");
DirreqStatsBuilder.createWithDirreqV2ShareLine("dirreq-v2-share "
+ "0,37%");
}
- @Test(expected = DescriptorParseException.class)
- public void testDirreqV3ShareNoPercent()
- throws DescriptorParseException {
+ @Test
+ public void testDirreqV3ShareNoPercent() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dirreq-v3-share 0.37'.");
DirreqStatsBuilder.createWithDirreqV3ShareLine("dirreq-v3-share "
+ "0.37");
}
@@ -1438,9 +1548,11 @@ public class ExtraInfoDescriptorImplTest {
+ "0.37% 123456");
}
- @Test(expected = DescriptorParseException.class)
- public void testDirreqV3DirectDlSpace()
- throws DescriptorParseException {
+ @Test
+ public void testDirreqV3DirectDlSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v3-direct-dl complete 36' contains "
+ + "an illegal value in list element 'complete'.");
DirreqStatsBuilder.createWithDirreqV3DirectDlLine(
"dirreq-v3-direct-dl complete 36");
}
@@ -1452,16 +1564,20 @@ public class ExtraInfoDescriptorImplTest {
"dirreq-v2-direct-dl complete=-8");
}
- @Test(expected = DescriptorParseException.class)
- public void testDirreqV3TunneledDlTooLarge()
- throws DescriptorParseException {
+ @Test
+ public void testDirreqV3TunneledDlTooLarge() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v3-tunneled-dl complete=2147483648'"
+ + " contains an illegal value in list element 'complete=2147483648'.");
DirreqStatsBuilder.createWithDirreqV3TunneledDlLine(
"dirreq-v3-tunneled-dl complete=2147483648");
}
- @Test(expected = DescriptorParseException.class)
- public void testDirreqV3TunneledDlDouble()
- throws DescriptorParseException {
+ @Test
+ public void testDirreqV3TunneledDlDouble() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dirreq-v2-tunneled-dl complete=0.001' "
+ + "contains an illegal value in list element 'complete=0.001'.");
DirreqStatsBuilder.createWithDirreqV2TunneledDlLine(
"dirreq-v2-tunneled-dl complete=0.001");
}
@@ -1485,15 +1601,20 @@ public class ExtraInfoDescriptorImplTest {
assertFalse(ips.containsKey("no"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEntryStatsEndNoDate() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal line 'entry-stats-end 01:59:39 (86400 s)'.");
EntryStatsBuilder.createWithEntryStatsEndLine("entry-stats-end "
+ "01:59:39 (86400 s)");
}
- @Test(expected = DescriptorParseException.class)
- public void testEntryStatsIpsSemicolon()
- throws DescriptorParseException {
+ @Test
+ public void testEntryStatsIpsSemicolon() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'entry-ips ir=25368;us=15744' contains an "
+ + "illegal value in list element 'ir=25368;us=15744'.");
EntryStatsBuilder.createWithEntryIpsLine("entry-ips "
+ "ir=25368;us=15744");
}
@@ -1519,37 +1640,50 @@ public class ExtraInfoDescriptorImplTest {
assertEquals(866, descriptor.getCellCircuitsPerDecile());
}
- @Test(expected = DescriptorParseException.class)
- public void testCellStatsEndNoSeconds()
- throws DescriptorParseException {
+ @Test
+ public void testCellStatsEndNoSeconds() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal line 'cell-stats-end 2012-02-11 01:59:39 (86400)'.");
CellStatsBuilder.createWithCellStatsEndLine("cell-stats-end "
+ "2012-02-11 01:59:39 (86400)");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testCellProcessedCellsNineComma()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'cell-processed-cells 1441,11,6,4,2,"
+ + "1,1,1,1,' contains an illegal value in list element ''.");
CellStatsBuilder.createWithCellProcessedCellsLine(
"cell-processed-cells 1441,11,6,4,2,1,1,1,1,");
}
- @Test(expected = DescriptorParseException.class)
- public void testCellProcessedCellsEleven()
- throws DescriptorParseException {
+ @Test
+ public void testCellProcessedCellsEleven() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("There must be exact ten values in line "
+ + "'cell-queued-cells 3.29,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,"
+ + "0.00,0.00'.");
CellStatsBuilder.createWithCellQueuedCellsLine("cell-queued-cells "
+ "3.29,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00");
}
- @Test(expected = DescriptorParseException.class)
- public void testCellTimeInQueueDouble()
- throws DescriptorParseException {
+ @Test
+ public void testCellTimeInQueueDouble() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'cell-time-in-queue 524.0,1.0,1.0,0.0,0.0,"
+ + "25.0,0.0,0.0,0.0,0.0' contains an illegal value in list element "
+ + "'524.0'.");
CellStatsBuilder.createWithCellTimeInQueueLine("cell-time-in-queue "
+ "524.0,1.0,1.0,0.0,0.0,25.0,0.0,0.0,0.0,0.0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testCellCircuitsPerDecileNegative()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'cell-circuits-per-decile -866'.");
CellStatsBuilder.createWithCellCircuitsPerDecileLine(
"cell-circuits-per-decile -866");
}
@@ -1576,9 +1710,11 @@ public class ExtraInfoDescriptorImplTest {
assertEquals(1744, descriptor.getConnBiDirectBoth());
}
- @Test(expected = DescriptorParseException.class)
- public void testConnBiDirectStatsFive()
- throws DescriptorParseException {
+ @Test
+ public void testConnBiDirectStatsFive() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'conn-bi-direct 2012-02-11 01:59:39"
+ + " (86400 s) 42173,1591,1310,1744,42' in extra-info descriptor.");
DescriptorBuilder.createWithConnBiDirectLine("conn-bi-direct "
+ "2012-02-11 01:59:39 (86400 s) 42173,1591,1310,1744,42");
}
@@ -1624,23 +1760,30 @@ public class ExtraInfoDescriptorImplTest {
}
}
- @Test(expected = DescriptorParseException.class)
- public void testExitStatsEndNoSeconds()
- throws DescriptorParseException {
+ @Test
+ public void testExitStatsEndNoSeconds() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'exit-stats-end 2012-02-11 01:59 (86400 s)'.");
ExitStatsBuilder.createWithExitStatsEndLine("exit-stats-end "
+ "2012-02-11 01:59 (86400 s)");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitStatsWrittenNegativePort()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Invalid port in line 'exit-kibibytes-written -25=74647'.");
ExitStatsBuilder.createWithExitKibibytesWrittenLine(
"exit-kibibytes-written -25=74647");
}
- @Test(expected = DescriptorParseException.class)
- public void testExitStatsWrittenUnknown()
- throws DescriptorParseException {
+ @Test
+ public void testExitStatsWrittenUnknown() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Invalid port in line 'exit-kibibytes-written unknown=74647'.");
ExitStatsBuilder.createWithExitKibibytesWrittenLine(
"exit-kibibytes-written unknown=74647");
}
@@ -1655,9 +1798,12 @@ public class ExtraInfoDescriptorImplTest {
"exit-kibibytes-written =74647");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitStatsReadNegativeBytes()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Invalid value in line 'exit-kibibytes-read 25=-35562'.");
ExitStatsBuilder.createWithExitKibibytesReadLine(
"exit-kibibytes-read 25=-35562");
}
@@ -1705,9 +1851,12 @@ public class ExtraInfoDescriptorImplTest {
assertEquals(1728, trans.get("obfs3").intValue());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBridgeStatsEndIntervalZero()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Interval length must be positive in line "
+ + "'bridge-stats-end 2012-02-11 01:59:39 (0 s)'.");
BridgeStatsBuilder.createWithBridgeStatsEndLine("bridge-stats-end "
+ "2012-02-11 01:59:39 (0 s)");
}
@@ -1719,15 +1868,21 @@ public class ExtraInfoDescriptorImplTest {
+ "2012-02-11 01:59:39 (86400 s) 99999999999999999999999999999999");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBridgeIpsDouble()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'bridge-ips ir=24.5' contains an illegal "
+ + "value in list element 'ir=24.5'.");
BridgeStatsBuilder.createWithBridgeIpsLine("bridge-ips ir=24.5");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBridgeIpsNonAsciiKeyword()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized character in keyword "
+ + "'�bridge-ips' in line '�bridge-ips'.");
DescriptorBuilder.createWithNonAsciiLineBytes(new byte[] {
0x14, (byte) 0xfe, 0x18, // non-ascii chars
0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, // "bridge-"
@@ -1740,9 +1895,12 @@ public class ExtraInfoDescriptorImplTest {
BridgeStatsBuilder.createWithBridgeIpsLine("bridge-ips ir=24 5");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBridgeIpVersionsDouble()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'bridge-ip-versions v4=24.5' "
+ + "contains an illegal value in list element 'v4=24.5'.");
BridgeStatsBuilder.createWithBridgeIpVersionsLine(
"bridge-ip-versions v4=24.5");
}
@@ -1754,9 +1912,12 @@ public class ExtraInfoDescriptorImplTest {
"bridge-ip-versions v4=24 5");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBridgeIpTransportsDouble()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'bridge-ip-transports obfs2=24.5' contains "
+ + "an illegal value in list element 'obfs2=24.5'.");
BridgeStatsBuilder.createWithBridgeIpTransportsLine(
"bridge-ip-transports obfs2=24.5");
}
@@ -1837,8 +1998,11 @@ public class ExtraInfoDescriptorImplTest {
0L, 0L, 0L, 0L, 0L, 42L});
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPaddingCountsNoTime() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'padding-counts 2017-05-10"
+ + " (86400 s) bin-size=10000 write-drop=10000'.");
DescriptorBuilder.createWithPaddingCountsLine("padding-counts 2017-05-10 "
+ "(86400 s) bin-size=10000 write-drop=10000");
}
@@ -1954,16 +2118,24 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getHidservRendRelayedCellsParameters().isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testHidservDirOnionsSeenCommaSeparatedParams()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'hidserv-dir-onions-seen -3 delta_f=8,"
+ + "epsilon=0.30,bin_size=8' contains an illegal value in list element "
+ + "'delta_f=8,epsilon=0.30,bin_size=8'.");
HidservStatsBuilder.createWithHidservDirOnionsSeenLine(
"hidserv-dir-onions-seen -3 delta_f=8,epsilon=0.30,bin_size=8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testHidservDirOnionsSeenNoDoubleParams()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'hidserv-dir-onions-seen -3 delta_f=A "
+ + "epsilon=B bin_size=C' contains an illegal value in list element "
+ + "'delta_f=A'.");
HidservStatsBuilder.createWithHidservDirOnionsSeenLine(
"hidserv-dir-onions-seen -3 delta_f=A epsilon=B bin_size=C");
}
@@ -1975,9 +2147,12 @@ public class ExtraInfoDescriptorImplTest {
"hidserv-dir-onions-seen -3 delta_f=8 epsilon=0.30 bin_size=8 pi=3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRouterSignatureNotLastLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'published' is contained 2 times, "
+ + "but must be contained exactly once.");
DescriptorBuilder.createWithRouterSignatureLines("router-signature\n"
+ "-----BEGIN SIGNATURE-----\n"
+ "o4j+kH8UQfjBwepUnr99v0ebN8RpzHJ/lqYsTojXHy9kMr1RNI9IDeSzA7PSqT"
@@ -1986,9 +2161,11 @@ public class ExtraInfoDescriptorImplTest {
+ "-----END SIGNATURE-----\npublished 2012-02-11 09:08:36");
}
- @Test(expected = DescriptorParseException.class)
- public void testUnrecognizedLineFail()
- throws DescriptorParseException {
+ @Test
+ public void testUnrecognizedLineFail() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'unrecognized-line 1' in "
+ + "extra-info descriptor.");
String unrecognizedLine = "unrecognized-line 1";
DescriptorBuilder.createWithUnrecognizedLine(unrecognizedLine, true);
}
@@ -2036,9 +2213,12 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getRouterSignatureEd25519());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519IdentityMasterKeyMismatch()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Mismatch between identity-ed25519 and master-key-ed25519.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
"master-key-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
ROUTER_SIG_ED25519_LINE);
@@ -2051,17 +2231,23 @@ public class ExtraInfoDescriptorImplTest {
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519IdentityDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'identity-ed25519' is contained 2 times,"
+ + " but must be contained at most once.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES + "\n"
+ IDENTITY_ED25519_LINES, MASTER_KEY_ED25519_LINE,
ROUTER_SIG_ED25519_LINE);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519IdentityEmptyCrypto()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Invalid length of identity-ed25519 (in bytes): 0");
DescriptorBuilder.createWithEd25519Lines("identity-ed25519\n"
+ "-----BEGIN ED25519 CERT-----\n-----END ED25519 CERT-----",
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE);
@@ -2078,9 +2264,12 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getMasterKeyEd25519());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519MasterKeyDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'master-key-ed25519' is contained 2 "
+ + "times, but must be contained at most once.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
MASTER_KEY_ED25519_LINE + "\n" + MASTER_KEY_ED25519_LINE,
ROUTER_SIG_ED25519_LINE);
@@ -2093,17 +2282,23 @@ public class ExtraInfoDescriptorImplTest {
MASTER_KEY_ED25519_LINE, null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519RouterSigDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'router-sig-ed25519' is contained "
+ + "2 times, but must be contained at most once.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE + "\n"
+ ROUTER_SIG_ED25519_LINE);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519FollowedbyUnrecognizedLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in extra-info descriptor.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE
+ "\nunrecognized-line 1");
diff --git a/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java b/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java
index 140974c..7167de9 100644
--- a/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java
@@ -8,10 +8,15 @@ import static org.junit.Assert.assertEquals;
import org.torproject.descriptor.DescriptorParseException;
import org.torproject.descriptor.Microdescriptor;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
public class MicrodescriptorImplTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
/* Helper class to build a microdescriptor based on default data and
* modifications requested by test methods. */
private static class DescriptorBuilder {
@@ -73,25 +78,39 @@ public class MicrodescriptorImplTest {
micro.getDigestSha256Base64());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIdRsa1024TooShort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'AAAA' in line 'id rsa1024 AAAA' is not a "
+ + "valid base64-encoded 20-byte value.");
DescriptorBuilder.createWithIdLine("id rsa1024 AAAA");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIdRsa1024TooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' in line 'id ed25519 "
+ + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ + "AAAAAAAAAAAAAAAAAAA' is not a valid base64-encoded 32-byte value.");
DescriptorBuilder.createWithIdLine("id ed25519 AAAAAAAAAAAAAAAAAAAAAA"
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIdRsa512() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal line 'id rsa512 bvegfGxp8k7T9QFpjPTrPaJTa/8'.");
DescriptorBuilder.createWithIdLine("id rsa512 "
+ "bvegfGxp8k7T9QFpjPTrPaJTa/8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIdEd25519Duplicate() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'id' is contained 2 times, but must be"
+ + " contained at most once.");
DescriptorBuilder.createWithIdLine(
"id rsa1024 bvegfGxp8k7T9QFpjPTrPaJTa/8\n"
+ "id rsa1024 bvegfGxp8k7T9QFpjPTrPaJTa/8");
diff --git a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
index d6bf4cf..dcd3663 100644
--- a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
@@ -14,7 +14,9 @@ import org.torproject.descriptor.DirectorySignature;
import org.torproject.descriptor.NetworkStatusEntry;
import org.torproject.descriptor.RelayNetworkStatusConsensus;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -29,6 +31,9 @@ import java.util.TreeSet;
* a parsed consensus is fully compatible to dir-spec.txt. */
public class RelayNetworkStatusConsensusImplTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
/* Helper class to build a directory source based on default data and
* modifications requested by test methods. */
private static class DirSourceBuilder {
@@ -392,22 +397,29 @@ public class RelayNetworkStatusConsensusImplTest {
assertTrue(consensus.getUnrecognizedLines().isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNoLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'network-status-version' must be "
+ + "contained in the first line.");
ConsensusBuilder.createWithNetworkStatusVersionLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNewLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Blank lines are not allowed.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"network-status-version 3\n");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNewLineSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal keyword in line ' '.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"network-status-version 3\n ");
}
@@ -419,72 +431,104 @@ public class RelayNetworkStatusConsensusImplTest {
"@consensus\nnetwork-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionPrefixLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'directory-footer' in consensus.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"directory-footer\nnetwork-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionPrefixLinePoundChar()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line '#consensus' in consensus.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"#consensus\nnetwork-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in line "
+ + "'network-status-version'.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"network-status-version");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionOneSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in line "
+ + "'network-status-version '.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"network-status-version ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersion42()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in line "
+ + "'network-status-version 42'.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"network-status-version 42");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionFourtyTwo()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in line "
+ + "'network-status-version FourtyTwo'.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
"network-status-version FourtyTwo");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'vote-status' is contained 0 times, "
+ + "but must be contained exactly once.");
ConsensusBuilder.createWithVoteStatusLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionSpaceBefore()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal keyword in line ' network-status-version 3'.");
ConsensusBuilder.createWithNetworkStatusVersionLine(
" network-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusSpaceBefore() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal keyword in line ' vote-status consensus'.");
ConsensusBuilder.createWithVoteStatusLine(" vote-status consensus");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Line 'vote-status' indicates that this is not a consensus.");
ConsensusBuilder.createWithVoteStatusLine("vote-status");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Line 'vote-status ' indicates that this is not a consensus.");
ConsensusBuilder.createWithVoteStatusLine("vote-status ");
}
@@ -494,135 +538,201 @@ public class RelayNetworkStatusConsensusImplTest {
ConsensusBuilder.createWithVoteStatusLine("vote-status consensus ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusVote() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Line 'vote-status vote' indicates that this is not a consensus.");
ConsensusBuilder.createWithVoteStatusLine("vote-status vote");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusTheMagicVoteStatus()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'vote-status TheMagicVoteStatus' indicates "
+ + "that this is not a consensus.");
ConsensusBuilder.createWithVoteStatusLine(
"vote-status TheMagicVoteStatus");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodNoLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'consensus-method' is contained 0 "
+ + "times, but must be contained exactly once.");
ConsensusBuilder.createWithConsensusMethodLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'consensus-method' in consensus.");
ConsensusBuilder.createWithConsensusMethodLine("consensus-method");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodOneSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'consensus-method ' in consensus.");
ConsensusBuilder.createWithConsensusMethodLine("consensus-method ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodEleven()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal consensus method number in line 'consensus-method eleven'.");
ConsensusBuilder.createWithConsensusMethodLine(
"consensus-method eleven");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodMinusOne()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal consensus method number in line "
+ + "'consensus-method -1'.");
ConsensusBuilder.createWithConsensusMethodLine("consensus-method -1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodNinePeriod()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal consensus method number in line "
+ + "'consensus-method 99999999999999999999999999999999999999999999"
+ + "9999999999999999'.");
ConsensusBuilder.createWithConsensusMethodLine("consensus-method "
+ "999999999999999999999999999999999999999999999999999999999999");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodTwoLines()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'consensus-method' is contained 2 times,"
+ + " but must be contained exactly once.");
ConsensusBuilder.createWithConsensusMethodLine(
"consensus-method 1\nconsensus-method 1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'valid-after' is contained 0 times, "
+ + "but must be contained exactly once.");
ConsensusBuilder.createWithValidAfterLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'valid-after' does not contain a "
+ + "timestamp at the expected position.");
ConsensusBuilder.createWithValidAfterLine("valid-after");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'valid-after ' does not contain a timestamp"
+ + " at the expected position.");
ConsensusBuilder.createWithValidAfterLine("valid-after ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterLongAgo() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal timestamp format in line 'valid-after long ago'.");
ConsensusBuilder.createWithValidAfterLine("valid-after long ago");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterFeb30() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'valid-after 2011-02-30 09:00:00'.");
ConsensusBuilder.createWithValidAfterLine(
"valid-after 2011-02-30 09:00:00");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFreshUntilNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'fresh-until' is contained 0 times, "
+ + "but must be contained exactly once.");
ConsensusBuilder.createWithFreshUntilLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFreshUntilAroundTen() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'fresh-until 2011-11-30 around ten'.");
ConsensusBuilder.createWithFreshUntilLine(
"fresh-until 2011-11-30 around ten");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidUntilTomorrowMorning()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal timestamp format in line 'valid-until tomorrow morning'.");
ConsensusBuilder.createWithValidUntilLine(
"valid-until tomorrow morning");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'voting-delay' is contained 0 times, "
+ + "but must be contained exactly once.");
ConsensusBuilder.createWithVotingDelayLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line 'voting-delay'.");
ConsensusBuilder.createWithVotingDelayLine("voting-delay");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Wrong number of values in line 'voting-delay '.");
ConsensusBuilder.createWithVotingDelayLine("voting-delay ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayTriple() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Wrong number of values in line 'voting-delay 300 300 300'.");
ConsensusBuilder.createWithVotingDelayLine(
"voting-delay 300 300 300");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelaySingle() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Wrong number of values in line 'voting-delay 300'.");
ConsensusBuilder.createWithVotingDelayLine("voting-delay 300");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayOneTwo() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal values in line 'voting-delay one two'.");
ConsensusBuilder.createWithVotingDelayLine("voting-delay one two");
}
@@ -671,14 +781,19 @@ public class RelayNetworkStatusConsensusImplTest {
assertTrue(consensus.getRecommendedClientVersions().isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testClientVersionsComma() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal versions line 'client-versions ,'.");
ConsensusBuilder.createWithClientVersionsLine("client-versions ,");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testClientVersionsCommaVersion()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal versions line 'client-versions ,0.2.2.34'.");
ConsensusBuilder.createWithClientVersionsLine(
"client-versions ,0.2.2.34");
}
@@ -724,9 +839,12 @@ public class RelayNetworkStatusConsensusImplTest {
consensus.getRequiredRelayProtocols().get("Cons"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRequiredRelayProtocolsTwice()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'required-relay-protocols' is contained "
+ + "2 times, but must be contained at most once.");
ConsensusBuilder.createWithRequiredRelayProtocolsLine(
"required-relay-protocols Cons=1\nrequired-relay-protocols Cons=1");
}
@@ -761,24 +879,34 @@ public class RelayNetworkStatusConsensusImplTest {
}
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPackageIncomplete() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Wrong number of values in line 'package shouldbesecond 0 http'.");
String packageLine = "package shouldbesecond 0 http";
ConsensusBuilder.createWithPackageLines(packageLine);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testKnownFlagsNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'known-flags' is contained 0 times, "
+ + "but must be contained exactly once.");
ConsensusBuilder.createWithKnownFlagsLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testKnownFlagsNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("No known flags in line 'known-flags'.");
ConsensusBuilder.createWithKnownFlagsLine("known-flags");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testKnownFlagsOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("No known flags in line 'known-flags '.");
ConsensusBuilder.createWithKnownFlagsLine("known-flags ");
}
@@ -813,14 +941,20 @@ public class RelayNetworkStatusConsensusImplTest {
assertTrue(consensus.getConsensusParams().isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testParamsNoEqualSign() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'params key-value' contains an illegal "
+ + "value in list element 'key-value'.");
ConsensusBuilder.createWithParamsLine("params key-value");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testParamsOneTooLargeNegative()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'params min=-2147483649' contains an "
+ + "illegal value in list element 'min=-2147483649'.");
ConsensusBuilder.createWithParamsLine("params min=-2147483649");
}
@@ -844,22 +978,31 @@ public class RelayNetworkStatusConsensusImplTest {
(int) consensus.getConsensusParams().get("max"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testParamsOneTooLargePositive()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'params max=2147483648' contains an illegal"
+ + " value in list element 'max=2147483648'.");
ConsensusBuilder.createWithParamsLine("params max=2147483648");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testSharedRandPreviousNumRevealsOnly()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal line 'shared-rand-previous-value 8' in vote.");
ConsensusBuilder.createWithSharedRandPreviousValueLine(
"shared-rand-previous-value 8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testSharedRandPreviousExtraArg()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'shared-rand-current-value 8 "
+ + "D88plxd8YeLfCIVAR9gjiFlWB1WqpC53kWr350o1pzw= -1.0' in vote.");
ConsensusBuilder.createWithSharedRandCurrentValueLine(
"shared-rand-current-value 8 "
+ "D88plxd8YeLfCIVAR9gjiFlWB1WqpC53kWr350o1pzw= -1.0");
@@ -880,62 +1023,101 @@ public class RelayNetworkStatusConsensusImplTest {
"81349FC1F2DBA2C2C11B45CB9706637D480AB913").isLegacy());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceNicknameTooLong()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'dir-source "
+ + "gabelmooisfinebutthisistoolong ED03BB616EB2F60BEC80151114BB25CEF5"
+ + "15B226 212.112.245.170 212.112.245.170 80 443'.");
DirSourceBuilder.createWithNickname("gabelmooisfinebutthisistoolong");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceIdentityTooShort()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC8015111 212.112.245.170 212.112.245.170 80 443'.");
DirSourceBuilder.createWithIdentity("ED03BB616EB2F60BEC8015111");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceIdentityTooLong()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226ED03BB616EB2F60BEC8 "
+ + "212.112.245.170 212.112.245.170 80 443'.");
DirSourceBuilder.createWithIdentity("ED03BB616EB2F60BEC8015111"
+ "4BB25CEF515B226ED03BB616EB2F60BEC8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceHostnameMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 80 443'.");
DirSourceBuilder.createWithHostName("");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceAddress24() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'212.112.245' in line 'dir-source "
+ + "gabelmoo ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 "
+ + "212.112.245 80 443' is not a valid IPv4 address.");
DirSourceBuilder.createWithAddress("212.112.245");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceAddress40() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "'212.112.245.170.123' in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 212.112.245"
+ + ".170.123 80 443' is not a valid IPv4 address.");
DirSourceBuilder.createWithAddress("212.112.245.170.123");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceDirPortMinusOne()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'-1' in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 "
+ + "212.112.245.170 -1 443' is not a valid port number.");
DirSourceBuilder.createWithDirPort("-1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceDirPort66666()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'66666' in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 "
+ + "212.112.245.170 66666 443' is not a valid port number.");
DirSourceBuilder.createWithDirPort("66666");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceDirPortOnions()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'onions' in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 "
+ + "212.112.245.170 onions 443' is not a valid port number.");
DirSourceBuilder.createWithDirPort("onions");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceOrPortOnions()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'onions' in line 'dir-source gabelmoo "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 "
+ + "212.112.245.170 80 onions' is not a valid port number.");
DirSourceBuilder.createWithOrPort("onions");
}
@@ -966,113 +1148,193 @@ public class RelayNetworkStatusConsensusImplTest {
"ED03BB616EB2F60BEC80151114BB25CEF515B226").getContactLine());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceVoteDigestNoLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "dir-source does not contain a 'vote-digest' line.");
DirSourceBuilder.createWithVoteDigestLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceVoteDigestLineNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid line 'vote-digest'.");
DirSourceBuilder.createWithVoteDigestLine("vote-digest");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceVoteDigestLineOneSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid line 'vote-digest '.");
DirSourceBuilder.createWithVoteDigestLine("vote-digest ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameNotAllowedChars()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'r notAll()wed "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 50.63.8.215 9023 0'.");
StatusEntryBuilder.createWithNickname("notAll()wed");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line "
+ + "'r 1234567890123456789tooLong ADQ6gCT3DiFHKPDFr3rODBUI8HM "
+ + "Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 21:34:27 50.63.8.215 "
+ + "9023 0'.");
StatusEntryBuilder.createWithNickname("1234567890123456789tooLong");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooShort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'TooShort' in line 'r right2privassy3 TooShort "
+ + "Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 21:34:27 50.63.8.215 9023 0' "
+ + "is not a valid base64-encoded 20-byte value.");
StatusEntryBuilder.createWithFingerprintBase64("TooShort");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintEndsWithEqualSign()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'ADQ6gCT3DiFHKPDFr3rODBUI8H=' in line 'r "
+ + "right2privassy3 ADQ6gCT3DiFHKPDFr3rODBUI8H= Yiti+nayuT2Efe2X1+M4"
+ + "nslwVuU 2011-11-29 21:34:27 50.63.8.215 9023 0' is not a valid "
+ + "base64-encoded 20-byte value.");
StatusEntryBuilder.createWithFingerprintBase64(
"ADQ6gCT3DiFHKPDFr3rODBUI8H=");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'ADQ6gCT3DiFHKPDFr3rODBUI8HMAAAA' in line "
+ + "'r right2privassy3 ADQ6gCT3DiFHKPDFr3rODBUI8HMAAAA Yiti+nayuT2Efe2X1"
+ + "+M4nslwVuU 2011-11-29 21:34:27 50.63.8.215 9023 0' is not a valid "
+ + "base64-encoded 20-byte value.");
StatusEntryBuilder.createWithFingerprintBase64(
"ADQ6gCT3DiFHKPDFr3rODBUI8HMAAAA");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDescriptorTooShort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'TooShort' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM TooShort 2011-11-29 21:34:27 50.63.8.215"
+ + " 9023 0' is not a valid base64-encoded 20-byte value.");
StatusEntryBuilder.createWithDescriptorBase64("TooShort");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDescriptorEndsWithEqualSign()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'ADQ6gCT3DiFHKPDFr3rODBUI8H=' in line "
+ + "'r right2privassy3 ADQ6gCT3DiFHKPDFr3rODBUI8HM "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8H= 2011-11-29 21:34:27 50.63.8.215 9023 0' "
+ + "is not a valid base64-encoded 20-byte value.");
StatusEntryBuilder.createWithDescriptorBase64(
"ADQ6gCT3DiFHKPDFr3rODBUI8H=");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDescriptorTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'Yiti+nayuT2Efe2X1+M4nslwVuUAAAA' in line "
+ + "'r right2privassy3 ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4n"
+ + "slwVuUAAAA 2011-11-29 21:34:27 50.63.8.215 9023 0' is not a valid "
+ + "base64-encoded 20-byte value.");
StatusEntryBuilder.createWithDescriptorBase64(
"Yiti+nayuT2Efe2X1+M4nslwVuUAAAA");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublished1960() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line 'r "
+ + "right2privassy3 ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4ns"
+ + "lwVuU 1960-11-29 21:34:27 50.63.8.215 9023 0'.");
StatusEntryBuilder.createWithPublishedString("1960-11-29 21:34:27");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublished9999() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line 'r "
+ + "right2privassy3 ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+"
+ + "M4nslwVuU 9999-11-29 21:34:27 50.63.8.215 9023 0'.");
StatusEntryBuilder.createWithPublishedString("9999-11-29 21:34:27");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddress256() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'256.63.8.215' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 256.63.8.215 9023 0' is not a valid IPv4 address.");
StatusEntryBuilder.createWithAddress("256.63.8.215");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddress24() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'50.63.8/24' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 50.63.8/24 9023 0' is not a valid IPv4 address.");
StatusEntryBuilder.createWithAddress("50.63.8/24");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddressV6() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'::1' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 ::1 9023 0' is not a valid IPv4 address.");
StatusEntryBuilder.createWithAddress("::1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPort66666() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'66666' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 50.63.8.215 66666 0' is not a valid port number.");
StatusEntryBuilder.createWithOrPort("66666");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPortEighty() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'eighty' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 50.63.8.215 eighty 0' is not a valid port number.");
StatusEntryBuilder.createWithOrPort("eighty");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirPortMinusOne() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'-1' in line 'r right2privassy3 ADQ6gCT3DiFHKP"
+ + "DFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 21:34:27 "
+ + "50.63.8.215 9023 -1' is not a valid port number.");
StatusEntryBuilder.createWithDirPort("-1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirPortZero() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'zero' in line 'r right2privassy3 "
+ + "ADQ6gCT3DiFHKPDFr3rODBUI8HM Yiti+nayuT2Efe2X1+M4nslwVuU 2011-11-29 "
+ + "21:34:27 50.63.8.215 9023 zero' is not a valid port number.");
StatusEntryBuilder.createWithDirPort("zero");
}
@@ -1092,8 +1354,10 @@ public class RelayNetworkStatusConsensusImplTest {
"00343A8024F70E214728F0C5AF7ACE0C1508F073").getFlags().isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTwoSLines() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Duplicate 's' line in status entry.");
StatusEntryBuilder sb = new StatusEntryBuilder();
sb.sLine = sb.sLine + "\n" + sb.sLine;
ConsensusBuilder cb = new ConsensusBuilder();
@@ -1101,8 +1365,10 @@ public class RelayNetworkStatusConsensusImplTest {
cb.buildConsensus(true);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTwoPrLines() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Duplicate 'pr' line in status entry.");
StatusEntryBuilder sb = new StatusEntryBuilder();
sb.prLine = sb.prLine + "\n" + sb.prLine;
ConsensusBuilder cb = new ConsensusBuilder();
@@ -1110,13 +1376,17 @@ public class RelayNetworkStatusConsensusImplTest {
cb.buildConsensus(true);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWLineNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'w'.");
StatusEntryBuilder.createWithWLine("w");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWLineOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'w '.");
StatusEntryBuilder.createWithWLine("w ");
}
@@ -1125,8 +1395,10 @@ public class RelayNetworkStatusConsensusImplTest {
StatusEntryBuilder.createWithWLine("w Warp=7");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTwoWLines() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Duplicate 'w' line in status entry.");
StatusEntryBuilder sb = new StatusEntryBuilder();
sb.wLine = sb.wLine + "\n" + sb.wLine;
ConsensusBuilder cb = new ConsensusBuilder();
@@ -1157,28 +1429,38 @@ public class RelayNetworkStatusConsensusImplTest {
}
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPLineNoPolicy() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'p 80'.");
StatusEntryBuilder.createWithPLine("p 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPLineNoPorts() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'p accept'.");
StatusEntryBuilder.createWithPLine("p accept");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPLineNoPolicyNoPorts() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'p '.");
StatusEntryBuilder.createWithPLine("p ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPLineProject() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'p project 80'.");
StatusEntryBuilder.createWithPLine("p project 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTwoPLines() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Duplicate 'p' line in status entry.");
StatusEntryBuilder sb = new StatusEntryBuilder();
sb.pLine = sb.pLine + "\n" + sb.pLine;
ConsensusBuilder cb = new ConsensusBuilder();
@@ -1195,9 +1477,14 @@ public class RelayNetworkStatusConsensusImplTest {
"00795A6E8D91C270FC23B30F388A495553E01894"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirectoryFooterNoLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'bandwidth-weights Wbd=285 "
+ + "Wbe=0 Wbg=0 Wbm=10000 Wdb=10000 Web=10000 Wed=1021 Wee=10000 "
+ + "Weg=1021 Wem=10000 Wgb=10000 Wgd=8694 Wgg=10000 Wgm=10000 Wmb=10000 "
+ + "Wmd=285 Wme=0 Wmg=0 Wmm=10000' in status entry.");
/* This breaks, because a bandwidth-weights line without a preceding
* directory-footer line is not allowed. */
ConsensusBuilder.createWithDirectoryFooterLine(null);
@@ -1245,16 +1532,22 @@ public class RelayNetworkStatusConsensusImplTest {
assertNotNull(consensus.getBandwidthWeights());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBandwidthWeightsLineNoEqualSign()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'bandwidth-weights Wbd-285' contains an "
+ + "illegal value in list element 'Wbd-285'.");
ConsensusBuilder.createWithBandwidthWeightsLine(
"bandwidth-weights Wbd-285");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirectorySignatureIdentityTooShort()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'directory-signature "
+ + "ED03BB616EB2F60 845CF1D0B370CA443A8579D18E7987E7E532F639'.");
DirectorySignatureBuilder.createWithIdentity("ED03BB616EB2F60");
}
@@ -1277,9 +1570,12 @@ public class RelayNetworkStatusConsensusImplTest {
DirectorySignatureBuilder.createWithSigningKey("845CF1D0B370CA");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirectorySignatureSigningKeyTooShortOddNumber()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'directory-signature "
+ + "ED03BB616EB2F60BEC80151114BB25CEF515B226 845'.");
/* We don't accept this hex string, because it contains an odd number
* of hex characters. */
DirectorySignatureBuilder.createWithSigningKey("845");
@@ -1294,8 +1590,11 @@ public class RelayNetworkStatusConsensusImplTest {
"845CF1D0B370CA443A8579D18E7987E7E532F639845CF1D0B370CA443A");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNonAsciiByte20() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'network-status-versi�n 3' in "
+ + "consensus.");
ConsensusBuilder cb = new ConsensusBuilder();
byte[] consensusBytes = cb.buildConsensusBytes();
consensusBytes[20] = (byte) 200;
@@ -1303,9 +1602,12 @@ public class RelayNetworkStatusConsensusImplTest {
new int[] { 0, consensusBytes.length }, true);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNonAsciiByteMinusOne()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line '�network-status-version 3' in consensus.");
ConsensusBuilder cb = new ConsensusBuilder();
cb.networkStatusVersionLine = "Xnetwork-status-version 3";
byte[] consensusBytes = cb.buildConsensusBytes();
@@ -1314,9 +1616,12 @@ public class RelayNetworkStatusConsensusImplTest {
new int[] { 0, consensusBytes.length }, true);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedHeaderLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in consensus.");
String unrecognizedLine = "unrecognized-line 1";
ConsensusBuilder.createWithUnrecognizedHeaderLine(unrecognizedLine,
true);
@@ -1333,9 +1638,12 @@ public class RelayNetworkStatusConsensusImplTest {
assertEquals(unrecognizedLines, consensus.getUnrecognizedLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedDirSourceLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in dir-source entry.");
String unrecognizedLine = "unrecognized-line 1";
ConsensusBuilder.createWithUnrecognizedDirSourceLine(unrecognizedLine,
true);
@@ -1352,9 +1660,12 @@ public class RelayNetworkStatusConsensusImplTest {
assertEquals(unrecognizedLines, consensus.getUnrecognizedLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedStatusEntryLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'unrecognized-line 1' in "
+ + "status entry.");
String unrecognizedLine = "unrecognized-line 1";
ConsensusBuilder.createWithUnrecognizedStatusEntryLine(
unrecognizedLine, true);
@@ -1371,9 +1682,12 @@ public class RelayNetworkStatusConsensusImplTest {
assertEquals(unrecognizedLines, consensus.getUnrecognizedLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedDirectoryFooterLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in consensus.");
String unrecognizedLine = "unrecognized-line 1";
ConsensusBuilder.createWithUnrecognizedFooterLine(unrecognizedLine,
true);
@@ -1390,9 +1704,12 @@ public class RelayNetworkStatusConsensusImplTest {
assertEquals(unrecognizedLines, consensus.getUnrecognizedLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedDirectorySignatureLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in dir-source entry.");
String unrecognizedLine = "unrecognized-line 1";
ConsensusBuilder.createWithUnrecognizedDirectorySignatureLine(
unrecognizedLine, true);
diff --git a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java
index d0ff7fb..efca978 100644
--- a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java
@@ -7,10 +7,15 @@ import static org.junit.Assert.assertEquals;
import org.torproject.descriptor.DescriptorParseException;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
public class RelayNetworkStatusImplTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
private static final String validAnnotation = "@type network-status-2 1.0\n";
private static final String validHeader = "network-status-version 2\n"
@@ -36,8 +41,10 @@ public class RelayNetworkStatusImplTest {
private static final String validStatus =
validAnnotation + validHeader + validFooter;
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testParseBrokenHeader() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'xyx' in v2 network status.");
String invalidHeader = "network-status-version 2\nxyx\nabc";
byte[] statusBytes = (validAnnotation + invalidHeader + validFooter)
.getBytes();
diff --git a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
index aa7ff4a..1997c46 100644
--- a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
@@ -11,7 +11,9 @@ import org.torproject.descriptor.DescriptorParseException;
import org.torproject.descriptor.DirectorySignature;
import org.torproject.descriptor.RelayNetworkStatusVote;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -26,6 +28,9 @@ import java.util.TreeSet;
* in the directory header. */
public class RelayNetworkStatusVoteImplTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
/* Helper class to build a vote based on default data and modifications
* requested by test methods. */
private static class VoteBuilder {
@@ -745,22 +750,29 @@ public class RelayNetworkStatusVoteImplTest {
assertTrue(vote.getUnrecognizedLines().isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNoLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'network-status-version' must be "
+ + "contained in the first line.");
VoteBuilder.createWithNetworkStatusVersionLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNewLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Blank lines are not allowed.");
VoteBuilder.createWithNetworkStatusVersionLine(
"network-status-version 3\n");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNewLineSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal keyword in line ' '.");
VoteBuilder.createWithNetworkStatusVersionLine(
"network-status-version 3\n ");
}
@@ -772,72 +784,102 @@ public class RelayNetworkStatusVoteImplTest {
"@vote\nnetwork-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionPrefixLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'directory-footer' in vote.");
VoteBuilder.createWithNetworkStatusVersionLine(
"directory-footer\nnetwork-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionPrefixLinePoundChar()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line '#vote' in vote.");
VoteBuilder.createWithNetworkStatusVersionLine(
"#vote\nnetwork-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number "
+ + "in line 'network-status-version'.");
VoteBuilder.createWithNetworkStatusVersionLine(
"network-status-version");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionOneSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in "
+ + "line 'network-status-version '.");
VoteBuilder.createWithNetworkStatusVersionLine(
"network-status-version ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersion42()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in line "
+ + "'network-status-version 42'.");
VoteBuilder.createWithNetworkStatusVersionLine(
"network-status-version 42");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionFourtyTwo()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal network status version number in line "
+ + "'network-status-version FourtyTwo'.");
VoteBuilder.createWithNetworkStatusVersionLine(
"network-status-version FourtyTwo");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'vote-status' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithVoteStatusLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNetworkStatusVersionSpaceBefore()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal keyword in line ' network-status-version 3'.");
VoteBuilder.createWithNetworkStatusVersionLine(
" network-status-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusSpaceBefore() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal keyword in line ' vote-status vote'.");
VoteBuilder.createWithVoteStatusLine(" vote-status vote");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Line 'vote-status' indicates that this is not a vote.");
VoteBuilder.createWithVoteStatusLine("vote-status");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Line 'vote-status ' indicates that this is not a vote.");
VoteBuilder.createWithVoteStatusLine("vote-status ");
}
@@ -847,14 +889,20 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithVoteStatusLine("vote-status vote ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusConsensus() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'vote-status consensus' indicates that "
+ + "this is not a vote.");
VoteBuilder.createWithVoteStatusLine("vote-status consensus");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVoteStatusTheMagicVoteStatus()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'vote-status TheMagicVoteStatus' "
+ + "indicates that this is not a vote.");
VoteBuilder.createWithVoteStatusLine(
"vote-status TheMagicVoteStatus");
}
@@ -867,140 +915,208 @@ public class RelayNetworkStatusVoteImplTest {
assertNull(vote.getConsensusMethods());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'consensus-methods' in vote.");
VoteBuilder.createWithConsensusMethodsLine("consensus-methods");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodOneSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'consensus-methods ' in vote.");
VoteBuilder.createWithConsensusMethodsLine("consensus-methods ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodEleven()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal consensus method number in line "
+ + "'consensus-methods eleven'.");
VoteBuilder.createWithConsensusMethodsLine(
"consensus-methods eleven");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodMinusOne()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal consensus method number in line "
+ + "'consensus-methods -1'.");
VoteBuilder.createWithConsensusMethodsLine("consensus-methods -1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodNinePeriod()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal consensus method number in line "
+ + "'consensus-methods 99999999999999999999999999999999999999999"
+ + "9999999999999999999'.");
VoteBuilder.createWithConsensusMethodsLine("consensus-methods "
+ "999999999999999999999999999999999999999999999999999999999999");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testConsensusMethodTwoLines()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'consensus-method 1' in vote.");
VoteBuilder.createWithConsensusMethodsLine(
"consensus-method 1\nconsensus-method 1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublishedNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'published' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithPublishedLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'valid-after' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithValidAfterLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'valid-after' does not contain a "
+ + "timestamp at the expected position.");
VoteBuilder.createWithValidAfterLine("valid-after");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'valid-after ' does not contain a "
+ + "timestamp at the expected position.");
VoteBuilder.createWithValidAfterLine("valid-after ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterLongAgo() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line 'valid-after "
+ + "long ago'.");
VoteBuilder.createWithValidAfterLine("valid-after long ago");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidAfterFeb30() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'valid-after 2011-02-30 09:00:00'.");
VoteBuilder.createWithValidAfterLine(
"valid-after 2011-02-30 09:00:00");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFreshUntilNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'fresh-until' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithFreshUntilLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFreshUntilAroundTen() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'fresh-until 2011-11-30 around ten'.");
VoteBuilder.createWithFreshUntilLine(
"fresh-until 2011-11-30 around ten");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testValidUntilTomorrowMorning()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line 'valid-until "
+ + "tomorrow morning'.");
VoteBuilder.createWithValidUntilLine(
"valid-until tomorrow morning");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'voting-delay' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithVotingDelayLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line 'voting-delay'.");
VoteBuilder.createWithVotingDelayLine("voting-delay");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Wrong number of values in line 'voting-delay '.");
VoteBuilder.createWithVotingDelayLine("voting-delay ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayTriple() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Wrong number of values in line 'voting-delay 300 300 300'.");
VoteBuilder.createWithVotingDelayLine(
"voting-delay 300 300 300");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelaySingle() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Wrong number of values in line 'voting-delay 300'.");
VoteBuilder.createWithVotingDelayLine("voting-delay 300");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testVotingDelayOneTwo() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal values in line 'voting-delay one two'.");
VoteBuilder.createWithVotingDelayLine("voting-delay one two");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testClientVersionsComma() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal versions line 'client-versions ,'.");
VoteBuilder.createWithClientVersionsLine("client-versions ,");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testClientVersionsCommaVersion()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal versions line 'client-versions ,0.2.2.34'.");
VoteBuilder.createWithClientVersionsLine(
"client-versions ,0.2.2.34");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRecommendedClientProtocols21()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Invalid line 'recommended-client-protocols Cons=2-1'.");
VoteBuilder.createWithRecommendedClientProtocolsLine(
"recommended-client-protocols Cons=2-1");
}
@@ -1015,16 +1131,22 @@ public class RelayNetworkStatusVoteImplTest {
vote.getRecommendedRelayProtocols().get("Cons"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRequiredClientProtocols1Max()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Invalid line 'recommended-client-protocols Cons=1-4294967296'.");
VoteBuilder.createWithRequiredClientProtocolsLine(
"recommended-client-protocols Cons=1-4294967296");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRequiredRelayProtocolsMinus1()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Invalid line 'recommended-client-protocols Cons=-1'.");
VoteBuilder.createWithRequiredRelayProtocolsLine(
"recommended-client-protocols Cons=-1");
}
@@ -1059,24 +1181,34 @@ public class RelayNetworkStatusVoteImplTest {
}
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPackageIncomplete() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line "
+ + "'package shouldbesecond 0 http'.");
String packageLine = "package shouldbesecond 0 http";
ConsensusBuilder.createWithPackageLines(packageLine);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testKnownFlagsNoLine() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'known-flags' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithKnownFlagsLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testKnownFlagsNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("No known flags in line 'known-flags'.");
VoteBuilder.createWithKnownFlagsLine("known-flags");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testKnownFlagsOneSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("No known flags in line 'known-flags '.");
VoteBuilder.createWithKnownFlagsLine("known-flags ");
}
@@ -1126,45 +1258,63 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(0, vote.getEnoughMtbfInfo());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFlagThresholdsNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("No flag thresholds in line 'flag-thresholds'.");
VoteBuilder.createWithFlagThresholdsLine("flag-thresholds");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFlagThresholdsOneSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("No flag thresholds in line 'flag-thresholds '.");
VoteBuilder.createWithFlagThresholdsLine("flag-thresholds ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFlagThresholdDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'flag-thresholds' is contained 2 "
+ + "times, but must be contained at most once.");
VoteBuilder vb = new VoteBuilder();
vb.flagThresholdsLine = vb.flagThresholdsLine + "\n"
+ vb.flagThresholdsLine;
vb.buildVote(true);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dir-source 80550987E1D626E3EBA5E"
+ + "5E75A458DE0626D088C 208.83.223.34 208.83.223.34 443 80' in vote.");
VoteBuilder.createWithDirSourceLine("dir-source "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'dir-source "
+ + "urrassssssssssssssssssssssssssssssssssssssssssssssss 80550987E1D626"
+ + "E3EBA5E5E75A458DE0626D088C 208.83.223.34 208.83.223.34 443 80'.");
VoteBuilder.createWithDirSourceLine("dir-source "
+ "urrassssssssssssssssssssssssssssssssssssssssssssssss "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameIllegalCharacters()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'dir-source urra$ "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ + "208.83.223.34 443 80'.");
VoteBuilder.createWithDirSourceLine("dir-source urra$ "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 443 80");
@@ -1177,31 +1327,46 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooShort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D 208.83.223.34 208.83.223.34 "
+ + "443 80'.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D 208.83.223.34 "
+ "208.83.223.34 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C8055 208.83.223.34 "
+ + "208.83.223.34 443 80'.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C8055 208.83.223.34 "
+ "208.83.223.34 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintIllegalCharacters()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'dir-source urras "
+ + "ABCDEFGHIJKLM6E3EBA5E5E75A458DE0626D088C 208.83.223.34 208.83.223.34"
+ + " 443 80'.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "ABCDEFGHIJKLM6E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dir-source urras "
+ + "208.83.223.34 208.83.223.34 443 80' in vote.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ " 208.83.223.34 208.83.223.34 443 80");
}
@@ -1217,41 +1382,61 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals("256.256.256.256", vote.getHostname());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testHostnameMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 443 80' "
+ + "in vote.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 443 "
+ "80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddress256()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'256.256.256.256' in line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 256.256.256."
+ + "256 443 80' is not a valid IPv4 address.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "256.256.256.256 443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddressMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ + "443 80' in vote.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 443 "
+ "80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirPortMinus443()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'-443' in line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ + "208.83.223.34 -443 80' is not a valid port number.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 -443 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirPortFourFourThree()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'four-four-three' in line 'dir-source urras "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 208.83.223.34"
+ + " four-four-three 80' is not a valid port number.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 four-four-three 80");
@@ -1266,8 +1451,11 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 0 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPortMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'dir-source urras 80550987E1D626E3E"
+ + "BA5E5E75A458DE0626D088C 208.83.223.34 208.83.223.34 443 ' in vote.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 443 ");
@@ -1283,15 +1471,21 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 80 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceLineMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-source' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithDirSourceLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSourceLineDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-source' is contained 2 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 "
+ "208.83.223.34 443 80\ndir-source urras "
@@ -1305,24 +1499,33 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithContactLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testContactLineDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'contact' is contained 2 times, "
+ + "but must be contained at most once.");
VoteBuilder.createWithContactLine("contact 4096R/E012B42D Jacob "
+ "Appelbaum <jacob(a)appelbaum.net>\ncontact 4096R/E012B42D Jacob "
+ "Appelbaum <jacob(a)appelbaum.net>");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testSharedRandParticipateLineDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'shared-rand-participate' is contained "
+ + "2 times, but must be contained at most once.");
VoteBuilder.createWithSharedRandParticipateLine("shared-rand-participate\n"
+ "shared-rand-participate");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testSharedRandParticipateLineArg()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Illegal line 'shared-rand-participate 1' in vote.");
VoteBuilder.createWithSharedRandParticipateLine(
"shared-rand-participate 1");
}
@@ -1334,17 +1537,23 @@ public class RelayNetworkStatusVoteImplTest {
assertNull(vote.getSharedRandCommitLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testSharedRandPreviousValueBeforeNumReveals()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'shared-rand-previous-value "
+ + "grwbnD6I40odtsdtWYxqs0DvPweCur6qG2Fo5p5ivS4= 8' in vote.");
VoteBuilder.createWithSharedRandPreviousValueLine(
"shared-rand-previous-value "
+ "grwbnD6I40odtsdtWYxqs0DvPweCur6qG2Fo5p5ivS4= 8");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testSharedRandCurrentNoNumReveals()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'shared-rand-current-value "
+ + "D88plxd8YeLfCIVAR9gjiFlWB1WqpC53kWr350o1pzw=' in vote.");
VoteBuilder.createWithSharedRandCurrentValueLine(
"shared-rand-current-value "
+ "D88plxd8YeLfCIVAR9gjiFlWB1WqpC53kWr350o1pzw=");
@@ -1358,102 +1567,146 @@ public class RelayNetworkStatusVoteImplTest {
vote.getLegacyDirKey());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testLegacyDirKeyLineNoId() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'legacy-dir-key '.");
VoteBuilder.createWithLegacyDirKeyLine("legacy-dir-key ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyCertificateVersionLineMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-key-certificate-version' is "
+ + "contained 0 times, but must be contained exactly once.");
VoteBuilder.createWithDirKeyCertificateVersionLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyCertificateVersionLineDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-key-certificate-version' is "
+ + "contained 2 times, but must be contained exactly once.");
VoteBuilder.createWithDirKeyCertificateVersionLine(
"dir-key-certificate-version 3\ndir-key-certificate-version 3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintLineMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'fingerprint' is contained 0 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithFingerprintLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintLineDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'fingerprint' is contained 2 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithFingerprintLine("fingerprint "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C\nfingerprint "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintLineTooLong()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'fingerprint "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D088C8055'.");
VoteBuilder.createWithFingerprintLine("fingerprint "
+ "80550987E1D626E3EBA5E5E75A458DE0626D088C8055");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintLineTooShort()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'fingerprint "
+ + "80550987E1D626E3EBA5E5E75A458DE0626D'.");
VoteBuilder.createWithFingerprintLine("fingerprint "
+ "80550987E1D626E3EBA5E5E75A458DE0626D");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyPublished3011()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'dir-key-published 3011-04-27 05:34:37'.");
VoteBuilder.createWithDirKeyPublishedLine("dir-key-published "
+ "3011-04-27 05:34:37");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyPublishedRecentlyAtNoon()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'dir-key-published recently 12:00:00'.");
VoteBuilder.createWithDirKeyPublishedLine("dir-key-published "
+ "recently 12:00:00");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyPublishedRecentlyNoTime()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'dir-key-published recently' does not "
+ + "contain a timestamp at the expected position.");
VoteBuilder.createWithDirKeyPublishedLine("dir-key-published "
+ "recently");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyExpiresSoonAtNoon()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal timestamp format in line 'dir-key-expires soon 12:00:00'.");
VoteBuilder.createWithDirKeyExpiresLine("dir-key-expires "
+ "soon 12:00:00");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyExpiresLineMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-key-expires' is contained 0 times,"
+ + " but must be contained exactly once.");
VoteBuilder.createWithDirKeyExpiresLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyExpiresLineDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-key-expires' is contained 2 times, "
+ + "but must be contained exactly once.");
VoteBuilder.createWithDirKeyExpiresLine("dir-key-expires 2012-04-27 "
+ "05:34:37\ndir-key-expires 2012-04-27 05:34:37");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirIdentityKeyLinesMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-identity-key' is contained 0 times,"
+ + " but must be contained exactly once.");
VoteBuilder.createWithDirIdentityKeyLines(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirSigningKeyLinesMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-signing-key' is contained 0"
+ + " times, but must be contained exactly once.");
VoteBuilder.createWithDirSigningKeyLines(null);
}
@@ -1463,9 +1716,12 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithDirKeyCrosscertLines(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirKeyCertificationLinesMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'dir-key-certification' is contained "
+ + "0 times, but must be contained exactly once.");
VoteBuilder.createWithDirKeyCertificationLines(null);
}
@@ -1475,9 +1731,12 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithDirectoryFooterLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirectorySignaturesLinesMissing()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'directory-signature' is contained 0 "
+ + "times, but must be contained at least once.");
VoteBuilder.createWithDirectorySignatureLines(null);
}
@@ -1538,9 +1797,12 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(2, vote.getSignatures().size());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedHeaderLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in vote.");
String unrecognizedLine = "unrecognized-line 1";
VoteBuilder.createWithUnrecognizedHeaderLine(unrecognizedLine, true);
}
@@ -1556,9 +1818,12 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(unrecognizedLines, vote.getUnrecognizedLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedDirSourceLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in vote.");
String unrecognizedLine = "unrecognized-line 1";
VoteBuilder.createWithUnrecognizedDirSourceLine(unrecognizedLine,
true);
@@ -1575,9 +1840,12 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(unrecognizedLines, vote.getUnrecognizedLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedFooterLineFail()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Unrecognized line 'unrecognized-line 1' in vote.");
String unrecognizedLine = "unrecognized-line 1";
VoteBuilder.createWithUnrecognizedFooterLine(unrecognizedLine, true);
}
@@ -1624,9 +1892,11 @@ public class RelayNetworkStatusVoteImplTest {
vote.getStatusEntry(fingerprint).getMasterKeyEd25519());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIdRsa1024None()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'id rsa1024 none'.");
List<String> statusEntries = new ArrayList<>();
statusEntries.add("r MathematicalApology AAPJIrV9nhfgTYQs0vsTghFaP2A "
+ "uA7p0m68O8ILXsf3aLZUj0EvDNE 2015-12-01 18:01:49 172.99.69.177 "
diff --git a/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java b/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
index 7a765d4..70a25a0 100644
--- a/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
@@ -14,7 +14,9 @@ import org.torproject.descriptor.BridgeServerDescriptor;
import org.torproject.descriptor.DescriptorParseException;
import org.torproject.descriptor.ServerDescriptor;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -27,6 +29,9 @@ import java.util.TreeSet;
/* Test parsing of relay server descriptors. */
public class ServerDescriptorImplTest {
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
/* Helper class to build a descriptor based on default data and
* modifications requested by test methods. */
private static class DescriptorBuilder {
@@ -500,8 +505,11 @@ public class ServerDescriptorImplTest {
descriptor.getDigestSha256Base64());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRouterLineMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'router' is contained 0 times, but "
+ + "must be contained exactly once.");
DescriptorBuilder.createWithRouterLine(null);
}
@@ -517,27 +525,39 @@ public class ServerDescriptorImplTest {
assertEquals(0, (int) descriptor.getDirPort());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRouterLinePrecedingHibernatingLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'router' must be contained in "
+ + "the first line.");
DescriptorBuilder.createWithRouterLine("hibernating 1\nrouter "
+ "saberrider2008 94.134.192.243 9001 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'router 94.134.192.243 9001 0 0' "
+ + "in server descriptor.");
DescriptorBuilder.createWithRouterLine("router 94.134.192.243 9001 "
+ "0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameInvalidChar() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line "
+ + "'router $aberrider2008 94.134.192.243 9001 0 0'.");
DescriptorBuilder.createWithRouterLine("router $aberrider2008 "
+ "94.134.192.243 9001 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNicknameTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'router "
+ + "saberrider2008ReallyLongNickname 94.134.192.243 9001 0 0'.");
DescriptorBuilder.createWithRouterLine("router "
+ "saberrider2008ReallyLongNickname 94.134.192.243 9001 0 0");
}
@@ -551,50 +571,74 @@ public class ServerDescriptorImplTest {
assertEquals("94.134.192.243", descriptor.getAddress());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddress24() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'94.134.192/24' in line 'router saberrider2008 "
+ + "94.134.192/24 9001 0 0' is not a valid IPv4 address.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "94.134.192/24 9001 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddress294() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'294.134.192.243' in line 'router "
+ + "saberrider2008 294.134.192.243 9001 0 0' is not a valid "
+ + "IPv4 address.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "294.134.192.243 9001 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAddressMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal line 'router saberrider2008 9001 0 0' in server descriptor.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 9001 "
+ "0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPort99001() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'99001' in line 'router saberrider2008 "
+ + "94.134.192.243 99001 0 0' is not a valid port number.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "94.134.192.243 99001 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPortMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'router saberrider2008 "
+ + "94.134.192.243 0 0' in server descriptor.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "94.134.192.243 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPortOne() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'one' in line 'router saberrider2008 "
+ + "94.134.192.243 one 0 0' is not a valid port number.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "94.134.192.243 one 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOrPortNewline() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal keyword in line ' 0 0'.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "94.134.192.243 0\n 0 0");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testDirPortMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'router saberrider2008 "
+ + "94.134.192.243 9001 0 ' in server descriptor.");
DescriptorBuilder.createWithRouterLine("router saberrider2008 "
+ "94.134.192.243 9001 0 ");
}
@@ -649,15 +693,20 @@ public class ServerDescriptorImplTest {
descriptor.getCircuitProtocolVersions());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testProtocolsAb() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Illegal line 'opt protocols Link A B Circuit 1'.");
DescriptorBuilder.createWithProtocolsLine("opt protocols Link A B "
+ "Circuit 1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testProtocolsNoCircuitVersions()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'opt protocols Link 1 2'.");
DescriptorBuilder.createWithProtocolsLine("opt protocols Link 1 2");
}
@@ -671,13 +720,18 @@ public class ServerDescriptorImplTest {
descriptor.getProtocols().get("Purple"));
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testProtoInvalid() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid line 'proto Invalid=1+2+3'.");
DescriptorBuilder.createWithProtoLine("proto Invalid=1+2+3");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublishedMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'published' is contained 0 times, "
+ + "but must be contained exactly once.");
DescriptorBuilder.createWithPublishedLine(null);
}
@@ -688,26 +742,38 @@ public class ServerDescriptorImplTest {
assertEquals(1325390599000L, descriptor.getPublishedMillis());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublished2039() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal timestamp format in line 'published 2039-01-01 04:03:19'.");
DescriptorBuilder.createWithPublishedLine("published 2039-01-01 "
+ "04:03:19");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublished1912() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'published 1912-01-01 04:03:19'.");
DescriptorBuilder.createWithPublishedLine("published 1912-01-01 "
+ "04:03:19");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublishedFeb31() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'published 2012-02-31 04:03:19'.");
DescriptorBuilder.createWithPublishedLine("published 2012-02-31 "
+ "04:03:19");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testPublishedNoTime() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Line 'published 2012-01-01' does not contain "
+ + "a timestamp at the expected position.");
DescriptorBuilder.createWithPublishedLine("published 2012-01-01");
}
@@ -727,26 +793,38 @@ public class ServerDescriptorImplTest {
descriptor.getFingerprint());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintG() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'opt fingerprint "
+ + "G873 3048 FC8E C910 2466 AD8F 3098 622B F1BF 71FD'.");
DescriptorBuilder.createWithFingerprintLine("opt fingerprint G873 "
+ "3048 FC8E C910 2466 AD8F 3098 622B F1BF 71FD");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooShort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'opt fingerprint D873 3048 FC8E "
+ + "C910 2466 AD8F 3098 622B F1BF'.");
DescriptorBuilder.createWithFingerprintLine("opt fingerprint D873 "
+ "3048 FC8E C910 2466 AD8F 3098 622B F1BF");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintTooLong() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'opt fingerprint D873 3048 "
+ + "FC8E C910 2466 AD8F 3098 622B F1BF 71FD D873'.");
DescriptorBuilder.createWithFingerprintLine("opt fingerprint D873 "
+ "3048 FC8E C910 2466 AD8F 3098 622B F1BF 71FD D873");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFingerprintNoSpaces() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'opt fingerprint "
+ + "D8733048FC8EC9102466AD8F3098622BF1BF71FD'.");
DescriptorBuilder.createWithFingerprintLine("opt fingerprint "
+ "D8733048FC8EC9102466AD8F3098622BF1BF71FD");
}
@@ -765,8 +843,10 @@ public class ServerDescriptorImplTest {
assertEquals(48, descriptor.getUptime().longValue());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUptimeFourtyEight() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal value in line 'uptime fourty-eight'.");
DescriptorBuilder.createWithUptimeLine("uptime fourty-eight");
}
@@ -775,18 +855,24 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithUptimeLine("uptime -1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUptimeSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line 'uptime '.");
DescriptorBuilder.createWithUptimeLine("uptime ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUptimeNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line 'uptime'.");
DescriptorBuilder.createWithUptimeLine("uptime");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUptimeFourEight() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line 'uptime 4 8'.");
DescriptorBuilder.createWithUptimeLine("uptime 4 8");
}
@@ -799,13 +885,19 @@ public class ServerDescriptorImplTest {
assertEquals(53470, (int) descriptor.getBandwidthObserved());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBandwidthMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'bandwidth' is contained 0 times, "
+ + "but must be contained exactly once.");
DescriptorBuilder.createWithBandwidthLine(null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBandwidthOneValue() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Wrong number of values in line 'bandwidth 51200'.");
DescriptorBuilder.createWithBandwidthLine("bandwidth 51200");
}
@@ -821,15 +913,20 @@ public class ServerDescriptorImplTest {
assertEquals(-1, (int) descriptor.getBandwidthObserved());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBandwidthFourValues() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Wrong number of values in line "
+ + "'bandwidth 51200 51200 53470 53470'.");
DescriptorBuilder.createWithBandwidthLine("bandwidth 51200 51200 "
+ "53470 53470");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testBandwidthMinusOneTwoThree()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal values in line 'bandwidth -1 -2 -3'.");
DescriptorBuilder.createWithBandwidthLine("bandwidth -1 -2 -3");
}
@@ -842,23 +939,31 @@ public class ServerDescriptorImplTest {
descriptor.getExtraInfoDigestSha1Hex());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExtraInfoDigestNoSpace()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'opt extra-info-digest'.");
DescriptorBuilder.createWithExtraInfoDigestLine("opt "
+ "extra-info-digest");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExtraInfoDigestTooShort()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'opt "
+ + "extra-info-digest 1469D1550738A25B1E7B47CDDBCD7B2899F5'.");
DescriptorBuilder.createWithExtraInfoDigestLine("opt "
+ "extra-info-digest 1469D1550738A25B1E7B47CDDBCD7B2899F5");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExtraInfoDigestTooLong()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal hex string in line 'opt "
+ + "extra-info-digest 1469D1550738A25B1E7B47CDDBCD7B2899F51B741469'.");
DescriptorBuilder.createWithExtraInfoDigestLine("opt "
+ "extra-info-digest "
+ "1469D1550738A25B1E7B47CDDBCD7B2899F51B741469");
@@ -947,8 +1052,11 @@ public class ServerDescriptorImplTest {
assertEquals("Random Person", descriptor.getContact());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testContactDuplicate() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'contact' is contained 2 times, "
+ + "but must be contained at most once.");
DescriptorBuilder.createWithContactLine("contact Random "
+ "Person\ncontact Random Person");
}
@@ -992,8 +1100,11 @@ public class ServerDescriptorImplTest {
descriptor.getExitPolicyLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitPolicyNoPort() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'*' in line 'reject *' must contain address "
+ + "and port.");
DescriptorBuilder.createWithExitPolicyLines("reject *");
}
@@ -1006,25 +1117,37 @@ public class ServerDescriptorImplTest {
"reject *:*"}), descriptor.getExitPolicyLines());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitPolicyReject321() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'123.123.123.321' in line 'reject "
+ + "123.123.123.321:80' is not a valid IPv4 address.");
DescriptorBuilder.createWithExitPolicyLines("reject "
+ "123.123.123.321:80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitPolicyRejectPort66666()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("'66666' in line 'reject *:66666' "
+ + "is not a valid port number.");
DescriptorBuilder.createWithExitPolicyLines("reject *:66666");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitPolicyProjectAll() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'project *:*' in server descriptor.");
DescriptorBuilder.createWithExitPolicyLines("project *:*");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testExitPolicyMissing() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Either keyword 'accept' or 'reject' must be "
+ + "contained at least once.");
DescriptorBuilder.createWithExitPolicyLines(null);
}
@@ -1048,9 +1171,12 @@ public class ServerDescriptorImplTest {
+ "-----END SIGNATURE----");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testRouterSignatureNotLastLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'contact' is contained 2 times, "
+ + "but must be contained at most once.");
DescriptorBuilder.createWithRouterSignatureLines("router-signature\n"
+ "-----BEGIN SIGNATURE-----\n"
+ "o4j+kH8UQfjBwepUnr99v0ebN8RpzHJ/lqYsTojXHy9kMr1RNI9IDeSzA7PSqT"
@@ -1080,13 +1206,17 @@ public class ServerDescriptorImplTest {
assertTrue(descriptor.isHibernating());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testHibernatingYep() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'hibernating yep'.");
DescriptorBuilder.createWithHibernatingLine("hibernating yep");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testHibernatingNoSpace() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'hibernating'.");
DescriptorBuilder.createWithHibernatingLine("hibernating");
}
@@ -1116,20 +1246,29 @@ public class ServerDescriptorImplTest {
descriptor.getFamilyEntries());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFamilyDuplicate() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'family' is contained 2 times, "
+ + "but must be contained at most once.");
DescriptorBuilder.createWithFamilyLine("family "
+ "saberrider2008\nfamily saberrider2008");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFamilyNicknamePrefix() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Illegal hex string in line 'family $saberrider2008'.");
DescriptorBuilder.createWithFamilyLine("family $saberrider2008");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testFamilyFingerprintNoPrefix()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal nickname in line 'family "
+ + "D8733048FC8EC9102466AD8F3098622BF1BF71FD'.");
DescriptorBuilder.createWithFamilyLine("family "
+ "D8733048FC8EC9102466AD8F3098622BF1BF71FD");
}
@@ -1185,43 +1324,64 @@ public class ServerDescriptorImplTest {
assertNotNull(descriptor.getWriteHistory());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistory3012() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'write-history 3012-01-01 03:51:44 (900 s) "
+ + "4345856,261120,7591936,1748992'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "3012-01-01 03:51:44 (900 s) 4345856,261120,7591936,1748992");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryNoSeconds()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal timestamp format in line "
+ + "'write-history 2012-01-01 03:51 (900 s) 4345856,261120,"
+ + "7591936,1748992'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-01-01 03:51 (900 s) 4345856,261120,7591936,1748992");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryNoParathenses()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line 'write-history "
+ + "2012-01-01 03:51:44 900 s 4345856,261120,7591936,1748992'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-01-01 03:51:44 900 s 4345856,261120,7591936,1748992");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryNoSpaceSeconds()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line "
+ + "'write-history 2012-01-01 03:51:44 (900s) "
+ + "4345856,261120,7591936,1748992'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-01-01 03:51:44 (900s) 4345856,261120,7591936,1748992");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryTrailingComma()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line 'write-history "
+ + "2012-01-01 03:51:44 (900 s) 4345856,261120,7591936,'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-01-01 03:51:44 (900 s) 4345856,261120,7591936,");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryOneTwoThree()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line 'write-history "
+ + "2012-01-01 03:51:44 (900 s) one,two,three'.");
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-01-01 03:51:44 (900 s) one,two,three");
}
@@ -1250,8 +1410,11 @@ public class ServerDescriptorImplTest {
.isEmpty());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testWriteHistoryNoS() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Invalid bandwidth-history line "
+ + "'write-history 2012-01-01 03:51:44 (900 '.");
DescriptorBuilder.createWithWriteHistoryLine(
"write-history 2012-01-01 03:51:44 (900 ");
}
@@ -1324,13 +1487,17 @@ public class ServerDescriptorImplTest {
assertFalse(descriptor.getUsesEnhancedDnsLogic());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEventdnsTrue() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'eventdns true'.");
DescriptorBuilder.createWithEventdnsLine("eventdns true");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEventdnsNo() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'eventdns no'.");
DescriptorBuilder.createWithEventdnsLine("eventdns no");
}
@@ -1349,8 +1516,10 @@ public class ServerDescriptorImplTest {
assertTrue(descriptor.getCachesExtraInfo());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testCachesExtraInfoTrue() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'caches-extra-info true'.");
DescriptorBuilder.createWithCachesExtraInfoLine("caches-extra-info "
+ "true");
}
@@ -1371,16 +1540,22 @@ public class ServerDescriptorImplTest {
assertTrue(descriptor.getAllowSingleHopExits());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAllowSingleHopExitsTrue()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'allow-single-hop-exits true'.");
DescriptorBuilder.createWithAllowSingleHopExitsLine(
"allow-single-hop-exits true");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testAllowSingleHopExitsNonAsciiKeyword()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized character in keyword "
+ + "'�allow-single-hop-exits' in line "
+ + "'�allow-single-hop-exits'.");
DescriptorBuilder.createWithNonAsciiLineBytes(new byte[] {
0x14, (byte) 0xfe, 0x18, // non-ascii chars
0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x2d, // "allow-"
@@ -1398,32 +1573,43 @@ public class ServerDescriptorImplTest {
assertEquals("80,1194,1220,1293", descriptor.getIpv6PortList());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIpv6PolicyLineNoPolicy()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'ipv6-policy 80'.");
DescriptorBuilder.createWithIpv6PolicyLine("ipv6-policy 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIpv6PolicyLineNoPorts()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'ipv6-policy accept'.");
DescriptorBuilder.createWithIpv6PolicyLine("ipv6-policy accept");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIpv6PolicyLineNoPolicyNoPorts()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'ipv6-policy '.");
DescriptorBuilder.createWithIpv6PolicyLine("ipv6-policy ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testIpv6PolicyLineProject()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'ipv6-policy project 80'.");
DescriptorBuilder.createWithIpv6PolicyLine("ipv6-policy project 80");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTwoIpv6PolicyLines() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'ipv6-policy' is contained 2 times, "
+ + "but must be contained at most once.");
DescriptorBuilder.createWithIpv6PolicyLine(
"ipv6-policy accept 80,1194,1220,1293\n"
+ "ipv6-policy accept 80,1194,1220,1293");
@@ -1448,22 +1634,30 @@ public class ServerDescriptorImplTest {
descriptor.getNtorOnionKey());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNtorOnionKeyLineNoKey()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'ntor-onion-key '.");
DescriptorBuilder.createWithNtorOnionKeyLine("ntor-onion-key ");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNtorOnionKeyLineTwoKeys()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'ntor-onion-key Y/XgaHcPIJVa"
+ + "4D55kir9QLH8rEYAaLXuv3c3sm8jYhY Y/XgaHcPIJVa4D55kir9QLH8rEYAa"
+ + "LXuv3c3sm8jYhY'.");
DescriptorBuilder.createWithNtorOnionKeyLine("ntor-onion-key "
+ "Y/XgaHcPIJVa4D55kir9QLH8rEYAaLXuv3c3sm8jYhY "
+ "Y/XgaHcPIJVa4D55kir9QLH8rEYAaLXuv3c3sm8jYhY");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTwoNtorOnionKeyLines() throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Blank lines are not allowed.");
DescriptorBuilder.createWithNtorOnionKeyLine("ntor-onion-key "
+ "Y/XgaHcPIJVa4D55kir9QLH8rEYAaLXuv3c3sm8jYhY\nntor-onion-key "
+ "Y/XgaHcPIJVa4D55kir9QLH8rEYAaLXuv3c3sm8jYhY\n");
@@ -1485,31 +1679,42 @@ public class ServerDescriptorImplTest {
assertFalse(descriptor.getTunnelledDirServer());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTunnelledDirServerTypo()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'tunneled-dir-server' "
+ + "in server descriptor.");
DescriptorBuilder.createWithTunnelledDirServerLine(
"tunneled-dir-server");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTunnelledDirServerTwice()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'tunnelled-dir-server' is contained "
+ + "2 times, but must be contained at most once.");
DescriptorBuilder.createWithTunnelledDirServerLine(
"tunnelled-dir-server\ntunnelled-dir-server");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testTunnelledDirServerArgs()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Illegal line 'tunnelled-dir-server 1'.");
DescriptorBuilder.createWithTunnelledDirServerLine(
"tunnelled-dir-server 1");
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testUnrecognizedLineFail()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage(
+ "Unrecognized line 'unrecognized-line 1' in server descriptor.");
DescriptorBuilder.createWithUnrecognizedLine(unrecognizedLine, true);
}
@@ -1598,9 +1803,12 @@ public class ServerDescriptorImplTest {
descriptor.getRouterSignatureEd25519());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519IdentityMasterKeyMismatch()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Mismatch between identity-ed25519 and "
+ + "master-key-ed25519.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
"master-key-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
ROUTER_SIG_ED25519_LINE);
@@ -1613,17 +1821,23 @@ public class ServerDescriptorImplTest {
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519IdentityDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'identity-ed25519' is contained 2 "
+ + "times, but must be contained at most once.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES + "\n"
+ IDENTITY_ED25519_LINES, MASTER_KEY_ED25519_LINE,
ROUTER_SIG_ED25519_LINE);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519IdentityEmptyCrypto()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown
+ .expectMessage("Invalid length of identity-ed25519 (in bytes): 0");
DescriptorBuilder.createWithEd25519Lines("identity-ed25519\n"
+ "-----BEGIN ED25519 CERT-----\n-----END ED25519 CERT-----",
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE);
@@ -1640,9 +1854,12 @@ public class ServerDescriptorImplTest {
descriptor.getMasterKeyEd25519());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519MasterKeyDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'master-key-ed25519' is contained 2 "
+ + "times, but must be contained at most once.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
MASTER_KEY_ED25519_LINE + "\n" + MASTER_KEY_ED25519_LINE,
ROUTER_SIG_ED25519_LINE);
@@ -1655,17 +1872,23 @@ public class ServerDescriptorImplTest {
MASTER_KEY_ED25519_LINE, null);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519RouterSigDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'router-sig-ed25519' is contained 2 "
+ + "times, but must be contained at most once.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE + "\n"
+ ROUTER_SIG_ED25519_LINE);
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testEd25519FollowedbyUnrecognizedLine()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Unrecognized line 'unrecognized-line 1' "
+ + "in server descriptor.");
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE
+ "\nunrecognized-line 1");
@@ -1697,9 +1920,12 @@ public class ServerDescriptorImplTest {
descriptor.getOnionKeyCrosscert());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testOnionKeyCrosscertDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'onion-key-crosscert' is contained 2 "
+ + "times, but must be contained at most once.");
DescriptorBuilder.createWithOnionKeyCrosscertLines(
ONION_KEY_CROSSCERT_LINES + "\n" + ONION_KEY_CROSSCERT_LINES);
}
@@ -1716,9 +1942,12 @@ public class ServerDescriptorImplTest {
assertEquals(1, descriptor.getNtorOnionKeyCrosscertSign());
}
- @Test(expected = DescriptorParseException.class)
+ @Test
public void testNtorOnionKeyCrosscertDuplicate()
throws DescriptorParseException {
+ this.thrown.expect(DescriptorParseException.class);
+ this.thrown.expectMessage("Keyword 'ntor-onion-key-crosscert' is "
+ + "contained 2 times, but must be contained at most once.");
DescriptorBuilder.createWithOnionKeyCrosscertLines(
NTOR_ONION_KEY_CROSSCERT_LINES + "\n"
+ NTOR_ONION_KEY_CROSSCERT_LINES);
1
0

12 Jun '17
commit 83cf2bb101beac95fefaabc58e5f8e0f3bbd258d
Author: iwakeh <iwakeh(a)torproject.org>
Date: Thu Jun 1 08:44:35 2017 +0000
Minor readability and space changes.
Removed check that cannot evaluate as true.
---
src/main/java/org/torproject/descriptor/impl/KeyValueMap.java | 10 +++++-----
src/main/java/org/torproject/descriptor/impl/ParseHelper.java | 6 ++----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java b/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java
index 7b918dc..a1eab05 100644
--- a/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java
+++ b/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java
@@ -24,8 +24,7 @@ public class KeyValueMap<T> extends TreeMap<String, T> {
throw new DescriptorParseException("Line '" + line + "' contains "
+ "duplicate key '" + key + "'.");
}
- if (null == key || key.isEmpty()
- || (keyLength > 0 && key.length() != keyLength)) {
+ if (key.isEmpty() || (keyLength > 0 && key.length() != keyLength)) {
throw new DescriptorParseException("Line '" + line + "' contains an "
+ "illegal key in list element '" + listElement + "'.");
}
@@ -43,10 +42,11 @@ public class KeyValueMap<T> extends TreeMap<String, T> {
if (startIndex >= partsNoOpt.length) {
return this;
}
- String[] keysAndValues = " ".equals(separatorPattern) ? partsNoOpt
+ boolean usingSpacePattern = " ".equals(separatorPattern);
+ String[] keysAndValues = usingSpacePattern ? partsNoOpt
: partsNoOpt[startIndex].split(separatorPattern, -1);
- for (int i = " ".equals(separatorPattern) ? startIndex : 0;
- i < keysAndValues.length; i++) {
+ for (int i = usingSpacePattern ? startIndex : 0; i < keysAndValues.length;
+ i++) {
String listElement = keysAndValues[i];
String[] keyAndValue = listElement.split("=");
String key = keyAndValue[0];
diff --git a/src/main/java/org/torproject/descriptor/impl/ParseHelper.java b/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
index e89b59e..31454e5 100644
--- a/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
+++ b/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
@@ -23,8 +23,7 @@ import javax.xml.bind.DatatypeConverter;
public class ParseHelper {
- private static Pattern keywordPattern =
- Pattern.compile("^[A-Za-z0-9-]+$");
+ private static Pattern keywordPattern = Pattern.compile("^[A-Za-z0-9-]+$");
protected static String parseKeyword(String line, String keyword)
throws DescriptorParseException {
@@ -35,8 +34,7 @@ public class ParseHelper {
return keyword;
}
- private static Pattern ipv4Pattern =
- Pattern.compile("^[0-9\\.]{7,15}$");
+ private static Pattern ipv4Pattern = Pattern.compile("^[0-9\\.]{7,15}$");
protected static String parseIpv4Address(String line, String address)
throws DescriptorParseException {
1
0

12 Jun '17
commit c7a4ffe6ccd1989ff1cd6eddd5beb141798600b5
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Mon Jun 12 10:10:04 2017 +0200
Replace all @Test() with @Test.
---
.../descriptor/DescriptorSourceFactoryTest.java | 6 +-
.../descriptor/impl/BridgeNetworkStatusTest.java | 6 +-
.../impl/DescriptorCollectorImplTest.java | 12 +-
.../descriptor/impl/ExitListImplTest.java | 6 +-
.../impl/ExtraInfoDescriptorImplTest.java | 130 +++++++++---------
.../descriptor/impl/MicrodescriptorImplTest.java | 2 +-
.../impl/RelayNetworkStatusConsensusImplTest.java | 88 ++++++-------
.../impl/RelayNetworkStatusImplTest.java | 2 +-
.../impl/RelayNetworkStatusVoteImplTest.java | 54 ++++----
.../descriptor/impl/ServerDescriptorImplTest.java | 146 ++++++++++-----------
.../descriptor/impl/TorperfResultImplTest.java | 10 +-
.../index/DescriptorIndexCollectorTest.java | 14 +-
.../descriptor/index/DirectoryNodeTest.java | 4 +-
.../torproject/descriptor/index/FileNodeTest.java | 2 +-
.../torproject/descriptor/index/IndexNodeTest.java | 12 +-
15 files changed, 247 insertions(+), 247 deletions(-)
diff --git a/src/test/java/org/torproject/descriptor/DescriptorSourceFactoryTest.java b/src/test/java/org/torproject/descriptor/DescriptorSourceFactoryTest.java
index 9e0b5ff..8eee1ef 100644
--- a/src/test/java/org/torproject/descriptor/DescriptorSourceFactoryTest.java
+++ b/src/test/java/org/torproject/descriptor/DescriptorSourceFactoryTest.java
@@ -33,7 +33,7 @@ public class DescriptorSourceFactoryTest {
private static final String[] defaults = new String[] { COLLECTOR_DEFAULT,
DOWNLOADER_DEFAULT, PARSER_DEFAULT, READER_DEFAULT };
- @Test()
+ @Test
public void testDefaults() {
setProperties(defaults);
DescriptorCollector dc =
@@ -61,7 +61,7 @@ public class DescriptorSourceFactoryTest {
DescriptorSourceFactory.createDescriptorCollector();
}
- @Test()
+ @Test
public void testUnknownPropertyException() {
setProperties(defaults);
try {
@@ -81,7 +81,7 @@ public class DescriptorSourceFactoryTest {
}
}
- @Test()
+ @Test
public void testProperties() {
setProperties(new String[] {
"org.torproject.descriptor.DummyCollectorImplementation",
diff --git a/src/test/java/org/torproject/descriptor/impl/BridgeNetworkStatusTest.java b/src/test/java/org/torproject/descriptor/impl/BridgeNetworkStatusTest.java
index 25db3d0..3739e5d 100644
--- a/src/test/java/org/torproject/descriptor/impl/BridgeNetworkStatusTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/BridgeNetworkStatusTest.java
@@ -126,7 +126,7 @@ public class BridgeNetworkStatusTest {
}
}
- @Test()
+ @Test
public void testSampleStatus() throws DescriptorParseException {
StatusBuilder sb = new StatusBuilder();
BridgeNetworkStatus status = sb.buildStatus(true);
@@ -145,14 +145,14 @@ public class BridgeNetworkStatusTest {
assertTrue(status.getUnrecognizedLines().isEmpty());
}
- @Test()
+ @Test
public void testPublishedNoLine() throws DescriptorParseException {
BridgeNetworkStatus status =
StatusBuilder.createWithPublishedLine(null);
assertEquals(1448127576000L, status.getPublishedMillis());
}
- @Test()
+ @Test
public void testFlagThresholdsNoLine() throws DescriptorParseException {
BridgeNetworkStatus status =
StatusBuilder.createWithFlagThresholdsLine(null);
diff --git a/src/test/java/org/torproject/descriptor/impl/DescriptorCollectorImplTest.java b/src/test/java/org/torproject/descriptor/impl/DescriptorCollectorImplTest.java
index 45752b2..c2f9674 100644
--- a/src/test/java/org/torproject/descriptor/impl/DescriptorCollectorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/DescriptorCollectorImplTest.java
@@ -18,7 +18,7 @@ public class DescriptorCollectorImplTest {
private static final String REMOTE_DIRECTORY_CONSENSUSES =
"/recent/relay-descriptors/consensuses/";
- @Test()
+ @Test
public void testOneFile() {
String remoteFilename = "2015-05-24-12-00-00-consensus";
String directoryListing = "<tr><td valign=\"top\">"
@@ -38,7 +38,7 @@ public class DescriptorCollectorImplTest {
remoteFiles.get(remoteFiles.firstKey()));
}
- @Test()
+ @Test
public void testSameFileTwoTimestampsLastWins() {
String remoteFilename = "2015-05-24-12-00-00-consensus";
String firstTimestamp = "2015-05-24 12:04";
@@ -61,7 +61,7 @@ public class DescriptorCollectorImplTest {
remoteFiles.get(remoteFiles.firstKey()));
}
- @Test()
+ @Test
public void testSubDirectoryOnly() {
String directoryListing = "<tr><td valign=\"top\">"
+ "<img src=\"/icons/folder.gif\" alt=\"[DIR]\"></td><td>"
@@ -75,7 +75,7 @@ public class DescriptorCollectorImplTest {
assertTrue(remoteFiles.isEmpty());
}
- @Test()
+ @Test
public void testParentDirectoryOnly() {
String directoryListing = "<tr><td valign=\"top\">"
+ "<img src=\"/icons/back.gif\" alt=\"[DIR]\"></td><td>"
@@ -89,7 +89,7 @@ public class DescriptorCollectorImplTest {
assertTrue(remoteFiles.isEmpty());
}
- @Test()
+ @Test
public void testUnexpectedDateFormat() {
String directoryListing = "<tr><td valign=\"top\">"
+ "<img src=\"/icons/unknown.gif\" alt=\"[ ]\"></td><td>"
@@ -104,7 +104,7 @@ public class DescriptorCollectorImplTest {
assertTrue(remoteFiles.isEmpty());
}
- @Test()
+ @Test
public void testInvalidDate() {
String directoryListing = "<tr><td valign=\"top\">"
+ "<img src=\"/icons/unknown.gif\" alt=\"[ ]\"></td><td>"
diff --git a/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java b/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java
index 5a67d53..74417d9 100644
--- a/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/ExitListImplTest.java
@@ -21,7 +21,7 @@ public class ExitListImplTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
- @Test()
+ @Test
public void testAnnotatedInput() throws Exception {
ExitListImpl result = new ExitListImpl((tordnselAnnotation + input)
.getBytes("US-ASCII"), fileName, false);
@@ -38,7 +38,7 @@ public class ExitListImplTest {
result.getEntries().size());
}
- @Test()
+ @Test
public void testMultipleOldExitAddresses() throws Exception {
ExitListImpl result = new ExitListImpl(
(tordnselAnnotation + multiExitAddressInput)
@@ -64,7 +64,7 @@ public class ExitListImplTest {
assertTrue("Map: " + testMap, testMap.isEmpty());
}
- @Test()
+ @Test
public void testMultipleExitAddresses() throws Exception {
ExitListImpl result = new ExitListImpl(
(tordnselAnnotation + multiExitAddressInput)
diff --git a/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java b/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
index e10fa7b..7b62393 100644
--- a/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
@@ -951,7 +951,7 @@ public class ExtraInfoDescriptorImplTest {
}
}
- @Test()
+ @Test
public void testSampleDescriptor() throws DescriptorParseException {
DescriptorBuilder db = new DescriptorBuilder();
ExtraInfoDescriptor descriptor = db.buildDescriptor(true);
@@ -978,7 +978,7 @@ public class ExtraInfoDescriptorImplTest {
DescriptorBuilder.createWithExtraInfoLine(null);
}
- @Test()
+ @Test
public void testExtraInfoOpt() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithExtraInfoLine("opt extra-info chaoscomputerclub5 "
@@ -988,7 +988,7 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getFingerprint());
}
- @Test()
+ @Test
public void testExtraInfoNicknameTwoSpaces()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
@@ -1077,14 +1077,14 @@ public class ExtraInfoDescriptorImplTest {
DescriptorBuilder.createWithPublishedLine(null);
}
- @Test()
+ @Test
public void testPublishedOpt() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithPublishedLine("opt published 2012-02-11 09:08:36");
assertEquals(1328951316000L, descriptor.getPublishedMillis());
}
- @Test()
+ @Test
public void testPublishedMillis() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithPublishedLine("opt published 2012-02-11 09:08:36.123");
@@ -1103,7 +1103,7 @@ public class ExtraInfoDescriptorImplTest {
+ "-4713350144,-4723824640,-4710717440,-4572675072");
}
- @Test()
+ @Test
public void testReadHistoryTabInterval()
throws DescriptorParseException {
DescriptorBuilder.createWithReadHistoryLine("read-history "
@@ -1111,7 +1111,7 @@ public class ExtraInfoDescriptorImplTest {
+ "4707695616,4699666432,4650004480,4489718784");
}
- @Test()
+ @Test
public void testReadHistoryTabIntervalBytes()
throws DescriptorParseException {
DescriptorBuilder.createWithReadHistoryLine("read-history "
@@ -1131,7 +1131,7 @@ public class ExtraInfoDescriptorImplTest {
+ "4707695616,4699666432,4650004480,4489718784");
}
- @Test()
+ @Test
public void testReadHistoryNonStandardInterval()
throws DescriptorParseException {
DescriptorBuilder.createWithReadHistoryLine("read-history "
@@ -1163,7 +1163,7 @@ public class ExtraInfoDescriptorImplTest {
+ "81281024,,60625920,67922944");
}
- @Test()
+ @Test
public void testDirreqWriteHistoryExtraArg() throws DescriptorParseException {
DescriptorBuilder.createWithDirreqWriteHistoryLine(
"dirreq-write-history "
@@ -1183,7 +1183,7 @@ public class ExtraInfoDescriptorImplTest {
+ "17074176,16235520,16005120,");
}
- @Test()
+ @Test
public void testGeoipDbDigestValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithGeoipDbDigestLine("geoip-db-digest "
@@ -1221,7 +1221,7 @@ public class ExtraInfoDescriptorImplTest {
DescriptorBuilder.createWithGeoipDbDigestLine("geoip-db-digest");
}
- @Test()
+ @Test
public void testGeoipDbDigestExtraArg() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithGeoip6DbDigestLine("geoip-db-digest "
@@ -1232,7 +1232,7 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getGeoipDbDigest());
}
- @Test()
+ @Test
public void testGeoip6DbDigestValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithGeoip6DbDigestLine("geoip6-db-digest "
@@ -1241,7 +1241,7 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getGeoip6DbDigestSha1Hex());
}
- @Test()
+ @Test
public void testGeoip6DbDigestExtraArg() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
.createWithGeoip6DbDigestLine("geoip6-db-digest "
@@ -1252,7 +1252,7 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getGeoip6DbDigest());
}
- @Test()
+ @Test
public void testGeoipStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = GeoipStatsBuilder
.createWithDefaultLines();
@@ -1322,7 +1322,7 @@ public class ExtraInfoDescriptorImplTest {
+ "gb=208,other=200");
}
- @Test()
+ @Test
public void testGeoipClientOriginsQuestionMarks()
throws DescriptorParseException {
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
@@ -1330,7 +1330,7 @@ public class ExtraInfoDescriptorImplTest {
+ "gb=208,??=200");
}
- @Test()
+ @Test
public void testGeoipClientOriginsCapital()
throws DescriptorParseException {
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
@@ -1386,7 +1386,7 @@ public class ExtraInfoDescriptorImplTest {
+ "ru=352,fr=208,gb=208,ir=200");
}
- @Test()
+ @Test
public void testGeoipClientOriginsExtraArg()
throws DescriptorParseException {
GeoipStatsBuilder.createWithGeoipClientOriginsLine(
@@ -1394,7 +1394,7 @@ public class ExtraInfoDescriptorImplTest {
+ "gb=208 ir=200");
}
- @Test()
+ @Test
public void testDirreqStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DirreqStatsBuilder
.createWithDefaultLines();
@@ -1425,14 +1425,14 @@ public class ExtraInfoDescriptorImplTest {
assertEquals(0, dl.get("complete").intValue());
}
- @Test()
+ @Test
public void testDirreqStatsIntervalTwoDays()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqStatsEndLine("dirreq-stats-end "
+ "2012-02-11 00:59:53 (172800 s)");
}
- @Test()
+ @Test
public void testDirreqStatsExtraArg()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqStatsEndLine("dirreq-stats-end "
@@ -1449,14 +1449,14 @@ public class ExtraInfoDescriptorImplTest {
+ "usa=1544");
}
- @Test()
+ @Test
public void testDirreqV3IpsExtraArg()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqV3IpsLine("dirreq-v3-ips "
+ "ab=12,cd=34 ef=56");
}
- @Test()
+ @Test
public void testDirreqV2IpsDigitCountry()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqV2IpsLine("dirreq-v2-ips 00=8");
@@ -1472,7 +1472,7 @@ public class ExtraInfoDescriptorImplTest {
+ "u=1744");
}
- @Test()
+ @Test
public void testDirreqV3ReqsNull() throws DescriptorParseException {
ExtraInfoDescriptor eid =
DirreqStatsBuilder.createWithDirreqV3ReqsLine(null);
@@ -1498,7 +1498,7 @@ public class ExtraInfoDescriptorImplTest {
+ "ok==10848");
}
- @Test()
+ @Test
public void testDirreqV3RespEmptyString()
throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
@@ -1508,7 +1508,7 @@ public class ExtraInfoDescriptorImplTest {
DirreqStatsBuilder.createWithDirreqV3RespLine("dirreq-v3-resp =10848");
}
- @Test()
+ @Test
public void testDirreqV3RespExtraArg()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqV3RespLine("dirreq-v3-resp "
@@ -1541,7 +1541,7 @@ public class ExtraInfoDescriptorImplTest {
+ "0.37");
}
- @Test()
+ @Test
public void testDirreqV3ShareExtraArg()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqV3ShareLine("dirreq-v3-share "
@@ -1557,7 +1557,7 @@ public class ExtraInfoDescriptorImplTest {
"dirreq-v3-direct-dl complete 36");
}
- @Test()
+ @Test
public void testDirreqV2DirectDlNegative()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqV2DirectDlLine(
@@ -1582,14 +1582,14 @@ public class ExtraInfoDescriptorImplTest {
"dirreq-v2-tunneled-dl complete=0.001");
}
- @Test()
+ @Test
public void testDirreqV3TunneledDlExtraArg()
throws DescriptorParseException {
DirreqStatsBuilder.createWithDirreqV2TunneledDlLine(
"dirreq-v2-tunneled-dl complete=-8 incomplete=1/-8");
}
- @Test()
+ @Test
public void testEntryStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = EntryStatsBuilder
.createWithDefaultLines();
@@ -1619,7 +1619,7 @@ public class ExtraInfoDescriptorImplTest {
+ "ir=25368;us=15744");
}
- @Test()
+ @Test
public void testCellStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = CellStatsBuilder
.createWithDefaultLines();
@@ -1688,14 +1688,14 @@ public class ExtraInfoDescriptorImplTest {
"cell-circuits-per-decile -866");
}
- @Test()
+ @Test
public void testCellCircuitsPerDecileExtraArg()
throws DescriptorParseException {
CellStatsBuilder.createWithCellCircuitsPerDecileLine(
"cell-circuits-per-decile 866 866 866 866 866");
}
- @Test()
+ @Test
public void testConnBiDirectValid()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
@@ -1719,14 +1719,14 @@ public class ExtraInfoDescriptorImplTest {
+ "2012-02-11 01:59:39 (86400 s) 42173,1591,1310,1744,42");
}
- @Test()
+ @Test
public void testConnBiDirectStatsExtraArg()
throws DescriptorParseException {
DescriptorBuilder.createWithConnBiDirectLine("conn-bi-direct "
+ "2012-02-11 01:59:39 (86400 s) 42173,1591,1310,1744 +1");
}
- @Test()
+ @Test
public void testExitStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = ExitStatsBuilder
.createWithDefaultLines();
@@ -1788,7 +1788,7 @@ public class ExtraInfoDescriptorImplTest {
"exit-kibibytes-written unknown=74647");
}
- @Test()
+ @Test
public void testExitStatsWrittenEmptyString()
throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
@@ -1808,27 +1808,27 @@ public class ExtraInfoDescriptorImplTest {
"exit-kibibytes-read 25=-35562");
}
- @Test()
+ @Test
public void testExitStatsReadTooLarge()
throws DescriptorParseException {
ExitStatsBuilder.createWithExitKibibytesReadLine(
"exit-kibibytes-read other=2282907805");
}
- @Test()
+ @Test
public void testExitStatsStreamsTooLarge()
throws DescriptorParseException {
ExitStatsBuilder.createWithExitStreamsOpenedLine(
"exit-streams-opened 25=2147483648");
}
- @Test()
+ @Test
public void testExitStatsStreamsExtraArg() throws DescriptorParseException {
ExitStatsBuilder.createWithExitStreamsOpenedLine(
"exit-streams-opened 25=21474 3648");
}
- @Test()
+ @Test
public void testBridgeStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = BridgeStatsBuilder
.createWithDefaultLines();
@@ -1861,7 +1861,7 @@ public class ExtraInfoDescriptorImplTest {
+ "2012-02-11 01:59:39 (0 s)");
}
- @Test()
+ @Test
public void testBridgeStatsEndExtraArg()
throws DescriptorParseException {
BridgeStatsBuilder.createWithBridgeStatsEndLine("bridge-stats-end "
@@ -1889,7 +1889,7 @@ public class ExtraInfoDescriptorImplTest {
0x69, 0x70, 0x73 }, false); // "ips" (no newline)
}
- @Test()
+ @Test
public void testBridgeIpsExtraArg()
throws DescriptorParseException {
BridgeStatsBuilder.createWithBridgeIpsLine("bridge-ips ir=24 5");
@@ -1905,7 +1905,7 @@ public class ExtraInfoDescriptorImplTest {
"bridge-ip-versions v4=24.5");
}
- @Test()
+ @Test
public void testBridgeIpVersionsExtraArg()
throws DescriptorParseException {
BridgeStatsBuilder.createWithBridgeIpVersionsLine(
@@ -1922,21 +1922,21 @@ public class ExtraInfoDescriptorImplTest {
"bridge-ip-transports obfs2=24.5");
}
- @Test()
+ @Test
public void testBridgeIpTransportsUnderscore()
throws DescriptorParseException {
BridgeStatsBuilder.createWithBridgeIpTransportsLine(
"bridge-ip-transports meek=32,obfs3_websocket=8,websocket=64");
}
- @Test()
+ @Test
public void testBridgeIpTransportsExtraArg()
throws DescriptorParseException {
BridgeStatsBuilder.createWithBridgeIpTransportsLine(
"bridge-ip-transports obfs2=24 5");
}
- @Test()
+ @Test
public void testPaddingCountsValid()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
@@ -1953,7 +1953,7 @@ public class ExtraInfoDescriptorImplTest {
0L, 0L, 0L, 0L, 0L});
}
- @Test()
+ @Test
public void testPaddingOtherCountsValid()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
@@ -1981,7 +1981,7 @@ public class ExtraInfoDescriptorImplTest {
}
}
- @Test()
+ @Test
public void testPaddingCountsValidFutureProof()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor = DescriptorBuilder
@@ -2007,7 +2007,7 @@ public class ExtraInfoDescriptorImplTest {
+ "(86400 s) bin-size=10000 write-drop=10000");
}
- @Test()
+ @Test
public void testPaddingCountsNoInterval() throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
this.thrown.expectMessage(Matchers
@@ -2018,7 +2018,7 @@ public class ExtraInfoDescriptorImplTest {
+ "01:48:43 bin-size=10000 write-drop=10000");
}
- @Test()
+ @Test
public void testPaddingCountsNoKey() throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
this.thrown.expectMessage(Matchers
@@ -2028,7 +2028,7 @@ public class ExtraInfoDescriptorImplTest {
+ "01:48:43 (86400 s) write-total=9 write-drop=10000 =7 x=8");
}
- @Test()
+ @Test
public void testPaddingCountsNoValue() throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
this.thrown.expectMessage(Matchers
@@ -2038,7 +2038,7 @@ public class ExtraInfoDescriptorImplTest {
+ "01:48:43 (86400 s) write-total=7 write-drop= bin-size=10000 ");
}
- @Test()
+ @Test
public void testPaddingCountsKeyRepeated() throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
this.thrown.expectMessage(Matchers
@@ -2048,7 +2048,7 @@ public class ExtraInfoDescriptorImplTest {
+ "01:48:43 (86400 s) a=1 b=2 a=3 b=4");
}
- @Test()
+ @Test
public void testPaddingCountsCommaSeparatedList()
throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
@@ -2059,7 +2059,7 @@ public class ExtraInfoDescriptorImplTest {
+ "01:48:43 (86400 s) bin-size=10000,write-drop=10000");
}
- @Test()
+ @Test
public void testPaddingCountsNoList() throws DescriptorParseException {
this.thrown.expect(DescriptorParseException.class);
this.thrown.expectMessage(Matchers
@@ -2069,7 +2069,7 @@ public class ExtraInfoDescriptorImplTest {
+ "(86400 s)");
}
- @Test()
+ @Test
public void testHidservStatsValid() throws DescriptorParseException {
ExtraInfoDescriptor descriptor = HidservStatsBuilder
.createWithDefaultLines();
@@ -2097,7 +2097,7 @@ public class ExtraInfoDescriptorImplTest {
assertTrue(params.isEmpty());
}
- @Test()
+ @Test
public void testHidservStatsEndLineMissing()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor =
@@ -2106,7 +2106,7 @@ public class ExtraInfoDescriptorImplTest {
assertEquals(-1L, descriptor.getHidservStatsIntervalLength());
}
- @Test()
+ @Test
public void testHidservRendRelayedCellsNoParams()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor =
@@ -2140,7 +2140,7 @@ public class ExtraInfoDescriptorImplTest {
"hidserv-dir-onions-seen -3 delta_f=A epsilon=B bin_size=C");
}
- @Test()
+ @Test
public void testHidservDirOnionsSeenExtraArg()
throws DescriptorParseException {
HidservStatsBuilder.createWithHidservDirOnionsSeenLine(
@@ -2170,7 +2170,7 @@ public class ExtraInfoDescriptorImplTest {
DescriptorBuilder.createWithUnrecognizedLine(unrecognizedLine, true);
}
- @Test()
+ @Test
public void testUnrecognizedLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -2197,7 +2197,7 @@ public class ExtraInfoDescriptorImplTest {
"router-sig-ed25519 y7WF9T2GFwkSDPZEhB55HgquIFOl5uXUFMYJPq3CXXUTKeJ"
+ "kSrtaZUB5s34fWdHQNtl84mH4dVaFMunHnwgYAw";
- @Test()
+ @Test
public void testEd25519() throws DescriptorParseException {
ExtraInfoDescriptor descriptor =
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
@@ -2224,7 +2224,7 @@ public class ExtraInfoDescriptorImplTest {
ROUTER_SIG_ED25519_LINE);
}
- @Test()
+ @Test
public void testEd25519IdentityMissing()
throws DescriptorParseException {
DescriptorBuilder.createWithEd25519Lines(null,
@@ -2253,7 +2253,7 @@ public class ExtraInfoDescriptorImplTest {
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE);
}
- @Test()
+ @Test
public void testEd25519MasterKeyMissing()
throws DescriptorParseException {
ExtraInfoDescriptor descriptor =
@@ -2275,7 +2275,7 @@ public class ExtraInfoDescriptorImplTest {
ROUTER_SIG_ED25519_LINE);
}
- @Test()
+ @Test
public void testEd25519RouterSigMissing()
throws DescriptorParseException {
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
@@ -2304,7 +2304,7 @@ public class ExtraInfoDescriptorImplTest {
+ "\nunrecognized-line 1");
}
- @Test()
+ @Test
public void testExtraInfoDigestSha256Relay()
throws DescriptorParseException {
byte[] descriptorBytes = ("extra-info Unnamed "
@@ -2337,7 +2337,7 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getDigestSha256Base64());
}
- @Test()
+ @Test
public void testExtraInfoDigestSha256Bridge()
throws DescriptorParseException {
byte[] descriptorBytes = ("extra-info idideditheconfig "
@@ -2362,7 +2362,7 @@ public class ExtraInfoDescriptorImplTest {
descriptor.getDigestSha256Base64());
}
- @Test()
+ @Test
public void testExtraInfoDigestsNoRouterDigestLines()
throws DescriptorParseException {
byte[] descriptorBytes = ("extra-info idideditheconfig "
diff --git a/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java b/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java
index 7167de9..b1d6474 100644
--- a/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/MicrodescriptorImplTest.java
@@ -71,7 +71,7 @@ public class MicrodescriptorImplTest {
}
}
- @Test()
+ @Test
public void testDefaults() throws DescriptorParseException {
Microdescriptor micro = DescriptorBuilder.createWithDefaultLines();
assertEquals("ER1AC4KqT//o3pJDrqlmej5G2qW1EQYEr/IrMQHNc6I",
diff --git a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
index dcd3663..90128c2 100644
--- a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
@@ -352,7 +352,7 @@ public class RelayNetworkStatusConsensusImplTest {
}
}
- @Test()
+ @Test
public void testSampleConsensus() throws DescriptorParseException {
ConsensusBuilder cb = new ConsensusBuilder();
RelayNetworkStatusConsensus consensus = cb.buildConsensus(true);
@@ -424,7 +424,7 @@ public class RelayNetworkStatusConsensusImplTest {
"network-status-version 3\n ");
}
- @Test()
+ @Test
public void testNetworkStatusVersionPrefixLineAtChar()
throws DescriptorParseException {
ConsensusBuilder.createWithNetworkStatusVersionLine(
@@ -532,7 +532,7 @@ public class RelayNetworkStatusConsensusImplTest {
ConsensusBuilder.createWithVoteStatusLine("vote-status ");
}
- @Test()
+ @Test
public void testVoteStatusConsensusOneSpace()
throws DescriptorParseException {
ConsensusBuilder.createWithVoteStatusLine("vote-status consensus ");
@@ -736,7 +736,7 @@ public class RelayNetworkStatusConsensusImplTest {
ConsensusBuilder.createWithVotingDelayLine("voting-delay one two");
}
- @Test()
+ @Test
public void testClientServerVersionsNoLine()
throws DescriptorParseException {
ConsensusBuilder cb = new ConsensusBuilder();
@@ -747,7 +747,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertNull(consensus.getRecommendedServerVersions());
}
- @Test()
+ @Test
public void testServerVersionsNoLine() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithServerVersionsLine(null);
@@ -755,7 +755,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertNull(consensus.getRecommendedServerVersions());
}
- @Test()
+ @Test
public void testClientVersionsNoLine() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithClientVersionsLine(null);
@@ -763,7 +763,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertNotNull(consensus.getRecommendedServerVersions());
}
- @Test()
+ @Test
public void testClientVersionsNoSpace()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -772,7 +772,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertTrue(consensus.getRecommendedClientVersions().isEmpty());
}
- @Test()
+ @Test
public void testClientVersionsOneSpace()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -798,7 +798,7 @@ public class RelayNetworkStatusConsensusImplTest {
"client-versions ,0.2.2.34");
}
- @Test()
+ @Test
public void testRecommendedClientProtocols123()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus = ConsensusBuilder
@@ -808,7 +808,7 @@ public class RelayNetworkStatusConsensusImplTest {
consensus.getRecommendedClientProtocols().get("Cons"));
}
- @Test()
+ @Test
public void testRecommendedRelayProtocols134()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus = ConsensusBuilder
@@ -818,7 +818,7 @@ public class RelayNetworkStatusConsensusImplTest {
consensus.getRecommendedRelayProtocols().get("Cons"));
}
- @Test()
+ @Test
public void testRequiredClientProtocols1425()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus = ConsensusBuilder
@@ -829,7 +829,7 @@ public class RelayNetworkStatusConsensusImplTest {
consensus.getRequiredClientProtocols().get("Cons"));
}
- @Test()
+ @Test
public void testRequiredRelayProtocols1111()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus = ConsensusBuilder
@@ -849,14 +849,14 @@ public class RelayNetworkStatusConsensusImplTest {
"required-relay-protocols Cons=1\nrequired-relay-protocols Cons=1");
}
- @Test()
+ @Test
public void testPackageNone() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithPackageLines(null);
assertNull(consensus.getPackageLines());
}
- @Test()
+ @Test
public void testPackageOne() throws DescriptorParseException {
String packageLine = "package shouldbesecond 0 http digest=digest";
RelayNetworkStatusConsensus consensus =
@@ -865,7 +865,7 @@ public class RelayNetworkStatusConsensusImplTest {
consensus.getPackageLines().get(0));
}
- @Test()
+ @Test
public void testPackageTwo() throws DescriptorParseException {
List<String> packageLines = Arrays.asList(
"package shouldbesecond 0 http digest=digest",
@@ -910,14 +910,14 @@ public class RelayNetworkStatusConsensusImplTest {
ConsensusBuilder.createWithKnownFlagsLine("known-flags ");
}
- @Test()
+ @Test
public void testParamsNoLine() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithParamsLine(null);
assertNull(consensus.getConsensusParams());
}
- @Test()
+ @Test
public void testParamsNoSpace() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithParamsLine("params");
@@ -925,7 +925,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertTrue(consensus.getConsensusParams().isEmpty());
}
- @Test()
+ @Test
public void testParamsOneSpace() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithParamsLine("params ");
@@ -933,7 +933,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertTrue(consensus.getConsensusParams().isEmpty());
}
- @Test()
+ @Test
public void testParamsThreeSpaces() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
ConsensusBuilder.createWithParamsLine("params ");
@@ -958,7 +958,7 @@ public class RelayNetworkStatusConsensusImplTest {
ConsensusBuilder.createWithParamsLine("params min=-2147483649");
}
- @Test()
+ @Test
public void testParamsLargestNegative()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -968,7 +968,7 @@ public class RelayNetworkStatusConsensusImplTest {
(int) consensus.getConsensusParams().get("min"));
}
- @Test()
+ @Test
public void testParamsLargestPositive()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -1008,7 +1008,7 @@ public class RelayNetworkStatusConsensusImplTest {
+ "D88plxd8YeLfCIVAR9gjiFlWB1WqpC53kWr350o1pzw= -1.0");
}
- @Test()
+ @Test
public void testDirSourceLegacyNickname()
throws DescriptorParseException {
DirSourceBuilder dsb = new DirSourceBuilder();
@@ -1121,7 +1121,7 @@ public class RelayNetworkStatusConsensusImplTest {
DirSourceBuilder.createWithOrPort("onions");
}
- @Test()
+ @Test
public void testDirSourceContactNoLine()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -1130,7 +1130,7 @@ public class RelayNetworkStatusConsensusImplTest {
"ED03BB616EB2F60BEC80151114BB25CEF515B226").getContactLine());
}
- @Test()
+ @Test
public void testDirSourceContactLineNoSpace()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -1139,7 +1139,7 @@ public class RelayNetworkStatusConsensusImplTest {
"ED03BB616EB2F60BEC80151114BB25CEF515B226").getContactLine());
}
- @Test()
+ @Test
public void testDirSourceContactLineOneSpace()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -1338,7 +1338,7 @@ public class RelayNetworkStatusConsensusImplTest {
StatusEntryBuilder.createWithDirPort("zero");
}
- @Test()
+ @Test
public void testSLineNoSpace() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
StatusEntryBuilder.createWithSLine("s");
@@ -1346,7 +1346,7 @@ public class RelayNetworkStatusConsensusImplTest {
"00343A8024F70E214728F0C5AF7ACE0C1508F073").getFlags().isEmpty());
}
- @Test()
+ @Test
public void testSLineOneSpace() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
StatusEntryBuilder.createWithSLine("s ");
@@ -1390,7 +1390,7 @@ public class RelayNetworkStatusConsensusImplTest {
StatusEntryBuilder.createWithWLine("w ");
}
- @Test()
+ @Test
public void testWLineWarpSeven() throws DescriptorParseException {
StatusEntryBuilder.createWithWLine("w Warp=7");
}
@@ -1406,7 +1406,7 @@ public class RelayNetworkStatusConsensusImplTest {
cb.buildConsensus(true);
}
- @Test()
+ @Test
public void testWLineUnmeasured() throws DescriptorParseException {
StatusEntryBuilder sb = new StatusEntryBuilder();
sb.wLine = "w Bandwidth=42424242 Unmeasured=1";
@@ -1420,7 +1420,7 @@ public class RelayNetworkStatusConsensusImplTest {
}
}
- @Test()
+ @Test
public void testWLineNotUnmeasured() throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
StatusEntryBuilder.createWithWLine("w Bandwidth=20");
@@ -1468,7 +1468,7 @@ public class RelayNetworkStatusConsensusImplTest {
cb.buildConsensus(true);
}
- @Test()
+ @Test
public void testNoStatusEntries() throws DescriptorParseException {
ConsensusBuilder cb = new ConsensusBuilder();
cb.statusEntries.clear();
@@ -1490,7 +1490,7 @@ public class RelayNetworkStatusConsensusImplTest {
ConsensusBuilder.createWithDirectoryFooterLine(null);
}
- @Test()
+ @Test
public void testDirectoryFooterMissing()
throws DescriptorParseException {
ConsensusBuilder cb = new ConsensusBuilder();
@@ -1502,13 +1502,13 @@ public class RelayNetworkStatusConsensusImplTest {
assertNull(consensus.getBandwidthWeights());
}
- @Test()
+ @Test
public void testDirectoryFooterLineSpace()
throws DescriptorParseException {
ConsensusBuilder.createWithDirectoryFooterLine("directory-footer ");
}
- @Test()
+ @Test
public void testBandwidthWeightsNoLine()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus =
@@ -1516,7 +1516,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertNull(consensus.getBandwidthWeights());
}
- @Test()
+ @Test
public void testBandwidthWeightsLineNoSpace()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus = ConsensusBuilder
@@ -1524,7 +1524,7 @@ public class RelayNetworkStatusConsensusImplTest {
assertNotNull(consensus.getBandwidthWeights());
}
- @Test()
+ @Test
public void testBandwidthWeightsLineOneSpace()
throws DescriptorParseException {
RelayNetworkStatusConsensus consensus = ConsensusBuilder
@@ -1551,7 +1551,7 @@ public class RelayNetworkStatusConsensusImplTest {
DirectorySignatureBuilder.createWithIdentity("ED03BB616EB2F60");
}
- @Test()
+ @Test
public void testDirectorySignatureIdentityTooLong()
throws DescriptorParseException {
/* This hex string has an unusual length of 58 hex characters, but
@@ -1562,7 +1562,7 @@ public class RelayNetworkStatusConsensusImplTest {
"ED03BB616EB2F60BEC80151114BB25CEF515B226ED03BB616EB2F60BEC");
}
- @Test()
+ @Test
public void testDirectorySignatureSigningKeyTooShort()
throws DescriptorParseException {
/* See above, we accept this hex string even though it's unusually
@@ -1581,7 +1581,7 @@ public class RelayNetworkStatusConsensusImplTest {
DirectorySignatureBuilder.createWithSigningKey("845");
}
- @Test()
+ @Test
public void testDirectorySignatureSigningKeyTooLong()
throws DescriptorParseException {
/* See above, we accept this hex string even though it's unusually
@@ -1627,7 +1627,7 @@ public class RelayNetworkStatusConsensusImplTest {
true);
}
- @Test()
+ @Test
public void testUnrecognizedHeaderLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1649,7 +1649,7 @@ public class RelayNetworkStatusConsensusImplTest {
true);
}
- @Test()
+ @Test
public void testUnrecognizedDirSourceLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1671,7 +1671,7 @@ public class RelayNetworkStatusConsensusImplTest {
unrecognizedLine, true);
}
- @Test()
+ @Test
public void testUnrecognizedStatusEntryLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1693,7 +1693,7 @@ public class RelayNetworkStatusConsensusImplTest {
true);
}
- @Test()
+ @Test
public void testUnrecognizedDirectoryFooterLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1715,7 +1715,7 @@ public class RelayNetworkStatusConsensusImplTest {
unrecognizedLine, true);
}
- @Test()
+ @Test
public void testUnrecognizedDirectorySignatureLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
diff --git a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java
index efca978..e69a26b 100644
--- a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusImplTest.java
@@ -52,7 +52,7 @@ public class RelayNetworkStatusImplTest {
true);
}
- @Test()
+ @Test
public void testValidHeader() throws DescriptorParseException {
byte[] statusBytes = validStatus.getBytes();
RelayNetworkStatusImpl rnsi = new RelayNetworkStatusImpl(statusBytes,
diff --git a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
index 1997c46..1152626 100644
--- a/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
@@ -700,7 +700,7 @@ public class RelayNetworkStatusVoteImplTest {
}
}
- @Test()
+ @Test
public void testSampleVote() throws DescriptorParseException {
VoteBuilder vb = new VoteBuilder();
RelayNetworkStatusVote vote = vb.buildVote(true);
@@ -777,7 +777,7 @@ public class RelayNetworkStatusVoteImplTest {
"network-status-version 3\n ");
}
- @Test()
+ @Test
public void testNetworkStatusVersionPrefixLineAtChar()
throws DescriptorParseException {
VoteBuilder.createWithNetworkStatusVersionLine(
@@ -883,7 +883,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithVoteStatusLine("vote-status ");
}
- @Test()
+ @Test
public void testVoteStatusVoteOneSpace()
throws DescriptorParseException {
VoteBuilder.createWithVoteStatusLine("vote-status vote ");
@@ -907,7 +907,7 @@ public class RelayNetworkStatusVoteImplTest {
"vote-status TheMagicVoteStatus");
}
- @Test()
+ @Test
public void testConsensusMethodNoLine()
throws DescriptorParseException {
RelayNetworkStatusVote vote =
@@ -1121,7 +1121,7 @@ public class RelayNetworkStatusVoteImplTest {
"recommended-client-protocols Cons=2-1");
}
- @Test()
+ @Test
public void testRecommendedRelayProtocols0()
throws DescriptorParseException {
RelayNetworkStatusVote vote =
@@ -1151,14 +1151,14 @@ public class RelayNetworkStatusVoteImplTest {
"recommended-client-protocols Cons=-1");
}
- @Test()
+ @Test
public void testPackageNone() throws DescriptorParseException {
RelayNetworkStatusVote vote =
VoteBuilder.createWithPackageLines(null);
assertNull(vote.getPackageLines());
}
- @Test()
+ @Test
public void testPackageOne() throws DescriptorParseException {
String packageLine = "package shouldbesecond 0 http digest=digest";
RelayNetworkStatusVote vote =
@@ -1167,7 +1167,7 @@ public class RelayNetworkStatusVoteImplTest {
vote.getPackageLines().get(0));
}
- @Test()
+ @Test
public void testPackageTwo() throws DescriptorParseException {
List<String> packageLines = Arrays.asList(
"package shouldbesecond 0 http digest=digest",
@@ -1212,7 +1212,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithKnownFlagsLine("known-flags ");
}
- @Test()
+ @Test
public void testFlagThresholdsLine() throws DescriptorParseException {
VoteBuilder vb = new VoteBuilder();
RelayNetworkStatusVote vote = vb.buildVote(true);
@@ -1226,7 +1226,7 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(1, vote.getEnoughMtbfInfo());
}
- @Test()
+ @Test
public void testFlagThresholdsNoLine() throws DescriptorParseException {
RelayNetworkStatusVote vote =
VoteBuilder.createWithFlagThresholdsLine(null);
@@ -1240,7 +1240,7 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(-1, vote.getEnoughMtbfInfo());
}
- @Test()
+ @Test
public void testFlagThresholdsAllZeroes()
throws DescriptorParseException {
RelayNetworkStatusVote vote =
@@ -1320,7 +1320,7 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 443 80");
}
- @Test()
+ @Test
public void testFingerprintLowerCase() throws DescriptorParseException {
VoteBuilder.createWithDirSourceLine("dir-source urras "
+ "80550987e1d626e3eba5e5e75a458de0626d088c 208.83.223.34 "
@@ -1371,7 +1371,7 @@ public class RelayNetworkStatusVoteImplTest {
+ " 208.83.223.34 208.83.223.34 443 80");
}
- @Test()
+ @Test
public void testHostname256()
throws DescriptorParseException {
/* This test doesn't fail, because we're not parsing the hostname. */
@@ -1442,7 +1442,7 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 four-four-three 80");
}
- @Test()
+ @Test
public void testDirPort0() throws DescriptorParseException {
/* This test doesn't fail, because we're accepting DirPort 0, even
* though it doesn't make sense from Tor's view. */
@@ -1461,7 +1461,7 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 443 ");
}
- @Test()
+ @Test
public void testDirPortOrPortIdentical()
throws DescriptorParseException {
/* This test doesn't fail, even though identical OR and Dir port don't
@@ -1493,7 +1493,7 @@ public class RelayNetworkStatusVoteImplTest {
+ "208.83.223.34 443 80");
}
- @Test()
+ @Test
public void testContactLineMissing()
throws DescriptorParseException {
VoteBuilder.createWithContactLine(null);
@@ -1530,7 +1530,7 @@ public class RelayNetworkStatusVoteImplTest {
"shared-rand-participate 1");
}
- @Test()
+ @Test
public void testSharedRandCommitLinesEmpty() throws DescriptorParseException {
RelayNetworkStatusVote vote =
VoteBuilder.createWithSharedRandCommitLines(null);
@@ -1559,7 +1559,7 @@ public class RelayNetworkStatusVoteImplTest {
+ "D88plxd8YeLfCIVAR9gjiFlWB1WqpC53kWr350o1pzw=");
}
- @Test()
+ @Test
public void testLegacyDirKeyLine() throws DescriptorParseException {
RelayNetworkStatusVote vote = VoteBuilder.createWithLegacyDirKeyLine(
"legacy-dir-key 81349FC1F2DBA2C2C11B45CB9706637D480AB913");
@@ -1710,7 +1710,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithDirSigningKeyLines(null);
}
- @Test()
+ @Test
public void testDirKeyCrosscertLinesMissing()
throws DescriptorParseException {
VoteBuilder.createWithDirKeyCrosscertLines(null);
@@ -1725,7 +1725,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithDirKeyCertificationLines(null);
}
- @Test()
+ @Test
public void testDirectoryFooterLineMissing()
throws DescriptorParseException {
VoteBuilder.createWithDirectoryFooterLine(null);
@@ -1740,7 +1740,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithDirectorySignatureLines(null);
}
- @Test()
+ @Test
public void testDirectorySignaturesLinesTwoAlgorithms()
throws DescriptorParseException {
String identitySha256 = "32519E5CB7254AB5A94CC9925EC7676E53D5D52EEAB7"
@@ -1785,7 +1785,7 @@ public class RelayNetworkStatusVoteImplTest {
vote.getDigestSha1Hex());
}
- @Test()
+ @Test
public void testDirectorySignaturesLinesTwoAlgorithmsSameDigests()
throws DescriptorParseException {
String signaturesLines = "directory-signature 00 00\n"
@@ -1807,7 +1807,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithUnrecognizedHeaderLine(unrecognizedLine, true);
}
- @Test()
+ @Test
public void testUnrecognizedHeaderLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1829,7 +1829,7 @@ public class RelayNetworkStatusVoteImplTest {
true);
}
- @Test()
+ @Test
public void testUnrecognizedDirSourceLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1850,7 +1850,7 @@ public class RelayNetworkStatusVoteImplTest {
VoteBuilder.createWithUnrecognizedFooterLine(unrecognizedLine, true);
}
- @Test()
+ @Test
public void testUnrecognizedFooterLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1861,7 +1861,7 @@ public class RelayNetworkStatusVoteImplTest {
assertEquals(unrecognizedLines, vote.getUnrecognizedLines());
}
- @Test()
+ @Test
public void testIdEd25519MasterKey()
throws DescriptorParseException {
String masterKey25519 = "8RH34kO07Pp+XYwzdoATVyCibIvmbslUjRkAm7J4IA8";
@@ -1877,7 +1877,7 @@ public class RelayNetworkStatusVoteImplTest {
vote.getStatusEntry(fingerprint).getMasterKeyEd25519());
}
- @Test()
+ @Test
public void testIdEd25519None()
throws DescriptorParseException {
List<String> statusEntries = new ArrayList<>();
diff --git a/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java b/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
index 70a25a0..9533de3 100644
--- a/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/ServerDescriptorImplTest.java
@@ -461,7 +461,7 @@ public class ServerDescriptorImplTest {
}
}
- @Test()
+ @Test
public void testSampleDescriptor() throws DescriptorParseException {
DescriptorBuilder db = new DescriptorBuilder();
ServerDescriptor descriptor = db.buildDescriptor(true);
@@ -513,7 +513,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithRouterLine(null);
}
- @Test()
+ @Test
public void testRouterOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithRouterLine("opt router saberrider2008 "
@@ -562,7 +562,7 @@ public class ServerDescriptorImplTest {
+ "saberrider2008ReallyLongNickname 94.134.192.243 9001 0 0");
}
- @Test()
+ @Test
public void testNicknameTwoSpaces() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithRouterLine("router saberrider2008 "
@@ -643,14 +643,14 @@ public class ServerDescriptorImplTest {
+ "94.134.192.243 9001 0 ");
}
- @Test()
+ @Test
public void testPlatformMissing() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithPlatformLine(null);
assertNull(descriptor.getPlatform());
}
- @Test()
+ @Test
public void testPlatformOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithPlatformLine("opt platform Tor 0.2.2.35 "
@@ -659,21 +659,21 @@ public class ServerDescriptorImplTest {
descriptor.getPlatform());
}
- @Test()
+ @Test
public void testPlatformNoSpace() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithPlatformLine("platform");
assertEquals("", descriptor.getPlatform());
}
- @Test()
+ @Test
public void testPlatformSpace() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithPlatformLine("platform ");
assertEquals("", descriptor.getPlatform());
}
- @Test()
+ @Test
public void testProtocolsOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithProtocolsLine("opt protocols Link 1 2 Circuit 1");
@@ -683,7 +683,7 @@ public class ServerDescriptorImplTest {
descriptor.getCircuitProtocolVersions());
}
- @Test()
+ @Test
public void testProtocolsNoOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithProtocolsLine("protocols Link 1 2 Circuit 1");
@@ -710,7 +710,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithProtocolsLine("opt protocols Link 1 2");
}
- @Test()
+ @Test
public void testProtoGreenPurple() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithProtoLine("proto Green=23 Purple=42");
@@ -735,7 +735,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithPublishedLine(null);
}
- @Test()
+ @Test
public void testPublishedOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithPublishedLine("opt published 2012-01-01 04:03:19");
@@ -777,14 +777,14 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithPublishedLine("published 2012-01-01");
}
- @Test()
+ @Test
public void testPublishedMillis() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithPublishedLine("opt published 2012-01-01 04:03:19.123");
assertEquals(1325390599000L, descriptor.getPublishedMillis());
}
- @Test()
+ @Test
public void testFingerprintNoOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithFingerprintLine("fingerprint D873 3048 FC8E C910 2466 "
@@ -829,14 +829,14 @@ public class ServerDescriptorImplTest {
+ "D8733048FC8EC9102466AD8F3098622BF1BF71FD");
}
- @Test()
+ @Test
public void testUptimeMissing() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithUptimeLine(null);
assertNull(descriptor.getUptime());
}
- @Test()
+ @Test
public void testUptimeOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithUptimeLine("opt uptime 48");
@@ -850,7 +850,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithUptimeLine("uptime fourty-eight");
}
- @Test()
+ @Test
public void testUptimeMinusOne() throws DescriptorParseException {
DescriptorBuilder.createWithUptimeLine("uptime -1");
}
@@ -876,7 +876,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithUptimeLine("uptime 4 8");
}
- @Test()
+ @Test
public void testBandwidthOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithBandwidthLine("opt bandwidth 51200 51200 53470");
@@ -901,7 +901,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithBandwidthLine("bandwidth 51200");
}
- @Test()
+ @Test
public void testBandwidthTwoValues() throws DescriptorParseException {
/* This is allowed, because Tor versions 0.0.8 and older only wrote
* bandwidth lines with rate and burst values, but no observed
@@ -930,7 +930,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithBandwidthLine("bandwidth -1 -2 -3");
}
- @Test()
+ @Test
public void testExtraInfoDigestNoOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithExtraInfoDigestLine("extra-info-digest "
@@ -969,7 +969,7 @@ public class ServerDescriptorImplTest {
+ "1469D1550738A25B1E7B47CDDBCD7B2899F51B741469");
}
- @Test()
+ @Test
public void testExtraInfoDigestMissing()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -977,7 +977,7 @@ public class ServerDescriptorImplTest {
assertNull(descriptor.getExtraInfoDigestSha1Hex());
}
- @Test()
+ @Test
public void testExtraInfoDigestAdditionalDigest()
throws DescriptorParseException {
String extraInfoDigest = "0879DB7B765218D7B3AE7557669D20307BB21CAA";
@@ -990,7 +990,7 @@ public class ServerDescriptorImplTest {
assertEquals(extraInfoDigest, descriptor.getExtraInfoDigestSha1Hex());
}
- @Test()
+ @Test
public void testOnionKeyOpt() throws DescriptorParseException {
DescriptorBuilder.createWithOnionKeyLines("opt onion-key\n"
+ "-----BEGIN RSA PUBLIC KEY-----\n"
@@ -1001,7 +1001,7 @@ public class ServerDescriptorImplTest {
+ "-----END RSA PUBLIC KEY-----");
}
- @Test()
+ @Test
public void testSigningKeyOpt() throws DescriptorParseException {
DescriptorBuilder.createWithSigningKeyLines("opt signing-key\n"
+ "-----BEGIN RSA PUBLIC KEY-----\n"
@@ -1012,7 +1012,7 @@ public class ServerDescriptorImplTest {
+ "-----END RSA PUBLIC KEY-----");
}
- @Test()
+ @Test
public void testHiddenServiceDirMissing()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1020,7 +1020,7 @@ public class ServerDescriptorImplTest {
assertNull(descriptor.getHiddenServiceDirVersions());
}
- @Test()
+ @Test
public void testHiddenServiceDirNoOpt()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1029,7 +1029,7 @@ public class ServerDescriptorImplTest {
descriptor.getHiddenServiceDirVersions());
}
- @Test()
+ @Test
public void testHiddenServiceDirVersions2And3()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1038,14 +1038,14 @@ public class ServerDescriptorImplTest {
descriptor.getHiddenServiceDirVersions());
}
- @Test()
+ @Test
public void testContactMissing() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithContactLine(null);
assertNull(descriptor.getContact());
}
- @Test()
+ @Test
public void testContactOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithContactLine("opt contact Random Person");
@@ -1061,14 +1061,14 @@ public class ServerDescriptorImplTest {
+ "Person\ncontact Random Person");
}
- @Test()
+ @Test
public void testContactNoSpace() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithContactLine("contact");
assertEquals("", descriptor.getContact());
}
- @Test()
+ @Test
public void testContactCarriageReturn()
throws DescriptorParseException {
String contactString = "Random "
@@ -1083,7 +1083,7 @@ public class ServerDescriptorImplTest {
assertEquals(contactString, descriptor.getContact());
}
- @Test()
+ @Test
public void testExitPolicyRejectAllAcceptAll()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1092,7 +1092,7 @@ public class ServerDescriptorImplTest {
descriptor.getExitPolicyLines());
}
- @Test()
+ @Test
public void testExitPolicyOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithExitPolicyLines("opt reject *:*");
@@ -1108,7 +1108,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithExitPolicyLines("reject *");
}
- @Test()
+ @Test
public void testExitPolicyAccept80RejectAll()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1151,7 +1151,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithExitPolicyLines(null);
}
- @Test()
+ @Test
public void testExitPolicyMaskTypes() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithExitPolicyLines("reject 192.168.0.0/16:*\n"
@@ -1185,21 +1185,21 @@ public class ServerDescriptorImplTest {
+ "-----END SIGNATURE-----\ncontact me");
}
- @Test()
+ @Test
public void testHibernatingOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithHibernatingLine("opt hibernating 1");
assertTrue(descriptor.isHibernating());
}
- @Test()
+ @Test
public void testHibernatingFalse() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithHibernatingLine("hibernating 0");
assertFalse(descriptor.isHibernating());
}
- @Test()
+ @Test
public void testHibernatingTrue() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithHibernatingLine("hibernating 1");
@@ -1220,7 +1220,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithHibernatingLine("hibernating");
}
- @Test()
+ @Test
public void testFamilyOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithFamilyLine("opt family saberrider2008");
@@ -1228,7 +1228,7 @@ public class ServerDescriptorImplTest {
descriptor.getFamilyEntries());
}
- @Test()
+ @Test
public void testFamilyFingerprint() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithFamilyLine("family "
@@ -1238,7 +1238,7 @@ public class ServerDescriptorImplTest {
descriptor.getFamilyEntries());
}
- @Test()
+ @Test
public void testFamilyNickname() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithFamilyLine("family saberrider2008");
@@ -1273,7 +1273,7 @@ public class ServerDescriptorImplTest {
+ "D8733048FC8EC9102466AD8F3098622BF1BF71FD");
}
- @Test()
+ @Test
public void testFamilyFingerprintNicknameNamed()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1284,7 +1284,7 @@ public class ServerDescriptorImplTest {
descriptor.getFamilyEntries());
}
- @Test()
+ @Test
public void testFamilyFingerprintNicknameUnnamed()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1295,7 +1295,7 @@ public class ServerDescriptorImplTest {
descriptor.getFamilyEntries());
}
- @Test()
+ @Test
public void testWriteHistory() throws DescriptorParseException {
String writeHistoryLine = "write-history 2012-01-01 03:51:44 (900 s) "
+ "4345856,261120,7591936,1748992";
@@ -1316,7 +1316,7 @@ public class ServerDescriptorImplTest {
assertTrue(bandwidthValues.isEmpty());
}
- @Test()
+ @Test
public void testWriteHistoryOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithWriteHistoryLine("opt write-history 2012-01-01 "
@@ -1386,7 +1386,7 @@ public class ServerDescriptorImplTest {
+ "2012-01-01 03:51:44 (900 s) one,two,three");
}
- @Test()
+ @Test
public void testWriteHistoryNoValuesSpace()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1398,7 +1398,7 @@ public class ServerDescriptorImplTest {
.isEmpty());
}
- @Test()
+ @Test
public void testWriteHistoryNoValuesNoSpace()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1419,14 +1419,14 @@ public class ServerDescriptorImplTest {
"write-history 2012-01-01 03:51:44 (900 ");
}
- @Test()
+ @Test
public void testWriteHistoryExtraArg()
throws DescriptorParseException {
DescriptorBuilder.createWithWriteHistoryLine("write-history "
+ "2012-01-01 03:51:44 (900 s) 4345856 bin_size=1024");
}
- @Test()
+ @Test
public void testWriteHistory1800Seconds()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1436,7 +1436,7 @@ public class ServerDescriptorImplTest {
.getIntervalLength());
}
- @Test()
+ @Test
public void testReadHistory() throws DescriptorParseException {
String readHistoryLine = "read-history 2012-01-01 03:51:44 (900 s) "
+ "4268032,139264,7797760,1415168";
@@ -1457,7 +1457,7 @@ public class ServerDescriptorImplTest {
assertTrue(bandwidthValues.isEmpty());
}
- @Test()
+ @Test
public void testReadHistoryTwoSpaces() throws DescriptorParseException {
/* There are some server descriptors from older Tor versions that
* contain "opt read-history " lines. */
@@ -1466,21 +1466,21 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithReadHistoryLine(readHistoryLine);
}
- @Test()
+ @Test
public void testEventdnsOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithEventdnsLine("opt eventdns 1");
assertTrue(descriptor.getUsesEnhancedDnsLogic());
}
- @Test()
+ @Test
public void testEventdns1() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithEventdnsLine("eventdns 1");
assertTrue(descriptor.getUsesEnhancedDnsLogic());
}
- @Test()
+ @Test
public void testEventdns0() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithEventdnsLine("eventdns 0");
@@ -1501,14 +1501,14 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithEventdnsLine("eventdns no");
}
- @Test()
+ @Test
public void testCachesExtraInfoOpt() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithCachesExtraInfoLine("opt caches-extra-info");
assertTrue(descriptor.getCachesExtraInfo());
}
- @Test()
+ @Test
public void testCachesExtraInfoNoSpace()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1524,7 +1524,7 @@ public class ServerDescriptorImplTest {
+ "true");
}
- @Test()
+ @Test
public void testAllowSingleHopExitsOpt()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1532,7 +1532,7 @@ public class ServerDescriptorImplTest {
assertTrue(descriptor.getAllowSingleHopExits());
}
- @Test()
+ @Test
public void testAllowSingleHopExitsNoSpace()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1565,7 +1565,7 @@ public class ServerDescriptorImplTest {
false);
}
- @Test()
+ @Test
public void testIpv6PolicyLine() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithIpv6PolicyLine("ipv6-policy accept 80,1194,1220,1293");
@@ -1615,7 +1615,7 @@ public class ServerDescriptorImplTest {
+ "ipv6-policy accept 80,1194,1220,1293");
}
- @Test()
+ @Test
public void testNtorOnionKeyLine() throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
.createWithNtorOnionKeyLine("ntor-onion-key "
@@ -1624,7 +1624,7 @@ public class ServerDescriptorImplTest {
descriptor.getNtorOnionKey());
}
- @Test()
+ @Test
public void testNtorOnionKeyLineNoPadding()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1663,7 +1663,7 @@ public class ServerDescriptorImplTest {
+ "Y/XgaHcPIJVa4D55kir9QLH8rEYAaLXuv3c3sm8jYhY\n");
}
- @Test()
+ @Test
public void testTunnelledDirServerTrue()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1671,7 +1671,7 @@ public class ServerDescriptorImplTest {
assertTrue(descriptor.getTunnelledDirServer());
}
- @Test()
+ @Test
public void testTunnelledDirServerFalse()
throws DescriptorParseException {
ServerDescriptor descriptor = DescriptorBuilder
@@ -1718,7 +1718,7 @@ public class ServerDescriptorImplTest {
DescriptorBuilder.createWithUnrecognizedLine(unrecognizedLine, true);
}
- @Test()
+ @Test
public void testUnrecognizedLineIgnore()
throws DescriptorParseException {
String unrecognizedLine = "unrecognized-line 1";
@@ -1729,7 +1729,7 @@ public class ServerDescriptorImplTest {
assertEquals(unrecognizedLines, descriptor.getUnrecognizedLines());
}
- @Test()
+ @Test
public void testSomeOtherKey() throws DescriptorParseException {
List<String> unrecognizedLines = new ArrayList<>();
unrecognizedLines.add("some-other-key");
@@ -1750,7 +1750,7 @@ public class ServerDescriptorImplTest {
assertEquals(unrecognizedLines, descriptor.getUnrecognizedLines());
}
- @Test()
+ @Test
public void testUnrecognizedCryptoBlockNoKeyword()
throws DescriptorParseException {
List<String> unrecognizedLines = new ArrayList<>();
@@ -1787,7 +1787,7 @@ public class ServerDescriptorImplTest {
"router-sig-ed25519 y7WF9T2GFwkSDPZEhB55HgquIFOl5uXUFMYJPq3CXXUTKeJ"
+ "kSrtaZUB5s34fWdHQNtl84mH4dVaFMunHnwgYAw";
- @Test()
+ @Test
public void testEd25519() throws DescriptorParseException {
ServerDescriptor descriptor =
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
@@ -1814,7 +1814,7 @@ public class ServerDescriptorImplTest {
ROUTER_SIG_ED25519_LINE);
}
- @Test()
+ @Test
public void testEd25519IdentityMissing()
throws DescriptorParseException {
DescriptorBuilder.createWithEd25519Lines(null,
@@ -1843,7 +1843,7 @@ public class ServerDescriptorImplTest {
MASTER_KEY_ED25519_LINE, ROUTER_SIG_ED25519_LINE);
}
- @Test()
+ @Test
public void testEd25519MasterKeyMissing()
throws DescriptorParseException {
ServerDescriptor descriptor =
@@ -1865,7 +1865,7 @@ public class ServerDescriptorImplTest {
ROUTER_SIG_ED25519_LINE);
}
- @Test()
+ @Test
public void testEd25519RouterSigMissing()
throws DescriptorParseException {
DescriptorBuilder.createWithEd25519Lines(IDENTITY_ED25519_LINES,
@@ -1910,7 +1910,7 @@ public class ServerDescriptorImplTest {
+ "Ka\nErPtMuiEqAc=\n"
+ "-----END ED25519 CERT-----";
- @Test()
+ @Test
public void testOnionKeyCrosscert() throws DescriptorParseException {
ServerDescriptor descriptor =
DescriptorBuilder.createWithOnionKeyCrosscertLines(
@@ -1930,7 +1930,7 @@ public class ServerDescriptorImplTest {
ONION_KEY_CROSSCERT_LINES + "\n" + ONION_KEY_CROSSCERT_LINES);
}
- @Test()
+ @Test
public void testNtorOnionKeyCrosscert()
throws DescriptorParseException {
ServerDescriptor descriptor =
@@ -1953,7 +1953,7 @@ public class ServerDescriptorImplTest {
+ NTOR_ONION_KEY_CROSSCERT_LINES);
}
- @Test()
+ @Test
public void testBridgeDescriptorDigestsRouterDigestLines()
throws DescriptorParseException {
DescriptorBuilder db = new DescriptorBuilder();
@@ -1968,7 +1968,7 @@ public class ServerDescriptorImplTest {
assertEquals(digestSha256Base64, descriptor.getDigestSha256Base64());
}
- @Test()
+ @Test
public void testBridgeDescriptorDigestsNoRouterDigestLines()
throws DescriptorParseException {
DescriptorBuilder db = new DescriptorBuilder();
diff --git a/src/test/java/org/torproject/descriptor/impl/TorperfResultImplTest.java b/src/test/java/org/torproject/descriptor/impl/TorperfResultImplTest.java
index 640b8a3..122e301 100644
--- a/src/test/java/org/torproject/descriptor/impl/TorperfResultImplTest.java
+++ b/src/test/java/org/torproject/descriptor/impl/TorperfResultImplTest.java
@@ -16,7 +16,7 @@ import java.util.List;
public class TorperfResultImplTest {
- @Test()
+ @Test
public void testAnnotatedInput() throws Exception {
TorperfResultImpl result = (TorperfResultImpl)
(TorperfResultImpl.parseTorperfResults((torperfAnnotation + input)
@@ -32,7 +32,7 @@ public class TorperfResultImplTest {
}
}
- @Test()
+ @Test
public void testPartiallyAnnotatedInput() throws Exception {
byte[] asciiBytes = (torperfAnnotation
+ input + input + input).getBytes("US-ASCII");
@@ -47,7 +47,7 @@ public class TorperfResultImplTest {
((TorperfResultImpl)(result.get(2))).getAnnotations().size());
}
- @Test()
+ @Test
public void testAllAnnotatedInput() throws Exception {
byte[] asciiBytes = (torperfAnnotation + input
+ torperfAnnotation + input
@@ -87,7 +87,7 @@ public class TorperfResultImplTest {
+ "SOCKET=1441065601.86 SOURCE=moria START=1441065601.86 "
+ "TIMEOUT=1500 USED_AT=1441065603.40 USED_BY=2475 WRITEBYTES=75\n";
- @Test()
+ @Test
public void testDatapercNonNumeric() throws Exception {
List<Descriptor> result = TorperfResultImpl.parseTorperfResults(
("DATAPERMILLE=2.0 " + input).getBytes(), false);
@@ -121,7 +121,7 @@ public class TorperfResultImplTest {
+ "START=1493397365.14 TIMEOUT=1500 USED_AT=1493397368.14 "
+ "USED_BY=17429 WRITEBYTES=54";
- @Test()
+ @Test
public void testEndpointsHostnamesSourceAddress()
throws DescriptorParseException {
List<Descriptor> result = TorperfResultImpl.parseTorperfResults(
diff --git a/src/test/java/org/torproject/descriptor/index/DescriptorIndexCollectorTest.java b/src/test/java/org/torproject/descriptor/index/DescriptorIndexCollectorTest.java
index 142d883..d7f602f 100644
--- a/src/test/java/org/torproject/descriptor/index/DescriptorIndexCollectorTest.java
+++ b/src/test/java/org/torproject/descriptor/index/DescriptorIndexCollectorTest.java
@@ -32,7 +32,7 @@ public class DescriptorIndexCollectorTest {
@Rule
public TemporaryFolder tmpf = new TemporaryFolder();
- @Test()
+ @Test
public void testNormalCollecting() throws Exception {
// create local file structure
File localFolder = tmpf.newFolder();
@@ -135,7 +135,7 @@ public class DescriptorIndexCollectorTest {
return indexFile;
}
- @Test()
+ @Test
public void testNormalCollectingWithDeletion() throws Exception {
File localFolder = tmpf.newFolder();
makeStructure(localFolder, "1");
@@ -176,7 +176,7 @@ public class DescriptorIndexCollectorTest {
"a/b/x1", "a/b/y1", "a/b/c/w1", "a/b/c/z1", "a/b/c/u1");
}
- @Test()
+ @Test
public void testSlashesInCollectionWithDeletion() throws Exception {
File localFolder = tmpf.newFolder();
makeStructure(localFolder, "1");
@@ -218,7 +218,7 @@ public class DescriptorIndexCollectorTest {
"a/b/x1", "a/b/y1", "a/b/c/w1", "a/b/c/z1", "a/b/c/u1");
}
- @Test()
+ @Test
public void testNormalStatLocalDirectory() throws IOException {
// create local file structure
File dir = tmpf.newFolder();
@@ -243,7 +243,7 @@ public class DescriptorIndexCollectorTest {
assertEquals("found " + res, 1, res.size());
}
- @Test()
+ @Test
public void testWrongInputStatLocalDirectory() throws IOException {
File dir = makeDirs(tmpf.newFolder().toString(), "a", "b");
SortedMap<String, Long> res = DescriptorIndexCollector
@@ -254,7 +254,7 @@ public class DescriptorIndexCollectorTest {
assertTrue("found " + res, res.isEmpty());
}
- @Test()
+ @Test
public void testMinimalArgs() throws IOException {
File fakeDir = tmpf.newFolder("fantasy-dir");
new DescriptorIndexCollector()
@@ -281,7 +281,7 @@ public class DescriptorIndexCollectorTest {
null, new String[]{}, 100L, null, false);
}
- @Test()
+ @Test
public void testExistingDir() throws IOException {
File dir = tmpf.newFolder();
dir.setWritable(false);
diff --git a/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java b/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java
index 1fa5f83..c98abb8 100644
--- a/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java
+++ b/src/test/java/org/torproject/descriptor/index/DirectoryNodeTest.java
@@ -13,7 +13,7 @@ import java.util.TreeSet;
public class DirectoryNodeTest {
- @Test()
+ @Test
public void testCompare() {
DirectoryNode dn1 = new DirectoryNode("a1", null, null);
DirectoryNode dn2 = new DirectoryNode("a2", null,
@@ -25,7 +25,7 @@ public class DirectoryNodeTest {
assertEquals(1, dn2.compareTo(dn3));
}
- @Test()
+ @Test
public void testFind() {
FileNode fnx = new FileNode("x", 0L, "2000-01-01 01:01");
SortedSet<FileNode> fm = new TreeSet<>();
diff --git a/src/test/java/org/torproject/descriptor/index/FileNodeTest.java b/src/test/java/org/torproject/descriptor/index/FileNodeTest.java
index 59b66a6..5af89ff 100644
--- a/src/test/java/org/torproject/descriptor/index/FileNodeTest.java
+++ b/src/test/java/org/torproject/descriptor/index/FileNodeTest.java
@@ -9,7 +9,7 @@ import org.junit.Test;
public class FileNodeTest {
- @Test()
+ @Test
public void testCompare() {
FileNode fn1 = new FileNode("a1", 1L, "2016-01-01 01:01");
FileNode fn2 = new FileNode("a2", 1L, "2016-01-01 02:02");
diff --git a/src/test/java/org/torproject/descriptor/index/IndexNodeTest.java b/src/test/java/org/torproject/descriptor/index/IndexNodeTest.java
index e1d36b2..f1e044c 100644
--- a/src/test/java/org/torproject/descriptor/index/IndexNodeTest.java
+++ b/src/test/java/org/torproject/descriptor/index/IndexNodeTest.java
@@ -24,7 +24,7 @@ public class IndexNodeTest {
@Rule
public TemporaryFolder tmpf = new TemporaryFolder();
- @Test()
+ @Test
public void testSimpleIndexRead() throws Exception {
URL indexUrl = getClass().getClassLoader().getResource("index1.json");
IndexNode index = IndexNode.fetchIndex(indexUrl.toString());
@@ -33,7 +33,7 @@ public class IndexNodeTest {
/* toString is only used for debugging. Simply ensure that paths,
* file names, and urls are readable. */
- @Test()
+ @Test
public void testToString() throws Exception {
URL indexUrl = getClass().getClassLoader().getResource("index1.json");
IndexNode index = IndexNode.fetchIndex(indexUrl.toString());
@@ -57,7 +57,7 @@ public class IndexNodeTest {
index.directories.first().directories.first().files.last().path);
}
- @Test()
+ @Test
public void testCompressedIndexRead() throws Exception {
for (String fileName : new String[] {"index1.json.xz", "index1.json.bz2",
"index1.json.gz"}) {
@@ -67,7 +67,7 @@ public class IndexNodeTest {
}
}
- @Test()
+ @Test
public void testIndexWrite() throws Exception {
for (String fileName : new String[] {
"test.json", "test.json.bz2", "test.json.gz", "test.json.xz"}) {
@@ -86,7 +86,7 @@ public class IndexNodeTest {
assertEquals("Comparing to " + oldPath, oldJson, newJson);
}
- @Test()
+ @Test
public void testRetrieveFiles() throws Exception {
URL indexUrl = getClass().getClassLoader().getResource("index2.json");
IndexNode index = IndexNode.fetchIndex(indexUrl.toString());
@@ -120,7 +120,7 @@ public class IndexNodeTest {
IndexNode.fetchIndex(indexUrl.openStream());
}
- @Test()
+ @Test
public void testRetrieveEmpty() throws Exception {
URL indexUrl = getClass().getClassLoader().getResource("index1.json");
IndexNode index = IndexNode.fetchIndex(indexUrl.toString());
1
0

[webwml/staging] update tor versions on website: 0.3.0.8, 0.3.1.3-alpha
by hiro@torproject.org 12 Jun '17
by hiro@torproject.org 12 Jun '17
12 Jun '17
commit 5e6d748a3184d335c879ea924ae7e0edf8e7b327
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Thu Jun 8 11:10:40 2017 -0400
update tor versions on website: 0.3.0.8, 0.3.1.3-alpha
---
Makefile | 4 ++--
include/versions.wmi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 921beef..4758dd7 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@
# branch to your personal webwml repository, open a trac ticket in the
# website component, and set it to needs_review.
-export STABLETAG=tor-0.3.0.7
-export DEVTAG=tor-0.3.1.2-alpha
+export STABLETAG=tor-0.3.0.8
+export DEVTAG=tor-0.3.1.3-alpha
WMLBASE=.
diff --git a/include/versions.wmi b/include/versions.wmi
index 4fadd81..f56c0e6 100644
--- a/include/versions.wmi
+++ b/include/versions.wmi
@@ -1,5 +1,5 @@
-<define-tag version-stable whitespace=delete>0.3.0.7</define-tag>
-<define-tag version-alpha whitespace=delete>0.3.1.2-alpha</define-tag>
+<define-tag version-stable whitespace=delete>0.3.0.8</define-tag>
+<define-tag version-alpha whitespace=delete>0.3.1.3-alpha</define-tag>
<define-tag version-win32-stable whitespace=delete>0.3.0.7</define-tag>
1
0
commit 8f20cf97ba5f8fdb8367dfdbdd388241f477ff58
Author: Roger Dingledine <arma(a)torproject.org>
Date: Tue May 30 07:27:57 2017 -0400
another mirror run
---
include/mirrors-table.wmi | 34 -------
include/tor-mirrors.csv | 222 +++++++++++++++++++++++-----------------------
2 files changed, 111 insertions(+), 145 deletions(-)
diff --git a/include/mirrors-table.wmi b/include/mirrors-table.wmi
index 9b29915..a2f2328 100644
--- a/include/mirrors-table.wmi
+++ b/include/mirrors-table.wmi
@@ -916,37 +916,3 @@
<td> - </td>
<td> - </td>
</tr>
-
-<tr>
-
- <td>EE</td>
-
- <td>CyberSIDE</td>
-
- <td>Up to date</td>
-
- <td> - </td>
- <td><a href="http://cyberside.net.ee/tor/">http</a></td>
- <td><a href="http://cyberside.planet.ee/tor/">http</a></td>
- <td> - </td>
- <td> - </td>
- <td> - </td>
- <td> - </td>
-</tr>
-
-<tr>
-
- <td>NL</td>
-
- <td>Disciples of Disorder</td>
-
- <td>Up to date</td>
-
- <td> - </td>
- <td><a href="http://torproject.mirror.disciplesofdisorder.com/dist/">http</a></td>
- <td><a href="http://torproject.mirror.disciplesofdisorder.com">http</a></td>
- <td><a href="https://torproject.mirror.disciplesofdisorder.com/dist/">https</a></td>
- <td><a href="https://torproject.mirror.disciplesofdisorder.com">https</a></td>
- <td> - </td>
- <td> - </td>
-</tr>
diff --git a/include/tor-mirrors.csv b/include/tor-mirrors.csv
index 08d0dd8..2036300 100644
--- a/include/tor-mirrors.csv
+++ b/include/tor-mirrors.csv
@@ -12,129 +12,129 @@ Tor Fan, Tor Supporter, NL, The Netherlands, NL, TRUE, FALSE, No, , , , , , http
Tor Fan, LazyTiger, FR, France, FR, TRUE, FALSE, No, http://tor.taiga-san.net/, , , , http://tor.taiga-san.net/dist/, , , ,
Tor Fan, Tor Supporter, EE, Estonia, EE, TRUE, FALSE, No, http://tor.li/, https://tor.li/, , , http://tor.li/dist/, https://tor.li/dist/, , ,
Tor Fan, Tor Supporter, DE, Germany, DE, TRUE, FALSE, NO, http://tor.externenprüfung-nichtschüler.de/, , , , http://tor.externenprüfung-nichtschüler.de/dist/, , , ,
-mirror-service(a)netcologne.de, NetCologne GmbH, DE, NRW, , TRUE, TRUE, No, http://mirror.netcologne.de/torproject.org, , rsync://mirror.netcologne.de/torproject.org, ftp://mirror.netcologne.de/torproject.org/, http://mirror.netcologne.de/torproject.org/dist, , rsync://mirror.netcologne.de/torproject.org/dist, , Tue May 16 15:41:26 2017
+mirror-service(a)netcologne.de, NetCologne GmbH, DE, NRW, , TRUE, TRUE, No, http://mirror.netcologne.de/torproject.org, , rsync://mirror.netcologne.de/torproject.org, ftp://mirror.netcologne.de/torproject.org/, http://mirror.netcologne.de/torproject.org/dist, , rsync://mirror.netcologne.de/torproject.org/dist, , Mon May 29 15:15:41 2017
admin AT netgull DOT com, NetGull, US, United States, North America, TRUE, TRUE, No, , , , , http://www.netgull.com/torproject/, , , ,
-mirrors[at]ip-connect[dot]vn[dot]ua, IP-Connect LLC, UA, VN, , TRUE, TRUE, Yes, http://torproject.ip-connect.vn.ua, , rsync://torproject.ip-connect.vn.ua/torproject, ftp://torproject.ip-connect.vn.ua/mirror/torproject/, http://torproject.ip-connect.vn.ua/dist, , rsync://torproject.ip-connect.vn.ua/torproject/dist, , Tue May 16 15:41:26 2017
-torsupport AT tb-itf DOT de, TB-ITF, DE, Germany, Europe, TRUE, TRUE, No, http://tormirror.tb-itf-tor.de, https://tormirror.tb-itf-tor.de, , , http://tormirror.tb-itf-tor.de/dist/, https://tormirror.tb-itf-tor.de/dist/, , , Tue May 16 15:41:26 2017
+mirrors[at]ip-connect[dot]vn[dot]ua, IP-Connect LLC, UA, VN, , TRUE, TRUE, Yes, http://torproject.ip-connect.vn.ua, , rsync://torproject.ip-connect.vn.ua/torproject, ftp://torproject.ip-connect.vn.ua/mirror/torproject/, http://torproject.ip-connect.vn.ua/dist, , rsync://torproject.ip-connect.vn.ua/torproject/dist, , Mon May 29 15:15:41 2017
+torsupport AT tb-itf DOT de, TB-ITF, DE, Germany, Europe, TRUE, TRUE, No, http://tormirror.tb-itf-tor.de, https://tormirror.tb-itf-tor.de, , , http://tormirror.tb-itf-tor.de/dist/, https://tormirror.tb-itf-tor.de/dist/, , , Mon May 29 15:15:41 2017
admin at koreswatanabe dottnet, Tor Supporter, RO, Romania, RO, TRUE, TRUE, No, http://tor-relay.koreswatanabe.net, , , , http://tor-relay.koreswatanabe.net/dist/, , , ,
calebcenter(a)live.com, calebxu.tk, US, United States, US, TRUE, FALSE, NO, http://tor.calebxu.tk, , rsync://calebxu.tk/tor, ftp://ftp.calebxu.tk, http://tor.calebxu.tk/dist, , , ,
-maki(a)maki-chan.de, Maki Hoshisawa, DE, Germany, DE, TRUE, FALSE, NO, http://tor.mirrors.maki-chan.de/, , , , http://tor.mirrors.maki-chan.de/dist/, , , , Sat Aug 23 13:09:07 2014
-info AT zentrum-der-gesundheit DOT de, Zentrum der Gesundheit, DK, Denmark, Europe, TRUE, FALSE, No, http://tor.idnr.ws/, , , , http://tor.idnr.ws/dist/, , , , Tue Sep 2 16:16:00 2014
-info /AT enn /DOT lu, Frenn vun der Enn A.S.B.L., IS, Iceland, Europe, TRUE, FALSE, No, http://torproject.lu/, , , , http://torproject.lu/dist/, , , http://btn6gqzqevlhoryd.onion, Tue May 16 15:41:26 2017
-Piratenpartei Bayern, Piratenpartei Bayern, DE, Germany, DE, TRUE, FALSE, NO, http://tormirror.piratenpartei-bayern.de, https://tormirror.piratenpartei-bayern.de, , , http://tormirror.piratenpartei-bayern.de/dist/, https://tormirror.piratenpartei-bayern.de/dist/, , , Thu Sep 8 06:46:02 2016
-Tor Fan, Tor Supporter, DE, Germany, DE, TRUE, TRUE, NO, http://tor.hoi-polloi.org, https://tor.hoi-polloi.org/, , , http://tor.hoi-polloi.org/dist/, https://tor.hoi-polloi.org/dist/, , , Wed May 3 23:12:25 2017
-tor(a)fodt.it // FoDT.it Webteam, FoDT.it, AT, Austria, Europe, TRUE, FALSE, No, http://tor.fodt.it, https://tor.fodt.it, , ftp://ftp.fodt.it/pub/mirrors/torproject.org/, http://tor.fodt.it/dist/, https://tor.fodt.it/dist/, , , Mon Aug 25 15:19:07 2014
-http://www.multinet.no, MultiNet AS, NO, Trondheim, Trondheim, TRUE, TRUE, No, http://tor.multinet.no/, , , , http://tor.multinet.no/dist/, , , , Tue May 16 15:41:26 2017
-haskell at gmx.es, Tor Supporter, ES, Spain, Europe, TRUE, TRUE, No, http://tor.zilog.es/, https://tor.zilog.es/, , , http://tor.zilog.es/dist/, https://tor.zilog.es/dist/, , , Tue May 16 15:41:26 2017
-Tor Fan, Tor Supporter, US, United States, US, TRUE, FALSE, No, http://199.175.55.215/, https://199.175.55.215/, , , http://199.175.55.215/dist/, https://199.175.55.215/dist/, , , Tue May 16 15:41:26 2017
-Tor Fan, Tor Supporter, US, United States, US, FALSE, TRUE, No, http://2607:8b00:2::6258:5c9/, https://2607:8b00:2::6258:5c9/, , , http://2607:8b00:2::6258:5c9/dist/, https://2607:8b00:2::6258:5c9/dist/, , , Wed Jan 21 07:17:52 2015
-margus.random at mail.ee, CyberSIDE, EE, Estonia, EE, TRUE, FALSE, No, http://cyberside.planet.ee/tor/, , , , http://cyberside.net.ee/tor/, , , , Mon May 15 23:00:42 2017
-Tor Fan, torproject.is, IS, Iceland, IS, TRUE, FALSE, No, http://www.torproject.is/, , , , http://www.torproject.is/dist/, , , , Tue May 16 15:41:26 2017
-Tor Fan, spline, DE, Germany, DE, TRUE, FALSE, No, http://tor.spline.de/, https://tor.spline.inf.fu-berlin.de/, rsync://ftp.spline.de/tor, ftp://ftp.spline.de/pub/tor, http://tor.spline.de/dist/, https://tor.spline.inf.fu-berlin.de/dist/, rsync://ftp.spline.de/tor/dist, , Tue May 16 15:41:26 2017
-Tor Fan, me0w.cc, RO, Romania, RO, TRUE, FALSE, No, http://tor.me0w.cc/, , , , http://tor.me0w.cc/dist/, , , , Fri Jan 2 07:17:56 2015
-Tor Fan, borgmann.tv, DE, Germany, DE, TRUE, FALSE, No, http://tor.borgmann.tv/, , , , http://tor.borgmann.tv/dist/, , , , Mon Jul 13 00:04:44 2015
-Tor Fan, Tor Supporter, AT, Austria, AT, TRUE, TRUE, No, http://tor.dont-know-me.at/, , , , http://tor.dont-know-me.at/dist/, , , , Wed Jan 21 07:17:52 2015
-coralcdn.org, CoralCDN, INT, International, INT, TRUE, FALSE, Yes, http://www.torproject.org.nyud.net/, , , , http://www.torproject.org.nyud.net/dist/, , , , Thu Jan 8 17:01:06 2015
-hosting AT ph3x DOT at, ph3x, AT, Austria, Europe, TRUE, FALSE, No, http://torproject.ph3x.at, https://torproject.ph3x.at, , , http://torproject.ph3x.at/dist/, https://torproject.ph3x.at/dist/, , , Tue May 16 15:41:26 2017
-Tor Fan, Tor Supporter, MX, Mexico, MX, TRUE, FALSE, No, http://fbnaia.homelinux.net/torproject/, https://fbnaia.homelinux.net/torproject/, , , http://fbnaia.homelinux.net/torproject/dist/, https://fbnaia.homelinux.net/torproject/dist/, , , Tue May 16 15:41:26 2017
-webmaster AT askapache DOT com, AskApache, US, California, US, TRUE, FALSE, No, http://tor.askapache.com/, , , , http://tor.askapache.com/dist/, , , , Tue May 16 15:41:26 2017
-Tor Fan, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://tor.mirror.chekanov.net/, , , , http://tor.mirror.chekanov.net/dist/, , , , Tue Mar 17 02:53:03 2015
-kontakt AT unicorncloud DOT org, UnicornCloud.org, DE, Germany, Falkenstein, TRUE, FALSE, No, http://mirror.unicorncloud.org/torproject.org/, https://mirror.unicorncloud.org/torproject.org/, , , http://mirror.unicorncloud.org/torproject.org/dist, https://mirror.unicorncloud.org/torproject.org/dist, , , Tue May 16 15:41:26 2017
-root AT amorphis DOT eu, Amorphis, NL, The Netherlands, Europe, TRUE, FALSE, No, http://tor.amorphis.eu/, , , , http://tor.amorphis.eu/dist/, , , , Tue Mar 17 02:53:03 2015
+maki(a)maki-chan.de, Maki Hoshisawa, DE, Germany, DE, TRUE, FALSE, NO, http://tor.mirrors.maki-chan.de/, , , , http://tor.mirrors.maki-chan.de/dist/, , , , Sat Aug 23 17:09:07 2014
+info AT zentrum-der-gesundheit DOT de, Zentrum der Gesundheit, DK, Denmark, Europe, TRUE, FALSE, No, http://tor.idnr.ws/, , , , http://tor.idnr.ws/dist/, , , , Tue Sep 2 20:16:00 2014
+info /AT enn /DOT lu, Frenn vun der Enn A.S.B.L., IS, Iceland, Europe, TRUE, FALSE, No, http://torproject.lu/, , , , http://torproject.lu/dist/, , , http://btn6gqzqevlhoryd.onion, Mon May 29 15:15:41 2017
+Piratenpartei Bayern, Piratenpartei Bayern, DE, Germany, DE, TRUE, FALSE, NO, http://tormirror.piratenpartei-bayern.de, https://tormirror.piratenpartei-bayern.de, , , http://tormirror.piratenpartei-bayern.de/dist/, https://tormirror.piratenpartei-bayern.de/dist/, , , Thu Sep 8 10:46:02 2016
+Tor Fan, Tor Supporter, DE, Germany, DE, TRUE, TRUE, NO, http://tor.hoi-polloi.org, https://tor.hoi-polloi.org/, , , http://tor.hoi-polloi.org/dist/, https://tor.hoi-polloi.org/dist/, , , Thu May 4 03:12:25 2017
+tor(a)fodt.it // FoDT.it Webteam, FoDT.it, AT, Austria, Europe, TRUE, FALSE, No, http://tor.fodt.it, https://tor.fodt.it, , ftp://ftp.fodt.it/pub/mirrors/torproject.org/, http://tor.fodt.it/dist/, https://tor.fodt.it/dist/, , , Mon Aug 25 19:19:07 2014
+http://www.multinet.no, MultiNet AS, NO, Trondheim, Trondheim, TRUE, TRUE, No, http://tor.multinet.no/, , , , http://tor.multinet.no/dist/, , , , Mon May 29 15:15:41 2017
+haskell at gmx.es, Tor Supporter, ES, Spain, Europe, TRUE, TRUE, No, http://tor.zilog.es/, https://tor.zilog.es/, , , http://tor.zilog.es/dist/, https://tor.zilog.es/dist/, , , Mon May 29 15:15:41 2017
+Tor Fan, Tor Supporter, US, United States, US, TRUE, FALSE, No, http://199.175.55.215/, https://199.175.55.215/, , , http://199.175.55.215/dist/, https://199.175.55.215/dist/, , , Mon May 29 15:15:41 2017
+Tor Fan, Tor Supporter, US, United States, US, FALSE, TRUE, No, http://2607:8b00:2::6258:5c9/, https://2607:8b00:2::6258:5c9/, , , http://2607:8b00:2::6258:5c9/dist/, https://2607:8b00:2::6258:5c9/dist/, , , Wed Jan 21 12:17:52 2015
+margus.random at mail.ee, CyberSIDE, EE, Estonia, EE, TRUE, FALSE, No, http://cyberside.planet.ee/tor/, , , , http://cyberside.net.ee/tor/, , , , Mon May 29 15:15:41 2017
+Tor Fan, torproject.is, IS, Iceland, IS, TRUE, FALSE, No, http://www.torproject.is/, , , , http://www.torproject.is/dist/, , , , Mon May 29 15:15:41 2017
+Tor Fan, spline, DE, Germany, DE, TRUE, FALSE, No, http://tor.spline.de/, https://tor.spline.inf.fu-berlin.de/, rsync://ftp.spline.de/tor, ftp://ftp.spline.de/pub/tor, http://tor.spline.de/dist/, https://tor.spline.inf.fu-berlin.de/dist/, rsync://ftp.spline.de/tor/dist, , Mon May 29 15:15:41 2017
+Tor Fan, me0w.cc, RO, Romania, RO, TRUE, FALSE, No, http://tor.me0w.cc/, , , , http://tor.me0w.cc/dist/, , , , Fri Jan 2 12:17:56 2015
+Tor Fan, borgmann.tv, DE, Germany, DE, TRUE, FALSE, No, http://tor.borgmann.tv/, , , , http://tor.borgmann.tv/dist/, , , , Mon Jul 13 04:04:44 2015
+Tor Fan, Tor Supporter, AT, Austria, AT, TRUE, TRUE, No, http://tor.dont-know-me.at/, , , , http://tor.dont-know-me.at/dist/, , , , Wed Jan 21 12:17:52 2015
+coralcdn.org, CoralCDN, INT, International, INT, TRUE, FALSE, Yes, http://www.torproject.org.nyud.net/, , , , http://www.torproject.org.nyud.net/dist/, , , , Thu Jan 8 22:01:06 2015
+hosting AT ph3x DOT at, ph3x, AT, Austria, Europe, TRUE, FALSE, No, http://torproject.ph3x.at, https://torproject.ph3x.at, , , http://torproject.ph3x.at/dist/, https://torproject.ph3x.at/dist/, , , Mon May 29 15:15:41 2017
+Tor Fan, Tor Supporter, MX, Mexico, MX, TRUE, FALSE, No, http://fbnaia.homelinux.net/torproject/, https://fbnaia.homelinux.net/torproject/, , , http://fbnaia.homelinux.net/torproject/dist/, https://fbnaia.homelinux.net/torproject/dist/, , , Mon May 29 15:15:41 2017
+webmaster AT askapache DOT com, AskApache, US, California, US, TRUE, FALSE, No, http://tor.askapache.com/, , , , http://tor.askapache.com/dist/, , , , Mon May 29 15:15:41 2017
+Tor Fan, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://tor.mirror.chekanov.net/, , , , http://tor.mirror.chekanov.net/dist/, , , , Tue Mar 17 06:53:03 2015
+kontakt AT unicorncloud DOT org, UnicornCloud.org, DE, Germany, Falkenstein, TRUE, FALSE, No, http://mirror.unicorncloud.org/torproject.org/, https://mirror.unicorncloud.org/torproject.org/, , , http://mirror.unicorncloud.org/torproject.org/dist, https://mirror.unicorncloud.org/torproject.org/dist, , , Mon May 29 15:15:41 2017
+root AT amorphis DOT eu, Amorphis, NL, The Netherlands, Europe, TRUE, FALSE, No, http://tor.amorphis.eu/, , , , http://tor.amorphis.eu/dist/, , , , Tue Mar 17 06:53:03 2015
hackthissite.org, HackThisSite.org, US, United States, US, TRUE, TRUE, No, http://tor.hackthissite.org/, https://tor.hackthissite.org/, , , http://mirror.hackthissite.org/tor, https://mirror.hackthissite.org/tor, , , Wed May 25 21:09:20 2016
-paul at coffswifi.net, CoffsWiFi, AU, Australia and New Zealand, APNIC, TRUE, FALSE, No, http://torproject.coffswifi.net, , , , http://torproject.coffswifi.net/dist, , , , Tue May 16 15:41:26 2017
-Tor Fan, cyberarmy, AT, Austria, AT, TRUE, FALSE, No, http://tor.cyberarmy.at/, , , , , , , , Thu Jan 14 10:17:09 2016
-hostmaster AT example DOT com, TheOnionRouter, IS, Iceland, Iceland, TRUE, FALSE, No, http://www.theonionrouter.com/, , , , http://www.theonionrouter.com/dist/, , , , Tue May 16 15:41:26 2017
-Tor Fan, crazyhaze.de, DE, Germany, DE, TRUE, FALSE, No, http://tor.crazyhaze.de/, https://tor.crazyhaze.de/, , , http://tor.crazyhaze.de/dist/, https://tor.crazyhaze.de/dist/, , , Tue May 16 15:41:26 2017
-Tor Fan, chaos darmstadt, DE, Germany, Europe, TRUE, FALSE, No, http://mirrors.chaos-darmstadt.de/tor-mirror/, , , , http://mirrors.chaos-darmstadt.de/tor-mirror/dist/, , , , Sat Sep 12 22:14:19 2015
-Tor Fan, Soviet Anonymous, RU, Russia, RU, TRUE, FALSE, No, http://creep.im/tor, https://creep.im/tor, rsync://creep.im/tor, ftp://creep.im/mirrors/tor, http://creep.im/tor/dist/, https://creep.im/tor/dist/, rsync://creep.im/tor-dist, , Tue May 16 15:41:26 2017
-Tor Fan, torservers, DE, Germany, DE, TRUE, FALSE, No, http://www.torservers.net/mirrors/torproject.org/, https://www.torservers.net/mirrors/torproject.org/, , , http://www.torservers.net/mirrors/torproject.org/dist/, https://www.torservers.net/mirrors/torproject.org/dist/, , http://hbpvnydyyjbmhx6b.onion/mirrors/torproject.org/, Tue May 16 15:41:26 2017
-Tor Fan, torland, GB, United Kingdom, GB, TRUE, FALSE, No, http://mirror.torland.me/torproject.org/, https://mirror.torland.me/torproject.org/, , , http://mirror.torland.me/torproject.org/dist/, https://mirror.torland.me/torproject.org/dist/, , , Wed Apr 27 16:34:18 2016
-Tor Fan, Lightning-bolt.net, CZ, Czech Republic, CZ, TRUE, FALSE, No, http://torproject.lightning-bolt.net/, , , , http://torproject.lightning-bolt.net/dist/, , , , Tue Mar 17 02:53:03 2015
-IceBear, myRL.net, IS, Iceland, IS, TRUE, FALSE, No, http://tor.myrl.net/, https://tor.myrl.net/, , , http://tor.myrl.net/dist/, https://tor.myrl.net/dist/, , , Tue May 16 15:41:26 2017
-kiro AT userzap DOT de, Userzap, DE, Germany, DE, TRUE, FALSE, No, http://torprojekt.userzap.de, https://torprojekt.userzap.de, , , http://torprojekt.userzap.de/dist/, https://torprojekt.userzap.de/dist/, , , Wed Jan 21 07:17:52 2015
-tor(a)les.net, tor(a)les.net, CA, Canada, CA, TRUE, FALSE, NO, http://tor.les.net/, , , , http://tor.les.net/dist, , , , Tue May 16 15:41:26 2017
-tor(a)stalkr.net, stalkr.net, FR, France, FR, TRUE, TRUE, NO, http://tor.stalkr.net/, https://tor.stalkr.net/, , , http://tor.stalkr.net/dist/, https://tor.stalkr.net/dist/, , , Tue May 16 15:41:26 2017
-doemela[AT]cyberguerrilla[DOT]org, cYbergueRrilLa AnonyMous NeXus, DE, Germany, DE, TRUE, FALSE, NO, , https://tor-mirror.cyberguerrilla.org, , , , https://tor-mirror.cyberguerrilla.org/dist/, , http://6dvj6v5imhny3anf.onion, Tue May 16 15:41:26 2017
-contact(a)gtor.org, Gtor, DE, Germany, DE, TRUE, TRUE, NO, http://torproject.gtor.org/, https://torproject.gtor.org/, rsync://torproject.gtor.org/website-mirror/, , http://torproject.gtor.org/dist/, https://torproject.gtor.org/dist/, rsync://torproject.gtor.org/website-mirror/dist/, , Thu Sep 8 06:46:02 2016
-SDL, SDL, US, United States, US, TRUE, TRUE, NO, http://torproject.nexiom.net, https://torproject.nexiom.net, , , http://torproject.nexiom.net, https://torproject.nexiom.net/dist, , , Wed Jul 15 23:49:12 2015
-Tor Fan, Tor Supporter, DE, Germany, DE, TRUE, TRUE, NO, http://mirror.velcommuta.de/tor/, https://mirror.velcommuta.de/tor/, , , http://mirror.velcommuta.de/tor/dist/, https://mirror.velcommuta.de/tor/dist/, , , Tue May 16 15:41:26 2017
-EFF, EFF, US, United States, US, TRUE, FALSE, NO, , https://tor.eff.org, , , , https://tor.eff.org/dist/, , , Tue May 16 15:41:26 2017
-Tor Fan, Tor Supporter, GR, Greece, GR, TRUE, TRUE, NO, http://tor.void.gr, https://tor.void.gr, , , http://tor.void.gr/dist/, https://tor.void.gr/dist/, , , Tue May 16 15:41:26 2017
-Ich Eben, Tor Supporter, DE, Germany, DE, TRUE, TRUE, No, http://reichster.de/mirrors/torproject.org/, https://reichster.de/mirrors/torproject.org, , , http://reichster.de/mirrors/torproject.org/dist/, https://reichster.de/mirrors/torproject.org/dist/, , , Tue May 16 15:41:26 2017
-jlgaddis AT gnu DOT org, Evil Routers, US, United States, US, TRUE, FALSE, No, http://tor1.evilrouters.net/, , , , http://tor1.evilrouters.net/dist/, , , , Tue May 16 15:41:26 2017
-tor AT miglix DOT eu, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, NO, http://tor.miglix.eu, https://tor.miglix.eu, , , http://tor.miglix.eu/dist/, https://tor.miglix.eu/dist/, , , Thu Sep 8 06:46:02 2016
-tor TA ninurta TOD name, TorNinurtaName, AT, Austria, AT, TRUE, TRUE, no, http://tor.ninurta.name/, , , , http://tor.ninurta.name/dist/, , , , Wed Oct 22 20:02:17 2014
-fr33tux <AT> general-changelog-team.fr, Tor Supporter, FR, France, FR, TRUE, TRUE, No, http://tor.fr33tux.org, https://tor.fr33tux.org, , , http://tor.fr33tux.org/dist/, https://tor.fr33tux.org/dist/, , , Tue May 16 15:41:26 2017
-sebastian(at)bobrecki(dot)pl, Sebastian M. Bobrecki, PL, Poland, Europe, TRUE, FALSE, No, http://tor.iv.net.pl, https://tor.iv.net.pl, , , http://tor.iv.net.pl/dist/, https://tor.iv.net.pl/dist/, , , Sat Sep 12 22:14:19 2015
-tor-mirror AT rdns DOT cc, d0wn.biz, FR, France, Europe, TRUE, FALSE, No, http://tor.static.lu, https://tor.static.lu, , , http://tor.static.lu/dist/, https://tor.static.lu/dist/, , , Thu Sep 8 06:46:02 2016
-tor(a)moparisthebest.com, moparisthebest.com, DE, Germany, Europe, TRUE, TRUE, No, http://www.moparisthebest.com/tor/, https://www.moparisthebest.com/tor/, , , http://www.moparisthebest.com/tor/dist/, https://www.moparisthebest.com/tor/dist/, , , Tue May 16 15:41:26 2017
-Sebastian, Maxanoo, NL, The Netherlands, Amsterdam, TRUE, FALSE, NO, http://tor.maxanoo.com/, , , , http://tor.maxanoo.com/dist/, , , , Mon Jun 1 03:13:53 2015
-rorrim AT ayo DOT tl, Tor Supporter, IS, Iceland, Europe, TRUE, TRUE, No, http://ayo.tl/tor/, https://ayo.tl/tor/, , , http://ayo.tl/tor/dist/, https://ayo.tl/tor/dist/, , , Wed Jan 21 07:17:52 2015
-stefano.fenoglio AT gmail DOT com, Tor Supporter, IT, Italy, Europe, TRUE, FALSE, No, http://tor.stefanof.com, , , , http://tor.stefanof.com/dist, , , , Thu Sep 8 06:46:02 2016
-Tor Fan, Ramos Research, US, United States, US, TRUE, TRUE, No, http://tor.ramosresearch.com/, , , , http://tor.ramosresearch.com/dist/, , , , Tue Mar 17 02:53:03 2015
-Tor Fan, Tor Supporter, DE, Germany, Europe, TRUE, FALSE, No, http://tor.euve33747.vserver.de/, , , , http://tor.euve33747.vserver.de/dist, , , , Wed Jul 15 23:49:12 2015
-s7r[at]sky-ip[d0t]org, sky-ip.org, NL, Netherlands, NL, TRUE, FALSE, No, http://beautiful-mind.sky-ip.org/, , , , http://beautiful-mind.sky-ip.org/dist/, , , , Thu Sep 8 06:46:02 2016
-tor#pajonzeck#de, ITsn, DE, Germany, Europe, TRUE, FALSE, No, http://tor.pajonzeck.de/, https://tor.pajonzeck.de/, rsync://tor.pajonzeck.de/tor, , http://tor.pajonzeck.de/dist/, https://tor.pajonzeck.de/dist/, rsync://tor.pajonzeck.de/tor/dist, http://zgfgvob256pffy62.onion, Tue May 16 15:41:26 2017
-peter AT ludikovsky DOT name, Tor Supporter, AT, Austria, Europe, TRUE, TRUE, No, http://tor.ludikovsky.name/, https://tor.ludikovsky.name/, rsync://tor.ludikovsky.name/tor, , http://tor.ludikovsky.name/dist, https://tor.ludikovsky.name/dist, rsync://tor.ludikovsky.name/tor-dist, http://54lnbzjo6xlr4f4j.onion/, Tue May 16 15:41:26 2017
-admin AT nuclear DASH weapons DOT net, Setec Administrator, US, Texas, Austin, TRUE, FALSE, No, http://tor.nuclear-weapons.net, https://tor.nuclear-weapons.net, , , http://tor.nuclear-weapons.net/dist, https://tor.nuclear-weapons.net/dist, , , Tue May 16 15:41:26 2017
-0x43DE8191, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, No, http://torproject.hactar.bz, , , , http://torproject.hactar.bz/dist/, , , , Thu Sep 8 06:46:02 2016
-opi(a)zeropi.net, Tor Supporter, FR, France, FR, TRUE, TRUE, No, http://tor-mirror.zeropi.net/, , , , http://tor-mirror.zeropi.net/dist/, , , , Tue Dec 2 03:15:20 2014
-alexander AT dietrich DOT cx, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, No, http://tor.ybti.net/, https://tor.ybti.net/, , , http://tor.ybti.net/dist/, https://tor.ybti.net/dist/, , , Tue May 16 15:41:26 2017
-tor(a)0x3d.lu, 0x3d.lu, DE, Germany, Europe, TRUE, FALSE, No, http://tor.0x3d.lu/, https://tor.0x3d.lu/, , , http://tor.0x3d.lu/dist/, https://tor.0x3d.lu/dist/, , , Tue May 16 15:41:26 2017
-kraai(a)ftbfs.org 0xADCE6065, , SE, Sweden, Europe, TRUE, TRUE, No, http://tor.ftbfs.org/, , , , http://tor.ftbfs.org/dist/, , , , Fri Oct 24 13:28:32 2014
-kontakt(a)unicorncloud.org, UnicornCloud.org, AT, Favoriten, Wien, TRUE, TRUE, No, http://www.unicorncloud.org/public/torproject.org/, https://www.unicorncloud.org/public/torproject.org/, , , http://www.unicorncloud.org/public/torproject.org/dist, https://www.unicorncloud.org/public/torproject.org/dist, , , Tue Mar 17 02:53:03 2015
-James Murphy, intfxdx.com, US, United States, US, TRUE, TRUE, No, http://108.248.87.242/, https://108.248.87.242/, , , http://108.248.87.242/dist/, https://108.248.87.242/dist/, , , Tue May 16 15:41:26 2017
-Sam Whited 4096R/54083AE104EA7AD3 <sam(a)samwhited.com>, SamWhited.com, US, GA, United States, TRUE, TRUE, FALSE, http://mirrors.samwhited.net/tor, https://mirrors.samwhited.net/tor, rsync://mirrors.samwhited.net/tor, , http://mirrors.samwhited.net/tor/dist, https://mirrors.samwhited.net/tor/dist, rsync://mirrors.samwhited.net/tor-dist, , Wed Jul 15 23:49:12 2015
-rohit008 AT e DOT ntu DOT edu DOT sg, NTUOSS, SG, Singapore, Asia, TRUE, FALSE, No, http://torproject.ntuoss.com/, , , , http://torproject.ntuoss.com/dist/, , , , Tue Mar 17 02:53:03 2015
-Jacob Henner, Anatomical Networks, US, United States, US, TRUE, TRUE, TRUE, http://tor.ventricle.us/, , , , http://tor.ventricle.us/dist/, , , , Wed Jan 21 07:17:52 2015
-hostmaster(a)lucidnetworks.net, Lucid Networks, US, United States, US, TRUE, FALSE, No, http://tor.mirrors.lucidnetworks.net, , rsync://tor.mirrors.lucidnetworks.net::tor, , http://tor.mirrors.lucidnetworks.net/dist, , rsync://tor.mirrors.lucidnetworks.net::tor-dist, , Tue May 16 15:41:26 2017
-mirror ntzk de, Netzkonstrukt Berlin, DE, Germany, Europe, TRUE, FALSE, No, http://mirror.ntzk.de/torproject.org/, https://mirror.ntzk.de/torproject.org/, , , http://mirror.ntzk.de/torproject.org/dist/, https://mirror.ntzk.de/torproject.org/dist/, , , Tue May 16 15:41:26 2017
-mirror(a)xfree.com.ar, Xfree.com.ar, AR, Argentina, South America, TRUE, FALSE, No, http://tor.xfree.com.ar/, , , , http://tor.xfree.com.ar/dist/, , , , Wed Apr 27 10:44:33 2016
-tor AT eprci NET, EPRCI, US, NH, US, TRUE, FALSE, No, http://tor.eprci.net/, https://www.eprci.com/tor/, , , http://tor.eprci.net/dist/, https://www.eprci.com/tor/dist/, , , Tue May 16 15:41:26 2017
-tor(a)kura.io, KURA IO LIMITED, NL, Netherlands, Europe, TRUE, TRUE, TRUE, http://tor-mirror.kura.io/, https://tor-mirror.kura.io/, rsync://tor-mirror.kura.io/torproject.org, ftp://tor-mirror.kura.io, http://tor-mirror.kura.io/dist/, https://tor-mirror.kura.io/dist/, rsync://tor-mirror.kura.io/torproject.org/dist, , Fri Jan 23 07:27:59 2015
-tor-admin AT wardsback DOT org, wardsback.org, FR, France, FR, TRUE, FALSE, No, http://alliumcepa.wardsback.org/, , , , http://alliumcepa.wardsback.org/dist/, , , , Tue May 16 15:41:26 2017
-PW, PW, DE, Germany, DE, TRUE, TRUE, NO, http://tor.pw.is/, https://www.it-sicherheitschannel.de/, , , http://tor.pw.is/dist/, https://www.it-sicherheitschannel.de/dist/, , , Tue May 16 15:41:26 2017
-kevin(a)freedom.press, Freedom of the Press Foundation, , US, US, True, False, No, http://tor.freedom.press, https://tor.freedom.press, , , http://tor.freedom.press/dist/, https://tor.freedom.press/dist/, , , Thu Jan 14 10:17:09 2016
-hsu AT peterdavehellor DOT org, Department of CSE. Yuan Ze University, TW, Taiwan, Asia, TRUE, FALSE, No, http://ftp.yzu.edu.tw/torproject.org/, https://ftp.yzu.edu.tw/torproject.org/, rsync://ftp.yzu.edu.tw/pub/torproject.org/, ftp://ftp.yzu.edu.tw/torproject.org/, http://ftp.yzu.edu.tw/torproject.org/dist/, https://ftp.yzu.edu.tw/torproject.org/dist/, rsync://ftp.yzu.edu.tw/pub/torproject.org/dist/, , Tue May 16 15:41:26 2017
+paul at coffswifi.net, CoffsWiFi, AU, Australia and New Zealand, APNIC, TRUE, FALSE, No, http://torproject.coffswifi.net, , , , http://torproject.coffswifi.net/dist, , , , Mon May 29 15:15:41 2017
+Tor Fan, cyberarmy, AT, Austria, AT, TRUE, FALSE, No, http://tor.cyberarmy.at/, , , , , , , , Thu Jan 14 15:17:09 2016
+hostmaster AT example DOT com, TheOnionRouter, IS, Iceland, Iceland, TRUE, FALSE, No, http://www.theonionrouter.com/, , , , http://www.theonionrouter.com/dist/, , , , Mon May 29 15:15:41 2017
+Tor Fan, crazyhaze.de, DE, Germany, DE, TRUE, FALSE, No, http://tor.crazyhaze.de/, https://tor.crazyhaze.de/, , , http://tor.crazyhaze.de/dist/, https://tor.crazyhaze.de/dist/, , , Mon May 29 15:15:41 2017
+Tor Fan, chaos darmstadt, DE, Germany, Europe, TRUE, FALSE, No, http://mirrors.chaos-darmstadt.de/tor-mirror/, , , , http://mirrors.chaos-darmstadt.de/tor-mirror/dist/, , , , Sun Sep 13 02:14:19 2015
+Tor Fan, Soviet Anonymous, RU, Russia, RU, TRUE, FALSE, No, http://creep.im/tor, https://creep.im/tor, rsync://creep.im/tor, ftp://creep.im/mirrors/tor, http://creep.im/tor/dist/, https://creep.im/tor/dist/, rsync://creep.im/tor-dist, , Mon May 29 15:15:41 2017
+Tor Fan, torservers, DE, Germany, DE, TRUE, FALSE, No, http://www.torservers.net/mirrors/torproject.org/, https://www.torservers.net/mirrors/torproject.org/, , , http://www.torservers.net/mirrors/torproject.org/dist/, https://www.torservers.net/mirrors/torproject.org/dist/, , http://hbpvnydyyjbmhx6b.onion/mirrors/torproject.org/, Mon May 29 15:15:41 2017
+Tor Fan, torland, GB, United Kingdom, GB, TRUE, FALSE, No, http://mirror.torland.me/torproject.org/, https://mirror.torland.me/torproject.org/, , , http://mirror.torland.me/torproject.org/dist/, https://mirror.torland.me/torproject.org/dist/, , , Wed Apr 27 20:34:18 2016
+Tor Fan, Lightning-bolt.net, CZ, Czech Republic, CZ, TRUE, FALSE, No, http://torproject.lightning-bolt.net/, , , , http://torproject.lightning-bolt.net/dist/, , , , Tue Mar 17 06:53:03 2015
+IceBear, myRL.net, IS, Iceland, IS, TRUE, FALSE, No, http://tor.myrl.net/, https://tor.myrl.net/, , , http://tor.myrl.net/dist/, https://tor.myrl.net/dist/, , , Mon May 29 15:15:41 2017
+kiro AT userzap DOT de, Userzap, DE, Germany, DE, TRUE, FALSE, No, http://torprojekt.userzap.de, https://torprojekt.userzap.de, , , http://torprojekt.userzap.de/dist/, https://torprojekt.userzap.de/dist/, , , Wed Jan 21 12:17:52 2015
+tor(a)les.net, tor(a)les.net, CA, Canada, CA, TRUE, FALSE, NO, http://tor.les.net/, , , , http://tor.les.net/dist, , , , Mon May 29 15:15:41 2017
+tor(a)stalkr.net, stalkr.net, FR, France, FR, TRUE, TRUE, NO, http://tor.stalkr.net/, https://tor.stalkr.net/, , , http://tor.stalkr.net/dist/, https://tor.stalkr.net/dist/, , , Mon May 29 15:15:41 2017
+doemela[AT]cyberguerrilla[DOT]org, cYbergueRrilLa AnonyMous NeXus, DE, Germany, DE, TRUE, FALSE, NO, , https://tor-mirror.cyberguerrilla.org, , , , https://tor-mirror.cyberguerrilla.org/dist/, , http://6dvj6v5imhny3anf.onion, Mon May 29 15:15:41 2017
+contact(a)gtor.org, Gtor, DE, Germany, DE, TRUE, TRUE, NO, http://torproject.gtor.org/, https://torproject.gtor.org/, rsync://torproject.gtor.org/website-mirror/, , http://torproject.gtor.org/dist/, https://torproject.gtor.org/dist/, rsync://torproject.gtor.org/website-mirror/dist/, , Thu Sep 8 10:46:02 2016
+SDL, SDL, US, United States, US, TRUE, TRUE, NO, http://torproject.nexiom.net, https://torproject.nexiom.net, , , http://torproject.nexiom.net, https://torproject.nexiom.net/dist, , , Thu Jul 16 03:49:12 2015
+Tor Fan, Tor Supporter, DE, Germany, DE, TRUE, TRUE, NO, http://mirror.velcommuta.de/tor/, https://mirror.velcommuta.de/tor/, , , http://mirror.velcommuta.de/tor/dist/, https://mirror.velcommuta.de/tor/dist/, , , Mon May 29 15:15:41 2017
+EFF, EFF, US, United States, US, TRUE, FALSE, NO, , https://tor.eff.org, , , , https://tor.eff.org/dist/, , , Mon May 29 15:15:41 2017
+Tor Fan, Tor Supporter, GR, Greece, GR, TRUE, TRUE, NO, http://tor.void.gr, https://tor.void.gr, , , http://tor.void.gr/dist/, https://tor.void.gr/dist/, , , Mon May 29 15:15:41 2017
+Ich Eben, Tor Supporter, DE, Germany, DE, TRUE, TRUE, No, http://reichster.de/mirrors/torproject.org/, https://reichster.de/mirrors/torproject.org, , , http://reichster.de/mirrors/torproject.org/dist/, https://reichster.de/mirrors/torproject.org/dist/, , , Mon May 29 15:15:41 2017
+jlgaddis AT gnu DOT org, Evil Routers, US, United States, US, TRUE, FALSE, No, http://tor1.evilrouters.net/, , , , http://tor1.evilrouters.net/dist/, , , , Mon May 29 15:15:41 2017
+tor AT miglix DOT eu, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, NO, http://tor.miglix.eu, https://tor.miglix.eu, , , http://tor.miglix.eu/dist/, https://tor.miglix.eu/dist/, , , Thu Sep 8 10:46:02 2016
+tor TA ninurta TOD name, TorNinurtaName, AT, Austria, AT, TRUE, TRUE, no, http://tor.ninurta.name/, , , , http://tor.ninurta.name/dist/, , , , Thu Oct 23 00:02:17 2014
+fr33tux <AT> general-changelog-team.fr, Tor Supporter, FR, France, FR, TRUE, TRUE, No, http://tor.fr33tux.org, https://tor.fr33tux.org, , , http://tor.fr33tux.org/dist/, https://tor.fr33tux.org/dist/, , , Mon May 29 15:15:41 2017
+sebastian(at)bobrecki(dot)pl, Sebastian M. Bobrecki, PL, Poland, Europe, TRUE, FALSE, No, http://tor.iv.net.pl, https://tor.iv.net.pl, , , http://tor.iv.net.pl/dist/, https://tor.iv.net.pl/dist/, , , Sun Sep 13 02:14:19 2015
+tor-mirror AT rdns DOT cc, d0wn.biz, FR, France, Europe, TRUE, FALSE, No, http://tor.static.lu, https://tor.static.lu, , , http://tor.static.lu/dist/, https://tor.static.lu/dist/, , , Thu Sep 8 10:46:02 2016
+tor(a)moparisthebest.com, moparisthebest.com, DE, Germany, Europe, TRUE, TRUE, No, http://www.moparisthebest.com/tor/, https://www.moparisthebest.com/tor/, , , http://www.moparisthebest.com/tor/dist/, https://www.moparisthebest.com/tor/dist/, , , Mon May 29 15:15:41 2017
+Sebastian, Maxanoo, NL, The Netherlands, Amsterdam, TRUE, FALSE, NO, http://tor.maxanoo.com/, , , , http://tor.maxanoo.com/dist/, , , , Mon Jun 1 07:13:53 2015
+rorrim AT ayo DOT tl, Tor Supporter, IS, Iceland, Europe, TRUE, TRUE, No, http://ayo.tl/tor/, https://ayo.tl/tor/, , , http://ayo.tl/tor/dist/, https://ayo.tl/tor/dist/, , , Wed Jan 21 12:17:52 2015
+stefano.fenoglio AT gmail DOT com, Tor Supporter, IT, Italy, Europe, TRUE, FALSE, No, http://tor.stefanof.com, , , , http://tor.stefanof.com/dist, , , , Thu Sep 8 10:46:02 2016
+Tor Fan, Ramos Research, US, United States, US, TRUE, TRUE, No, http://tor.ramosresearch.com/, , , , http://tor.ramosresearch.com/dist/, , , , Tue Mar 17 06:53:03 2015
+Tor Fan, Tor Supporter, DE, Germany, Europe, TRUE, FALSE, No, http://tor.euve33747.vserver.de/, , , , http://tor.euve33747.vserver.de/dist, , , , Thu Jul 16 03:49:12 2015
+s7r[at]sky-ip[d0t]org, sky-ip.org, NL, Netherlands, NL, TRUE, FALSE, No, http://beautiful-mind.sky-ip.org/, , , , http://beautiful-mind.sky-ip.org/dist/, , , , Thu Sep 8 10:46:02 2016
+tor#pajonzeck#de, ITsn, DE, Germany, Europe, TRUE, FALSE, No, http://tor.pajonzeck.de/, https://tor.pajonzeck.de/, rsync://tor.pajonzeck.de/tor, , http://tor.pajonzeck.de/dist/, https://tor.pajonzeck.de/dist/, rsync://tor.pajonzeck.de/tor/dist, http://zgfgvob256pffy62.onion, Mon May 29 15:15:41 2017
+peter AT ludikovsky DOT name, Tor Supporter, AT, Austria, Europe, TRUE, TRUE, No, http://tor.ludikovsky.name/, https://tor.ludikovsky.name/, rsync://tor.ludikovsky.name/tor, , http://tor.ludikovsky.name/dist, https://tor.ludikovsky.name/dist, rsync://tor.ludikovsky.name/tor-dist, http://54lnbzjo6xlr4f4j.onion/, Mon May 29 15:15:41 2017
+admin AT nuclear DASH weapons DOT net, Setec Administrator, US, Texas, Austin, TRUE, FALSE, No, http://tor.nuclear-weapons.net, https://tor.nuclear-weapons.net, , , http://tor.nuclear-weapons.net/dist, https://tor.nuclear-weapons.net/dist, , , Mon May 29 15:15:41 2017
+0x43DE8191, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, No, http://torproject.hactar.bz, , , , http://torproject.hactar.bz/dist/, , , , Thu Sep 8 10:46:02 2016
+opi(a)zeropi.net, Tor Supporter, FR, France, FR, TRUE, TRUE, No, http://tor-mirror.zeropi.net/, , , , http://tor-mirror.zeropi.net/dist/, , , , Tue Dec 2 08:15:20 2014
+alexander AT dietrich DOT cx, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, No, http://tor.ybti.net/, https://tor.ybti.net/, , , http://tor.ybti.net/dist/, https://tor.ybti.net/dist/, , , Mon May 29 15:15:41 2017
+tor(a)0x3d.lu, 0x3d.lu, DE, Germany, Europe, TRUE, FALSE, No, http://tor.0x3d.lu/, https://tor.0x3d.lu/, , , http://tor.0x3d.lu/dist/, https://tor.0x3d.lu/dist/, , , Mon May 29 15:15:41 2017
+kraai(a)ftbfs.org 0xADCE6065, , SE, Sweden, Europe, TRUE, TRUE, No, http://tor.ftbfs.org/, , , , http://tor.ftbfs.org/dist/, , , , Fri Oct 24 17:28:32 2014
+kontakt(a)unicorncloud.org, UnicornCloud.org, AT, Favoriten, Wien, TRUE, TRUE, No, http://www.unicorncloud.org/public/torproject.org/, https://www.unicorncloud.org/public/torproject.org/, , , http://www.unicorncloud.org/public/torproject.org/dist, https://www.unicorncloud.org/public/torproject.org/dist, , , Tue Mar 17 06:53:03 2015
+James Murphy, intfxdx.com, US, United States, US, TRUE, TRUE, No, http://108.248.87.242/, https://108.248.87.242/, , , http://108.248.87.242/dist/, https://108.248.87.242/dist/, , , Mon May 29 15:15:41 2017
+Sam Whited 4096R/54083AE104EA7AD3 <sam(a)samwhited.com>, SamWhited.com, US, GA, United States, TRUE, TRUE, FALSE, http://mirrors.samwhited.net/tor, https://mirrors.samwhited.net/tor, rsync://mirrors.samwhited.net/tor, , http://mirrors.samwhited.net/tor/dist, https://mirrors.samwhited.net/tor/dist, rsync://mirrors.samwhited.net/tor-dist, , Thu Jul 16 03:49:12 2015
+rohit008 AT e DOT ntu DOT edu DOT sg, NTUOSS, SG, Singapore, Asia, TRUE, FALSE, No, http://torproject.ntuoss.com/, , , , http://torproject.ntuoss.com/dist/, , , , Tue Mar 17 06:53:03 2015
+Jacob Henner, Anatomical Networks, US, United States, US, TRUE, TRUE, TRUE, http://tor.ventricle.us/, , , , http://tor.ventricle.us/dist/, , , , Wed Jan 21 12:17:52 2015
+hostmaster(a)lucidnetworks.net, Lucid Networks, US, United States, US, TRUE, FALSE, No, http://tor.mirrors.lucidnetworks.net, , rsync://tor.mirrors.lucidnetworks.net::tor, , http://tor.mirrors.lucidnetworks.net/dist, , rsync://tor.mirrors.lucidnetworks.net::tor-dist, , Mon May 29 15:15:41 2017
+mirror ntzk de, Netzkonstrukt Berlin, DE, Germany, Europe, TRUE, FALSE, No, http://mirror.ntzk.de/torproject.org/, https://mirror.ntzk.de/torproject.org/, , , http://mirror.ntzk.de/torproject.org/dist/, https://mirror.ntzk.de/torproject.org/dist/, , , Mon May 29 15:15:41 2017
+mirror(a)xfree.com.ar, Xfree.com.ar, AR, Argentina, South America, TRUE, FALSE, No, http://tor.xfree.com.ar/, , , , http://tor.xfree.com.ar/dist/, , , , Wed Apr 27 14:44:33 2016
+tor AT eprci NET, EPRCI, US, NH, US, TRUE, FALSE, No, http://tor.eprci.net/, https://www.eprci.com/tor/, , , http://tor.eprci.net/dist/, https://www.eprci.com/tor/dist/, , , Mon May 29 15:15:41 2017
+tor(a)kura.io, KURA IO LIMITED, NL, Netherlands, Europe, TRUE, TRUE, TRUE, http://tor-mirror.kura.io/, https://tor-mirror.kura.io/, rsync://tor-mirror.kura.io/torproject.org, ftp://tor-mirror.kura.io, http://tor-mirror.kura.io/dist/, https://tor-mirror.kura.io/dist/, rsync://tor-mirror.kura.io/torproject.org/dist, , Fri Jan 23 12:27:59 2015
+tor-admin AT wardsback DOT org, wardsback.org, FR, France, FR, TRUE, FALSE, No, http://alliumcepa.wardsback.org/, , , , http://alliumcepa.wardsback.org/dist/, , , , Mon May 29 15:15:41 2017
+PW, PW, DE, Germany, DE, TRUE, TRUE, NO, http://tor.pw.is/, https://www.it-sicherheitschannel.de/, , , http://tor.pw.is/dist/, https://www.it-sicherheitschannel.de/dist/, , , Mon May 29 15:15:41 2017
+kevin(a)freedom.press, Freedom of the Press Foundation, , US, US, True, False, No, http://tor.freedom.press, https://tor.freedom.press, , , http://tor.freedom.press/dist/, https://tor.freedom.press/dist/, , , Thu Jan 14 15:17:09 2016
+hsu AT peterdavehellor DOT org, Department of CSE. Yuan Ze University, TW, Taiwan, Asia, TRUE, FALSE, No, http://ftp.yzu.edu.tw/torproject.org/, https://ftp.yzu.edu.tw/torproject.org/, rsync://ftp.yzu.edu.tw/pub/torproject.org/, ftp://ftp.yzu.edu.tw/torproject.org/, http://ftp.yzu.edu.tw/torproject.org/dist/, https://ftp.yzu.edu.tw/torproject.org/dist/, rsync://ftp.yzu.edu.tw/pub/torproject.org/dist/, , Mon May 29 15:15:41 2017
tormirror at sybec.net <mailto:tormirror at sybec.net>, Sybec Services Ltd., DE, Germany, DE, TRUE, FALSE, FALSE, http://tormirror.sybec.net:8080/ <http://tormirror.sybec.net:8080/>, , , , http://tormirror.sybec.net:8080/dist/ <http://tormirror.sybec.net:8080/dist/>, , , ,
-tor at tvdw dot eu, TvdW, XX, Around the world, XX, TRUE, TRUE, Yes, http://tor-exit.network, , , , http://tor-exit.network/dist, , , , Tue May 16 15:41:26 2017
-spiderfly AT protonmail DOT com, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://onionphysics.com, , , , http://onionphysics.com/dist/, , , , Sat Sep 12 22:14:19 2015
-tormaster AT urown DOT net, urown.net, CH, Switzerland, Europe, TRUE, TRUE, No, http://torproject.urown.net/, https://torproject.urown.net/, , , http://torproject.urown.net/dist/, https://torproject.urown.net/dist/, , http://torprowdd64ytmyk.onion, Tue May 16 15:41:26 2017
-Stefan, sela Internet, DE, Germany, DE, TRUE, TRUE, No, http://sela.io/mirrors/torproject.org/, https://sela.io/mirrors/torproject.org/, , , http://sela.io/mirrors/torproject.org/dist/, https://sela.io/mirrors/torproject.org/dist/, , , Tue May 16 15:41:26 2017
-thomaswhite AT riseup DOT net, TheCthulhu, NL, The Netherlands, NL, True, False, No, http://tor.thecthulhu.com/, https://tor.thecthulhu.com/, , , http://tor.thecthulhu.com/dist/, https://tor.thecthulhu.com/dist/, , , Thu Sep 8 06:46:02 2016
-rush23 AT gmx DOT net, Tor Supporter, DE, Germany, Europe, TRUE, FALSE, No, http://tor-proxy.euve59946.serverprofi24.de/, , , , http://tor-proxy.euve59946.serverprofi24.de/dist/, , , , Fri Jun 5 00:06:42 2015
-webmaster AT ccc DOT de, Chaos Computer Club, DE, Germany, Europe, TRUE, FALSE, No, http://tor.ccc.de/, https://tor.ccc.de, , , http://tor.ccc.de/dist/, https://tor.ccc.de/dist/, , , Mon May 8 23:41:04 2017
-Tor AT goodeid DOT com, Tor Supporter, CA, Canada, CA, TRUE, FALSE, No, http://goodeid.com/mirrors/tor-project.org/, , , , http://goodeid.com/mirrors/tor-project.org/dist/, , , , Thu Sep 8 06:46:02 2016
-tor(a)alenan.org, Alenan e.V., FR, France, Europe, TRUE, FALSE, No, http://tormirror.xyz, https://tormirror.xyz, , , http://tormirror.xyz/dist, https://tormirror.xyz/dist, , , Thu Jan 14 10:17:09 2016
-tor(a)datensicherhe.it, datensicherhe.it, AT, Austria, Europe, TRUE, FALSE, No, http://datensicherhe.it/torproject, https://datensicherhe.it/torproject, , , http://datensicherhe.it/torproject/dist/, https://datensicherhe.it/torproject/dist/, , , Thu Sep 8 06:46:02 2016
+tor at tvdw dot eu, TvdW, XX, Around the world, XX, TRUE, TRUE, Yes, http://tor-exit.network, , , , http://tor-exit.network/dist, , , , Mon May 29 15:15:41 2017
+spiderfly AT protonmail DOT com, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://onionphysics.com, , , , http://onionphysics.com/dist/, , , , Sun Sep 13 02:14:19 2015
+tormaster AT urown DOT net, urown.net, CH, Switzerland, Europe, TRUE, TRUE, No, http://torproject.urown.net/, https://torproject.urown.net/, , , http://torproject.urown.net/dist/, https://torproject.urown.net/dist/, , http://torprowdd64ytmyk.onion, Mon May 29 15:15:41 2017
+Stefan, sela Internet, DE, Germany, DE, TRUE, TRUE, No, http://sela.io/mirrors/torproject.org/, https://sela.io/mirrors/torproject.org/, , , http://sela.io/mirrors/torproject.org/dist/, https://sela.io/mirrors/torproject.org/dist/, , , Mon May 29 15:15:41 2017
+thomaswhite AT riseup DOT net, TheCthulhu, NL, The Netherlands, NL, True, False, No, http://tor.thecthulhu.com/, https://tor.thecthulhu.com/, , , http://tor.thecthulhu.com/dist/, https://tor.thecthulhu.com/dist/, , , Thu Sep 8 10:46:02 2016
+rush23 AT gmx DOT net, Tor Supporter, DE, Germany, Europe, TRUE, FALSE, No, http://tor-proxy.euve59946.serverprofi24.de/, , , , http://tor-proxy.euve59946.serverprofi24.de/dist/, , , , Fri Jun 5 04:06:42 2015
+webmaster AT ccc DOT de, Chaos Computer Club, DE, Germany, Europe, TRUE, FALSE, No, http://tor.ccc.de/, https://tor.ccc.de, , , http://tor.ccc.de/dist/, https://tor.ccc.de/dist/, , , Tue May 9 03:41:04 2017
+Tor AT goodeid DOT com, Tor Supporter, CA, Canada, CA, TRUE, FALSE, No, http://goodeid.com/mirrors/tor-project.org/, , , , http://goodeid.com/mirrors/tor-project.org/dist/, , , , Thu Sep 8 10:46:02 2016
+tor(a)alenan.org, Alenan e.V., FR, France, Europe, TRUE, FALSE, No, http://tormirror.xyz, https://tormirror.xyz, , , http://tormirror.xyz/dist, https://tormirror.xyz/dist, , , Thu Jan 14 15:17:09 2016
+tor(a)datensicherhe.it, datensicherhe.it, AT, Austria, Europe, TRUE, FALSE, No, http://datensicherhe.it/torproject, https://datensicherhe.it/torproject, , , http://datensicherhe.it/torproject/dist/, https://datensicherhe.it/torproject/dist/, , , Thu Sep 8 10:46:02 2016
NocturnalFilth, Disciples of Disorder, NL, Netherlands, NL, TRUE, FALSE, NO, http://torproject.mirror.disciplesofdisorder.com, https://torproject.mirror.disciplesofdisorder.com, , , http://torproject.mirror.disciplesofdisorder.com/dist/, https://torproject.mirror.disciplesofdisorder.com/dist/, , , Mon May 15 23:00:42 2017
-tormirror0121.10.swsnyder(a)spamgourmet.com, tormirror, DE, Germany, TRUE, FALSE, NO, http://tormirror.snydernet.net/, https://tormirror.snydernet.net/, , , http://tormirror.snydernet.net/dist/, https://tormirror.snydernet.net/dist/, , , Mon Dec 28 17:11:31 2015, Tue May 16 15:41:26 2017
-justaguy(a)riseup.net, Justaguy, FR, France, FR, TRUE, FALSE, No, http://tormirror.justaguy.pw/, https://tormirror.justaguy.pw, , , http://tormirror.justaguy.pw/dist/, https://tormirror.justaguy.pw/dist/, , , Thu Jan 14 10:17:09 2016
-Tor Fan, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://tor.hermes.bendellar.com, https://tor.hermes.bendellar.com, , , http://tor.hermes.bendellar.com/dist, https://tor.hermes.bendellar.com/dist, , , Wed Apr 27 16:34:18 2016
-Disciples of Disorder, Vargr, NL, Netherlands, NL, TRUE, FALSE, NO, http://tor.mirror.disciplesofdisorder.eu, https://tor.mirror.disciplesofdisorder.eu, , , http://tor.mirror.disciplesofdisorder.eu/dist/, https://tor.mirror.disciplesofdisorder.eu/dist/, , http://vargrevir52vkbte.onion, Tue Dec 22 06:50:00 2015
+tormirror0121.10.swsnyder(a)spamgourmet.com, tormirror, DE, Germany, TRUE, FALSE, NO, http://tormirror.snydernet.net/, https://tormirror.snydernet.net/, , , http://tormirror.snydernet.net/dist/, https://tormirror.snydernet.net/dist/, , , Mon Dec 28 17:11:31 2015, Mon May 29 15:15:41 2017
+justaguy(a)riseup.net, Justaguy, FR, France, FR, TRUE, FALSE, No, http://tormirror.justaguy.pw/, https://tormirror.justaguy.pw, , , http://tormirror.justaguy.pw/dist/, https://tormirror.justaguy.pw/dist/, , , Thu Jan 14 15:17:09 2016
+Tor Fan, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://tor.hermes.bendellar.com, https://tor.hermes.bendellar.com, , , http://tor.hermes.bendellar.com/dist, https://tor.hermes.bendellar.com/dist, , , Wed Apr 27 20:34:18 2016
+Disciples of Disorder, Vargr, NL, Netherlands, NL, TRUE, FALSE, NO, http://tor.mirror.disciplesofdisorder.eu, https://tor.mirror.disciplesofdisorder.eu, , , http://tor.mirror.disciplesofdisorder.eu/dist/, https://tor.mirror.disciplesofdisorder.eu/dist/, , http://vargrevir52vkbte.onion, Tue Dec 22 11:50:00 2015
torrelay anonymized io, Anonymized.io, CA, Canada, CA, TRUE, FALSE, FALSE, http://http://torproject.anonymized.io/, https://http://torproject.anonymized.io/, , , http://torproject.anonymized.io/dist/, https://torproject.anonymized.io/dist/, , ,
tor(a)alenan.org, Alenan e.V., FR, France, Europe, TRUE, FALSE, No, http://tormirror.top, https://tormirror.top, , , http://tormirror.top/dist, https://tormirror.top/dist, , ,
tor(a)alenan.org, Alenan e.V., FR, France, Europe, TRUE, FALSE, No, , https://mirrors.alenan.org/torproject.org/index.html.en, , , , https://mirrors.alenan.org/torproject.org/dist, , ,
Unixcorn staff, unixcorn.org, FR, France, Europe, TRUE, FALSE, No, http://tor.unixcorn.org/, https://tor.unixcorn.org/, , , http://tor.unixcorn.org/dist/, https://tor.unixcorn.org/dist/, , ,
-nick at calyx dot com, The Calyx Institute, US, United States, North America, TRUE, FALSE, No, http://tor.calyxinstitute.org, https://tor.calyxinstitute.org, , , http://tor.calyxinstitute.org/dist/, https://tor.calyxinstitute.org/dist/, , http://tmdrhl4e4anhsjc5.onion, Tue May 16 15:41:26 2017
-tor(a)armbrust.me, Michael Armbruster, FR, France, FR, TRUE, TRUE, No, http://tor.armbrust.me/, https://tor.armbrust.me/, rsync://tor.armbrust.me/tor, , http://tor.armbrust.me/dist/, https://tor.armbrust.me/dist, rsync://tor.armbrust.me/tor-dist, , Tue May 16 15:41:26 2017
-HdO Tor, HdO Tor Supporter, DE, Germany, US, TRUE, TRUE, No, http://tor.hdoev.de/, , , , http://tor.hdoev.de/dist/, , , , Thu Sep 8 06:46:02 2016
-Tor Fan, Tor Supporter, DE, Germany, Germany, TRUE, TRUE, No, http://torproject.mirror.metalgamer.eu/, https://torproject.mirror.metalgamer.eu/, , , http://torproject.mirror.metalgamer.eu/dist/, https://torproject.mirror.metalgamer.eu/dist/, , , Tue May 16 15:41:26 2017
-john AT quintex.com, Quintex Alliance Consulting, US, TX, US, TRUE, FALSE, No, http://torproject.quintex.com/, https://torproject.quintex.com, rsync://mirror.quintex.com/torprojectwebsite, ftp://mirror.quintex.com/torproject.org, http://torproject.quintex.com/dist, https://torproject.quintex.com/dist, rsync://mirror.quintex.com/torprojectdist, , Thu Sep 8 06:46:02 2016
-aldousa at riseup.net, michael ball (https://anarchism.me) US, United States, North America, TRUE, TRUE, No, http://mirrors.anarchism.me, https://mirrors.anarchism.me, , , http://mirrors.anarchism.me/dist, https://mirrors.anarchism.me/dist, , http://gaobjvqqrlotey4d.onion/, Sun Aug 7 10:40:00 2016
-noc AT babylon DOT network, Babylon Network, CA, Canada, CA, TRUE, TRUE, No, http://ca.mirror.babylon.network/torproject/, https://ca.mirror.babylon.network/torproject/, rsync://ca.mirror.babylon.network/torproject/, ftp://ca.mirror.babylon.network/torproject/, http://ca.mirror.babylon.network/torproject/dist/, https://ca.mirror.babylon.network/torproject/dist/, rsync://ca.mirror.babylon.network/torproject/dist/, , Tue May 16 15:41:26 2017
-noc AT babylon DOT network, Babylon Network, NL, The Netherlands, Europe, TRUE, TRUE, No, http://nl.mirror.babylon.network/torproject/, https://nl.mirror.babylon.network/torproject/, rsync://nl.mirror.babylon.network/torproject/, ftp://nl.mirror.babylon.network/torproject/, http://nl.mirror.babylon.network/torproject/dist/, https://nl.mirror.babylon.network/torproject/dist/, rsync://nl.mirror.babylon.network/torproject/dist/, , Tue May 16 15:41:26 2017
-noc AT babylon DOT network, Babylon Network, FR, France, Europe, TRUE, TRUE, No, http://fr.mirror.babylon.network/torproject/, https://fr.mirror.babylon.network/torproject/, rsync://fr.mirror.babylon.network/torproject/, ftp://fr.mirror.babylon.network/torproject/, http://fr.mirror.babylon.network/torproject/dist/, https://fr.mirror.babylon.network/torproject/dist/, rsync://fr.mirror.babylon.network/torproject/dist/, , Tue May 16 15:41:26 2017
+nick at calyx dot com, The Calyx Institute, US, United States, North America, TRUE, FALSE, No, http://tor.calyxinstitute.org, https://tor.calyxinstitute.org, , , http://tor.calyxinstitute.org/dist/, https://tor.calyxinstitute.org/dist/, , http://tmdrhl4e4anhsjc5.onion, Mon May 29 15:15:41 2017
+tor(a)armbrust.me, Michael Armbruster, FR, France, FR, TRUE, TRUE, No, http://tor.armbrust.me/, https://tor.armbrust.me/, rsync://tor.armbrust.me/tor, , http://tor.armbrust.me/dist/, https://tor.armbrust.me/dist, rsync://tor.armbrust.me/tor-dist, , Mon May 29 15:15:41 2017
+HdO Tor, HdO Tor Supporter, DE, Germany, US, TRUE, TRUE, No, http://tor.hdoev.de/, , , , http://tor.hdoev.de/dist/, , , , Thu Sep 8 10:46:02 2016
+Tor Fan, Tor Supporter, DE, Germany, Germany, TRUE, TRUE, No, http://torproject.mirror.metalgamer.eu/, https://torproject.mirror.metalgamer.eu/, , , http://torproject.mirror.metalgamer.eu/dist/, https://torproject.mirror.metalgamer.eu/dist/, , , Mon May 29 15:15:41 2017
+john AT quintex.com, Quintex Alliance Consulting, US, TX, US, TRUE, FALSE, No, http://torproject.quintex.com/, https://torproject.quintex.com, rsync://mirror.quintex.com/torprojectwebsite, ftp://mirror.quintex.com/torproject.org, http://torproject.quintex.com/dist, https://torproject.quintex.com/dist, rsync://mirror.quintex.com/torprojectdist, , Thu Sep 8 10:46:02 2016
+aldousa at riseup.net, michael ball (https://anarchism.me) US, United States, North America, TRUE, TRUE, No, http://mirrors.anarchism.me, https://mirrors.anarchism.me, , , http://mirrors.anarchism.me/dist, https://mirrors.anarchism.me/dist, , http://gaobjvqqrlotey4d.onion/, Sun Aug 7 14:40:00 2016
+noc AT babylon DOT network, Babylon Network, CA, Canada, CA, TRUE, TRUE, No, http://ca.mirror.babylon.network/torproject/, https://ca.mirror.babylon.network/torproject/, rsync://ca.mirror.babylon.network/torproject/, ftp://ca.mirror.babylon.network/torproject/, http://ca.mirror.babylon.network/torproject/dist/, https://ca.mirror.babylon.network/torproject/dist/, rsync://ca.mirror.babylon.network/torproject/dist/, , Mon May 29 15:15:41 2017
+noc AT babylon DOT network, Babylon Network, NL, The Netherlands, Europe, TRUE, TRUE, No, http://nl.mirror.babylon.network/torproject/, https://nl.mirror.babylon.network/torproject/, rsync://nl.mirror.babylon.network/torproject/, ftp://nl.mirror.babylon.network/torproject/, http://nl.mirror.babylon.network/torproject/dist/, https://nl.mirror.babylon.network/torproject/dist/, rsync://nl.mirror.babylon.network/torproject/dist/, , Mon May 29 15:15:41 2017
+noc AT babylon DOT network, Babylon Network, FR, France, Europe, TRUE, TRUE, No, http://fr.mirror.babylon.network/torproject/, https://fr.mirror.babylon.network/torproject/, rsync://fr.mirror.babylon.network/torproject/, ftp://fr.mirror.babylon.network/torproject/, http://fr.mirror.babylon.network/torproject/dist/, https://fr.mirror.babylon.network/torproject/dist/, rsync://fr.mirror.babylon.network/torproject/dist/, , Mon May 29 15:15:41 2017
Pool Toys, Pool Toys, SGP, Singapore, SGP, TRUE, TRUE, No, http://mirrors-sg.pooltoys.com/tor/, , rsync://mirrors-sg.pooltoys.com/tor/, ftp://mirrors-sg.pooltoys.com/tor/, http://mirrors-sg.pooltoys.com/tor/, , , ,
-cyberrax at yahoo.com, CyberSiDE, EE, Estonia, Europe, TRUE, FALSE, No, http://cyberside.net.ee/sibul/, https://cyberside.net.ee/sibul/, , , http://cyberside.net.ee/sibul/dist/, https://cyberside.net.ee/sibul/dist/, , , Tue May 16 15:41:26 2017
-torsupport AT tb-itf DOT de, TB-ITF, DE, Germany, Europe, TRUE, TRUE, No, http://tormirror.tb-itf-tor.de, https://tormirror.tb-itf-tor.de, , ftp://tormirror.tb-itf-tor.de/, http://tormirror.tb-itf-tor.de/dist/, https://tormirror.tb-itf-tor.de/dist/, , , Tue May 16 15:41:26 2017
+cyberrax at yahoo.com, CyberSiDE, EE, Estonia, Europe, TRUE, FALSE, No, http://cyberside.net.ee/sibul/, https://cyberside.net.ee/sibul/, , , http://cyberside.net.ee/sibul/dist/, https://cyberside.net.ee/sibul/dist/, , , Mon May 29 15:15:41 2017
+torsupport AT tb-itf DOT de, TB-ITF, DE, Germany, Europe, TRUE, TRUE, No, http://tormirror.tb-itf-tor.de, https://tormirror.tb-itf-tor.de, , ftp://tormirror.tb-itf-tor.de/, http://tormirror.tb-itf-tor.de/dist/, https://tormirror.tb-itf-tor.de/dist/, , , Mon May 29 15:15:41 2017
Disciples of Disorder, Vargr, NL, Netherlands, NL, TRUE, FALSE, NO, http://tor.mirror.disciplesofdisorder.eu, https://tor.mirror.disciplesofdisorder.eu, , , http://tor.mirror.disciplesofdisorder.eu/dist/, https://tor.mirror.disciplesofdisorder.eu/dist/, , http://vargrevir52vkbte.onion,
-admin @T standaloneinstaler.com, Standalone Installer Software, FR, France, FR, TRUE, TRUE, No, http://mirrors.standaloneinstaller.com/torproject/, , rsync://mirrors.standaloneinstaller.com/torproject/, , http://mirrors.standaloneinstaller.com/torproject/dist, , rsync://mirrors.standaloneinstaller.com/torproject/dist, , Tue May 16 15:41:26 2017
-lutz.horn(a)posteo.de, , DE, Germany, DE, TRUE, FALSE, No, , https://tor.lhorn.de/, , , , https://tor.lhorn.de/dist/, , , Mon Feb 6 10:00:00 2017
-karibu(a)freedif.org, Freedif, VN, Vietnam, VN, TRUE, FALSE, No, http://mirror.freedif.org/TorProject/, https://mirror.freedif.org/TorProject/, , , http://mirror.freedif.org/TorProject/dist, https://mirror.freedif.org/TorProject/dist, , , Tue May 16 15:41:26 2017
-Tor Fan, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://torproject.xj1.fr/, , , , http://torproject.xj1.fr/dist/, , , javkk6746z7wvigk.onion, Tue May 16 15:41:26 2017
+admin @T standaloneinstaler.com, Standalone Installer Software, FR, France, FR, TRUE, TRUE, No, http://mirrors.standaloneinstaller.com/torproject/, , rsync://mirrors.standaloneinstaller.com/torproject/, , http://mirrors.standaloneinstaller.com/torproject/dist, , rsync://mirrors.standaloneinstaller.com/torproject/dist, , Mon May 29 15:15:41 2017
+lutz.horn(a)posteo.de, , DE, Germany, DE, TRUE, FALSE, No, , https://tor.lhorn.de/, , , , https://tor.lhorn.de/dist/, , , Mon Feb 6 15:00:00 2017
+karibu(a)freedif.org, Freedif, VN, Vietnam, VN, TRUE, FALSE, No, http://mirror.freedif.org/TorProject/, https://mirror.freedif.org/TorProject/, , , http://mirror.freedif.org/TorProject/dist, https://mirror.freedif.org/TorProject/dist, , , Mon May 29 15:15:41 2017
+Tor Fan, Tor Supporter, FR, France, FR, TRUE, FALSE, No, http://torproject.xj1.fr/, , , , http://torproject.xj1.fr/dist/, , , javkk6746z7wvigk.onion, Mon May 29 15:15:41 2017
tienhn(a)vinahost.vn, VinaHost, VN, Viet Nam, VN, TRUE, FALSE, No, , https://mirror.vinahost.vn/torproject.org, rsync://mirror.vinahost.vn/torproject.org, , , https://mirror.vinahost.vn/torproject.org/dist/, rsync://mirror.vinahost.vn/torproject.org/dist, , Wed Apr 19 18:52:55 2017
-mirror AT funkfreundelandshut DOT de, Funkfreunde Landshut e.V., DE, BY, DE, TRUE, FALSE, No, http://stwo.biz:8084/torproject.org, , , , http://stwo.biz:8084/torproject.org/dist/, , , http://44.225.40.254/torproject.org/dist, Tue May 16 15:41:26 2017
+mirror AT funkfreundelandshut DOT de, Funkfreunde Landshut e.V., DE, BY, DE, TRUE, FALSE, No, http://stwo.biz:8084/torproject.org, , , , http://stwo.biz:8084/torproject.org/dist/, , , http://44.225.40.254/torproject.org/dist, Mon May 29 15:15:41 2017
, , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , ,
1
0