commit c188815a260b65e02653763b9d38ef7ef2694119 Author: Karsten Loesing karsten.loesing@gmx.net Date: Fri Dec 16 09:23:59 2011 +0100
Include the 682f6e0 bug in the unit tests.
The bug was that we considered "\nr" as the beginning of a status entry. However, there are crypto lines starting with "r", so we need to look for "\nr ". Now there are crypto lines starting with "r" in the unit tests. Doesn't fix the problem, but helps discover it in the future. Fix comes next. --- .../impl/RelayNetworkStatusConsensusImplTest.java | 12 ++++-------- .../impl/RelayNetworkStatusVoteImplTest.java | 5 +++-- 2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java b/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java index db20638..deadf80 100644 --- a/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java +++ b/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java @@ -161,20 +161,16 @@ public class RelayNetworkStatusConsensusImplTest { + "3509BA5A624403A905C74DA5C8A0CEC9E0D3AF86\n" + "-----BEGIN SIGNATURE-----\n" + "NYRcTWAMRiYYiGW0hIbzeZKU6sefg98AwwXrQUCudO8wfA1cfgttTDoscB9I" - + "TbOY\n" - + "x+c30jV/qQCMamTAEDGgJTw8KghI32vytupKallI1EjCOF8UvL1UnALgpaR7" - + "sZ3W\n" - + "7WQZVVrWDtnYaULOEKfwnGnRC7WwE+YRSysbzwwCVs0=\n" + + "TbOY\nr+c30jV/qQCMamTAEDGgJTw8KghI32vytupKallI1EjCOF8UvL1UnA" + + "LgpaR7sZ3W\n7WQZVVrWDtnYaULOEKfwnGnRC7WwE+YRSysbzwwCVs0=\n" + "-----END SIGNATURE-----"); this.directorySignatures.add("directory-signature " + "27B6B5996C426270A5C95488AA5BCEB6BCC86956 " + "D5C30C15BB3F1DA27669C2D88439939E8F418FCF\n" + "-----BEGIN SIGNATURE-----\n" + "DzFPj3vyYrCv0W3r8qDPJPlmeLnadY+drjWkdOqO66Ih/hAWBb9KcBJAX1sX" - + "aDA7\n" - + "/iSaDhduBXuJdcu8lbmMP8d6uYBdRjHXqWDXySUZAkSfPB4JJPNGvfoQA/qe" - + "by7E\n" - + "5374pPPL6WwCLJHkKtk21S9oHDmFBdlZq7JWQelWlVM=\n" + + "aDA7\n/iSaDhduBXuJdcu8lbmMP8d6uYBdRjHXqWDXySUZAkSfPB4JJPNGvf" + + "oQA/qeby7E\n5374pPPL6WwCLJHkKtk21S9oHDmFBdlZq7JWQelWlVM=\n" + "-----END SIGNATURE-----"); } private byte[] buildConsensus() { diff --git a/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java b/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java index 8b62480..b34e143 100644 --- a/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java +++ b/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java @@ -209,13 +209,14 @@ public class RelayNetworkStatusVoteImplTest { + "4643,5050,5190,5222-5223,5228,5900,6660-6669,6679,6697,8000," + "8008,8074,8080,8087-8088,8443,8888,9418,9999-10000,19294," + "19638\n" - + "m 8,9,10,11 sha256=9ciEx9t0McXk9A06I7qwN7pxuNOdpCP64RV/6cx2Zkc"); + + "m 8,9,10,11 " + + "sha256=9ciEx9t0McXk9A06I7qwN7pxuNOdpCP64RV/6cx2Zkc"); this.directorySignatures.add("directory-signature " + "80550987E1D626E3EBA5E5E75A458DE0626D088C " + "EEB9299D295C1C815E289FBF2F2BBEA5F52FDD19\n" + "-----BEGIN SIGNATURE-----\n" + "iHEU3Iidya5RIrjyYgv8tlU0R+rF56/3/MmaaZi0a67e7ZkISfQ4dghScHxn" - + "F3Yh\nqXVaaoP07r6Ta+s0g1Zijm3lms50Nk/4tV2p8Y63c3F4Q3DAnK40Oi" + + "F3Yh\nrXVaaoP07r6Ta+s0g1Zijm3lms50Nk/4tV2p8Y63c3F4Q3DAnK40Oi" + "kfOIwEj+Ny\n+zBRQssP3hPhTPOj/A7o3mZZwtL6x1sxpeu/nME1l5E=\n" + "-----END SIGNATURE-----"); }
tor-commits@lists.torproject.org