[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Add integ tests for networkstatus_descriptor
commit 4d9a7a38040add8a3e48254ddffd9f32189ccb26
Author: Ravi Chandra Padmala <neenaoffline@xxxxxxxxx>
Date: Mon Aug 6 14:08:26 2012 +0530
Add integ tests for networkstatus_descriptor
---
test/integ/descriptor/data/consensus | 130 +++++++++++++++++++++
test/integ/descriptor/data/metrics_consensus | 121 +++++++++++++++++++
test/integ/descriptor/data/metrics_vote | 85 ++++++++++++++
test/integ/descriptor/data/vote | 100 ++++++++++++++++
test/integ/descriptor/networkstatus_descriptor.py | 36 ++++++
5 files changed, 472 insertions(+), 0 deletions(-)
diff --git a/test/integ/descriptor/data/consensus b/test/integ/descriptor/data/consensus
new file mode 100644
index 0000000..adcf13b
--- /dev/null
+++ b/test/integ/descriptor/data/consensus
@@ -0,0 +1,130 @@
+network-status-version 3
+vote-status consensus
+consensus-method 12
+valid-after 2012-07-12 10:00:00
+fresh-until 2012-07-12 11:00:00
+valid-until 2012-07-12 13:00:00
+voting-delay 300 300
+client-versions 0.2.2.35,0.2.2.36,0.2.2.37,0.2.3.10-alpha,0.2.3.11-alpha,0.2.3.12-alpha,0.2.3.13-alpha,0.2.3.14-alpha,0.2.3.15-alpha,0.2.3.16-alpha,0.2.3.17-beta,0.2.3.18-rc,0.2.3.19-rc
+server-versions 0.2.2.35,0.2.2.36,0.2.2.37,0.2.3.10-alpha,0.2.3.11-alpha,0.2.3.12-alpha,0.2.3.13-alpha,0.2.3.14-alpha,0.2.3.15-alpha,0.2.3.16-alpha,0.2.3.17-beta,0.2.3.18-rc,0.2.3.19-rc
+known-flags Authority BadExit Exit Fast Guard HSDir Named Running Stable Unnamed V2Dir Valid
+params CircuitPriorityHalflifeMsec=30000 bwauthpid=1
+dir-source tor26 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 86.59.21.38 86.59.21.38 80 443
+contact Peter Palfrader
+vote-digest 0B6D1E9A300B895AA2D0B427F92917B6995C3C1C
+dir-source turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 76.73.17.194 76.73.17.194 9030 9090
+contact Mike Perry <mikeperryTAfsckedTODorg>
+vote-digest 904B1974B9879D02B4ADFB81D7E9B4E07D768A5A
+dir-source maatuska 49015F787433103580E3B66A1707A00E60F2D15B 171.25.193.9 171.25.193.9 443 80
+contact 4096R/23291265 Linus Nordberg <linus@xxxxxxxxxxx>
+vote-digest A8839355BAC373320B8CEDD0A0A09DAAA1637E3A
+dir-source dannenberg 585769C78764D58426B8B52B6651A5A71137189A dannenberg.ccc.de 193.23.244.244 80 443
+contact Andreas Lehner <anonymizer@xxxxxx>
+vote-digest 416B73C49E717B0A5D61A4F634DCCF94611802E7
+dir-source urras 80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 208.83.223.34 443 80
+contact 4096R/E012B42D Jacob Appelbaum <jacob@xxxxxxxxxxxxx>
+vote-digest 08B1F8E4910F136E7FB7DFD52ABB2A9EDE939F0B
+dir-source moria1 D586D18309DED4CD6D57C18FDB97EFA96D330566 128.31.0.34 128.31.0.34 9131 9101
+contact 1024D/28988BF5 arma mit edu
+vote-digest 5006931FB78F7AE42B602697591DBA82AACEF533
+dir-source dizum E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58 194.109.206.212 194.109.206.212 80 443
+contact 1024R/8D56913D Alex de Joode <adejoode@xxxxxxxxxxxx>
+vote-digest 3F1F1E071EC5F54115CB8EA9723E30A9386AB8CA
+dir-source gabelmoo ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 212.112.245.170 80 443
+contact 4096R/C5AA446D Sebastian Hahn <tor@xxxxxxxxxxxxxxxxx>
+vote-digest DF2EC9AD207831DED1D01BB889A9C4478DE2CFB9
+r sumkledi ABPSI4nNUNC3hKPkBhyzHozozrU 8mCr8Sl7RF4ENU4jb0FZFA/3do8 2012-07-12 04:01:55 178.218.213.229 80 0
+s Exit Fast Named Running Valid
+v Tor 0.2.2.35
+w Bandwidth=38
+p accept 80,443
+r Unnamed AEXri4INxBAZeyi0wvJZoC58nZs 9t4U465paxGASh0x5Tds8a8YiKo 2012-07-12 04:48:09 79.139.135.90 443 22
+s Fast HSDir Running V2Dir Valid
+v Tor 0.2.2.37
+w Bandwidth=35
+p reject 1-65535
+r ANONIONROUTER AHhuQ8zFQJdT8l42Axxc6m6kNwI uI7+jQ/T3kFVnl7H7TYE/7WJxi4 2012-07-12 04:40:31 93.128.55.236 24051 24052
+s Fast Named Running V2Dir Valid
+v Tor 0.2.2.37
+w Bandwidth=108
+p reject 1-65535
+r ph3x AMLCoWrttR1eX7fWFo/GazQ9gi8 ZJJnmKK6+9B2KOUSIPV49+Vprxs 2012-07-11 19:44:22 86.59.119.83 443 80
+s Fast Guard HSDir Named Running Stable V2Dir Valid
+v Tor 0.2.3.18-rc
+w Bandwidth=55300
+p reject 1-65535
+r nargothrond ANi/r5RGhUxfZ3simlDXFrf2O68 DsP6REKOns/vAUYNp3rfkCOSJFM 2012-07-11 18:25:37 173.11.83.10 9001 0
+s Fast Guard Named Running Stable Valid
+v Tor 0.2.3.18-rc
+w Bandwidth=543
+p reject 1-65535
+r default AN1sc6ymJ4WcSJ95VITqL0B5wDQ I9HQ2zph5Nuvf4FKANoKDf5vPV8 2012-07-11 18:48:22 82.243.60.52 443 9030
+s Fast Running V2Dir Valid
+v Tor 0.2.2.35
+w Bandwidth=92
+p reject 1-65535
+r catfesh AOTNBUkB8Lob/wiz7h9gtuDoT2Q 0Ycp54MgG+Ns+oEd3BIubFJdGGw 2012-07-12 08:26:51 80.177.151.82 9001 9030
+s Fast HSDir Running V2Dir Valid
+v Tor 0.2.2.37
+w Bandwidth=61
+p reject 1-65535
+r 111111 AO70G2tKrAacjjIITtSmzAFrSs8 l/yzMBbM4crBHivPKh69pDXuTRM 2012-07-12 04:03:06 178.170.144.91 80 0
+s Exit Fast Named Running Valid
+v Tor 0.2.2.34
+w Bandwidth=29
+p accept 80,443
+r Unnamed AP1onm4+6g+gIQMs1u9r6CeLX80 HY8Ud5ffEX28pglH+Vqvfle1xDQ 2012-07-12 09:09:15 189.41.71.79 443 0
+s Running Valid
+v Tor 0.2.2.37
+w Bandwidth=0
+p reject 1-65535
+directory-footer
+bandwidth-weights Wbd=3335 Wbe=0 Wbg=3536 Wbm=10000 Wdb=10000 Web=10000 Wed=3329 Wee=10000 Weg=3329 Wem=10000 Wgb=10000 Wgd=3335 Wgg=6464 Wgm=6464 Wmb=10000 Wmd=3335 Wme=0 Wmg=3536 Wmm=10000
+directory-signature 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 BF112F1C6D5543CFD0A32215ACABD4197B5279AD
+-----BEGIN SIGNATURE-----
+HFXB4497LzESysYJ/4jJY83E5vLjhv+igIxD9LU6lf6ftkGeF+lNmIAIEKaMts8H
+mfWcW0b+jsrXcJoCxV5IrwCDF3u1aC3diwZY6yiG186pwWbOwE41188XI2DeYPwE
+I/TJmV928na7RLZe2mGHCAW3VQOvV+QkCfj05VZ8CsY=
+-----END SIGNATURE-----
+directory-signature 27B6B5996C426270A5C95488AA5BCEB6BCC86956 D5C30C15BB3F1DA27669C2D88439939E8F418FCF
+-----BEGIN SIGNATURE-----
+VAL+VWqcJiJtTZjFDz5/rS4WLfh8dOSnU2HYUb1ZgqM8PR1rFsoxpvaK9USrtkx9
+Byctu/flD3YOqGg+GpYQwU8w9tm7BGelD+dqg97DkJXmlPaXe/Z0nKW1UnCN9m93
+svyWCAqglEzxlK4H7ZfMlQbkMu7EFjXGzrn1gRVGOwg=
+-----END SIGNATURE-----
+directory-signature 49015F787433103580E3B66A1707A00E60F2D15B 1C915B9493589F97BAC764D1885A34BFC18C7E26
+-----BEGIN SIGNATURE-----
+fHAC5vdqotMtTVIxfqoNrlob2jAi3PP/urvsVA0xmaOzgYtJFIjY2iEWrrU4fRwe
+0M1vyCw+oztBrPKYukedkefE9ly/R30KVW2ezo5WpOO4y6oZpelb/jRKFoSRfbyB
+WdKsHSe2xlXPA0ySu1klpuMOZiQ8wgxh4x3oLGXnL5Q=
+-----END SIGNATURE-----
+directory-signature 585769C78764D58426B8B52B6651A5A71137189A 499D7CE5A1356045D629F43271EBF600D6F2CC9C
+-----BEGIN SIGNATURE-----
+IDOUDykw+tdCyyVmPSGUDahIeEEPMWxarEoH2gPuyExDqZkUc0ah6Eh736rVSD5Z
+R4nCjDNTQNr5byDfJk6cMDN9A/5P8uz421pnmLfs9SasLUjTdJt921jxJnSvSBeF
+hSZPNi5wl++Uw3j2zeclOXvAkkAEGi9Pi5Zf6QNlWFI=
+-----END SIGNATURE-----
+directory-signature 80550987E1D626E3EBA5E5E75A458DE0626D088C 2B9B419BB44728A5BE01651D6D1553FD14B6CFFB
+-----BEGIN SIGNATURE-----
+D2wVGni7cYHyXNqt9RvW/CUd8r7TgkfEp9OAJKojUyweiGMJOMEqDBE01e4Ov9Pd
+O9D46fjxWYGE9fN72xvD8CGoNcQgTtLpvypEfB96tKM3JYr5j4MCsdcOrQBkKGp7
+qf1Qfiw7aXahk8IfbgvmAvROlAMAxln7nVE0qenQWu4=
+-----END SIGNATURE-----
+directory-signature D586D18309DED4CD6D57C18FDB97EFA96D330566 8F0DEA35D1732D867FB94F5130364927DBCCBB8E
+-----BEGIN SIGNATURE-----
+cmrV1VUfCo9Smlc8BUblkBuSFqJdQkX/gd3ROOnpdRfogbsylq6xA7srCBGp1Z39
+To5Vk71AI0PIy031S6gKfOLgn9E5Bl0Agr60diFxjNn0ejR49MKJTjoDI+DmBlv4
+do+Bej+D8afl27LNH/QIYyzSkOl0eXSGtOEEuCQg/3A=
+-----END SIGNATURE-----
+directory-signature E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58 9BE9A4CF520B6880EB42C5702BC521F03A6CF0FC
+-----BEGIN SIGNATURE-----
+UVXzEFkkjCpszLmoqQxAxSU83IS+fqrkIC4DCQZCEjRcXEvx3c56HUyTsew5WTFR
+XANCJn+V3DaxYLuL6L8xW7r9xOQNU970nGwocuJckxyDcLHloL8E226vIAn6mLmt
+a1Z6y8NzaQpv4fhdqhT7ETJo+chmf8bSX8qLLmaCIac=
+-----END SIGNATURE-----
+directory-signature ED03BB616EB2F60BEC80151114BB25CEF515B226 845CF1D0B370CA443A8579D18E7987E7E532F639
+-----BEGIN SIGNATURE-----
+DILsRCrtn6rDbNo3DF+L1/VVAd+V86PdZKg3Q9QooqVOGgU/7HrspV/K4lFbWcTT
+Zm+quRQfuKmB4xljwXpeRlABQR5eainlZBtrTFg056/dDrJqYXSwV/C391tAIDZs
+2TANs/4uLi94q6Ov+zE9zYUiF8jwnyXl/q/jKOYM8bE=
+-----END SIGNATURE-----
diff --git a/test/integ/descriptor/data/metrics_consensus b/test/integ/descriptor/data/metrics_consensus
new file mode 100644
index 0000000..22107bd
--- /dev/null
+++ b/test/integ/descriptor/data/metrics_consensus
@@ -0,0 +1,121 @@
+@type network-status-consensus-3 1.0
+network-status-version 3
+vote-status consensus
+consensus-method 12
+valid-after 2012-07-12 10:00:00
+fresh-until 2012-07-12 11:00:00
+valid-until 2012-07-12 13:00:00
+voting-delay 300 300
+client-versions 0.2.2.35,0.2.2.36,0.2.2.37,0.2.3.10-alpha,0.2.3.11-alpha,0.2.3.12-alpha,0.2.3.13-alpha,0.2.3.14-alpha,0.2.3.15-alpha,0.2.3.16-alpha,0.2.3.17-beta,0.2.3.18-rc,0.2.3.19-rc
+server-versions 0.2.2.35,0.2.2.36,0.2.2.37,0.2.3.10-alpha,0.2.3.11-alpha,0.2.3.12-alpha,0.2.3.13-alpha,0.2.3.14-alpha,0.2.3.15-alpha,0.2.3.16-alpha,0.2.3.17-beta,0.2.3.18-rc,0.2.3.19-rc
+known-flags Authority BadExit Exit Fast Guard HSDir Named Running Stable Unnamed V2Dir Valid
+params CircuitPriorityHalflifeMsec=30000 bwauthpid=1
+dir-source tor26 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 86.59.21.38 86.59.21.38 80 443
+contact Peter Palfrader
+vote-digest 0B6D1E9A300B895AA2D0B427F92917B6995C3C1C
+dir-source turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 76.73.17.194 76.73.17.194 9030 9090
+contact Mike Perry <mikeperryTAfsckedTODorg>
+vote-digest 904B1974B9879D02B4ADFB81D7E9B4E07D768A5A
+dir-source maatuska 49015F787433103580E3B66A1707A00E60F2D15B 171.25.193.9 171.25.193.9 443 80
+contact 4096R/23291265 Linus Nordberg <linus@xxxxxxxxxxx>
+vote-digest A8839355BAC373320B8CEDD0A0A09DAAA1637E3A
+dir-source dannenberg 585769C78764D58426B8B52B6651A5A71137189A dannenberg.ccc.de 193.23.244.244 80 443
+contact Andreas Lehner <anonymizer@xxxxxx>
+vote-digest 416B73C49E717B0A5D61A4F634DCCF94611802E7
+dir-source urras 80550987E1D626E3EBA5E5E75A458DE0626D088C 208.83.223.34 208.83.223.34 443 80
+contact 4096R/E012B42D Jacob Appelbaum <jacob@xxxxxxxxxxxxx>
+vote-digest 08B1F8E4910F136E7FB7DFD52ABB2A9EDE939F0B
+dir-source moria1 D586D18309DED4CD6D57C18FDB97EFA96D330566 128.31.0.34 128.31.0.34 9131 9101
+contact 1024D/28988BF5 arma mit edu
+vote-digest 5006931FB78F7AE42B602697591DBA82AACEF533
+dir-source dizum E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58 194.109.206.212 194.109.206.212 80 443
+contact 1024R/8D56913D Alex de Joode <adejoode@xxxxxxxxxxxx>
+vote-digest 3F1F1E071EC5F54115CB8EA9723E30A9386AB8CA
+dir-source gabelmoo ED03BB616EB2F60BEC80151114BB25CEF515B226 212.112.245.170 212.112.245.170 80 443
+contact 4096R/C5AA446D Sebastian Hahn <tor@xxxxxxxxxxxxxxxxx>
+vote-digest DF2EC9AD207831DED1D01BB889A9C4478DE2CFB9
+r sumkledi ABPSI4nNUNC3hKPkBhyzHozozrU 8mCr8Sl7RF4ENU4jb0FZFA/3do8 2012-07-12 04:01:55 178.218.213.229 80 0
+s Exit Fast Named Running Valid
+v Tor 0.2.2.35
+w Bandwidth=38
+p accept 80,443
+r Unnamed AEXri4INxBAZeyi0wvJZoC58nZs 9t4U465paxGASh0x5Tds8a8YiKo 2012-07-12 04:48:09 79.139.135.90 443 22
+s Fast HSDir Running V2Dir Valid
+v Tor 0.2.2.37
+w Bandwidth=35
+p reject 1-65535
+r ANONIONROUTER AHhuQ8zFQJdT8l42Axxc6m6kNwI uI7+jQ/T3kFVnl7H7TYE/7WJxi4 2012-07-12 04:40:31 93.128.55.236 24051 24052
+s Fast Named Running V2Dir Valid
+v Tor 0.2.2.37
+w Bandwidth=108
+p reject 1-65535
+r ph3x AMLCoWrttR1eX7fWFo/GazQ9gi8 ZJJnmKK6+9B2KOUSIPV49+Vprxs 2012-07-11 19:44:22 86.59.119.83 443 80
+s Fast Guard HSDir Named Running Stable V2Dir Valid
+v Tor 0.2.3.18-rc
+w Bandwidth=55300
+p reject 1-65535
+r nargothrond ANi/r5RGhUxfZ3simlDXFrf2O68 DsP6REKOns/vAUYNp3rfkCOSJFM 2012-07-11 18:25:37 173.11.83.10 9001 0
+s Fast Guard Named Running Stable Valid
+v Tor 0.2.3.18-rc
+w Bandwidth=543
+p reject 1-65535
+r default AN1sc6ymJ4WcSJ95VITqL0B5wDQ I9HQ2zph5Nuvf4FKANoKDf5vPV8 2012-07-11 18:48:22 82.243.60.52 443 9030
+s Fast Running V2Dir Valid
+v Tor 0.2.2.35
+w Bandwidth=92
+p reject 1-65535
+r catfesh AOTNBUkB8Lob/wiz7h9gtuDoT2Q 0Ycp54MgG+Ns+oEd3BIubFJdGGw 2012-07-12 08:26:51 80.177.151.82 9001 9030
+s Fast HSDir Running V2Dir Valid
+v Tor 0.2.2.37
+w Bandwidth=61
+p reject 1-65535
+directory-footer
+bandwidth-weights Wbd=3335 Wbe=0 Wbg=3536 Wbm=10000 Wdb=10000 Web=10000 Wed=3329 Wee=10000 Weg=3329 Wem=10000 Wgb=10000 Wgd=3335 Wgg=6464 Wgm=6464 Wmb=10000 Wmd=3335 Wme=0 Wmg=3536 Wmm=10000
+directory-signature 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 BF112F1C6D5543CFD0A32215ACABD4197B5279AD
+-----BEGIN SIGNATURE-----
+HFXB4497LzESysYJ/4jJY83E5vLjhv+igIxD9LU6lf6ftkGeF+lNmIAIEKaMts8H
+mfWcW0b+jsrXcJoCxV5IrwCDF3u1aC3diwZY6yiG186pwWbOwE41188XI2DeYPwE
+I/TJmV928na7RLZe2mGHCAW3VQOvV+QkCfj05VZ8CsY=
+-----END SIGNATURE-----
+directory-signature 27B6B5996C426270A5C95488AA5BCEB6BCC86956 D5C30C15BB3F1DA27669C2D88439939E8F418FCF
+-----BEGIN SIGNATURE-----
+VAL+VWqcJiJtTZjFDz5/rS4WLfh8dOSnU2HYUb1ZgqM8PR1rFsoxpvaK9USrtkx9
+Byctu/flD3YOqGg+GpYQwU8w9tm7BGelD+dqg97DkJXmlPaXe/Z0nKW1UnCN9m93
+svyWCAqglEzxlK4H7ZfMlQbkMu7EFjXGzrn1gRVGOwg=
+-----END SIGNATURE-----
+directory-signature 49015F787433103580E3B66A1707A00E60F2D15B 1C915B9493589F97BAC764D1885A34BFC18C7E26
+-----BEGIN SIGNATURE-----
+fHAC5vdqotMtTVIxfqoNrlob2jAi3PP/urvsVA0xmaOzgYtJFIjY2iEWrrU4fRwe
+0M1vyCw+oztBrPKYukedkefE9ly/R30KVW2ezo5WpOO4y6oZpelb/jRKFoSRfbyB
+WdKsHSe2xlXPA0ySu1klpuMOZiQ8wgxh4x3oLGXnL5Q=
+-----END SIGNATURE-----
+directory-signature 585769C78764D58426B8B52B6651A5A71137189A 499D7CE5A1356045D629F43271EBF600D6F2CC9C
+-----BEGIN SIGNATURE-----
+IDOUDykw+tdCyyVmPSGUDahIeEEPMWxarEoH2gPuyExDqZkUc0ah6Eh736rVSD5Z
+R4nCjDNTQNr5byDfJk6cMDN9A/5P8uz421pnmLfs9SasLUjTdJt921jxJnSvSBeF
+hSZPNi5wl++Uw3j2zeclOXvAkkAEGi9Pi5Zf6QNlWFI=
+-----END SIGNATURE-----
+directory-signature 80550987E1D626E3EBA5E5E75A458DE0626D088C 2B9B419BB44728A5BE01651D6D1553FD14B6CFFB
+-----BEGIN SIGNATURE-----
+D2wVGni7cYHyXNqt9RvW/CUd8r7TgkfEp9OAJKojUyweiGMJOMEqDBE01e4Ov9Pd
+O9D46fjxWYGE9fN72xvD8CGoNcQgTtLpvypEfB96tKM3JYr5j4MCsdcOrQBkKGp7
+qf1Qfiw7aXahk8IfbgvmAvROlAMAxln7nVE0qenQWu4=
+-----END SIGNATURE-----
+directory-signature D586D18309DED4CD6D57C18FDB97EFA96D330566 8F0DEA35D1732D867FB94F5130364927DBCCBB8E
+-----BEGIN SIGNATURE-----
+cmrV1VUfCo9Smlc8BUblkBuSFqJdQkX/gd3ROOnpdRfogbsylq6xA7srCBGp1Z39
+To5Vk71AI0PIy031S6gKfOLgn9E5Bl0Agr60diFxjNn0ejR49MKJTjoDI+DmBlv4
+do+Bej+D8afl27LNH/QIYyzSkOl0eXSGtOEEuCQg/3A=
+-----END SIGNATURE-----
+directory-signature E8A9C45EDE6D711294FADF8E7951F4DE6CA56B58 9BE9A4CF520B6880EB42C5702BC521F03A6CF0FC
+-----BEGIN SIGNATURE-----
+UVXzEFkkjCpszLmoqQxAxSU83IS+fqrkIC4DCQZCEjRcXEvx3c56HUyTsew5WTFR
+XANCJn+V3DaxYLuL6L8xW7r9xOQNU970nGwocuJckxyDcLHloL8E226vIAn6mLmt
+a1Z6y8NzaQpv4fhdqhT7ETJo+chmf8bSX8qLLmaCIac=
+-----END SIGNATURE-----
+directory-signature ED03BB616EB2F60BEC80151114BB25CEF515B226 845CF1D0B370CA443A8579D18E7987E7E532F639
+-----BEGIN SIGNATURE-----
+DILsRCrtn6rDbNo3DF+L1/VVAd+V86PdZKg3Q9QooqVOGgU/7HrspV/K4lFbWcTT
+Zm+quRQfuKmB4xljwXpeRlABQR5eainlZBtrTFg056/dDrJqYXSwV/C391tAIDZs
+2TANs/4uLi94q6Ov+zE9zYUiF8jwnyXl/q/jKOYM8bE=
+-----END SIGNATURE-----
diff --git a/test/integ/descriptor/data/metrics_vote b/test/integ/descriptor/data/metrics_vote
new file mode 100644
index 0000000..f5c9666
--- /dev/null
+++ b/test/integ/descriptor/data/metrics_vote
@@ -0,0 +1,85 @@
+@type network-status-vote-3 1.0
+network-status-version 3
+vote-status vote
+consensus-methods 1 2 3 4 5 6 7 8 9 10 11 12
+published 2012-07-11 23:50:01
+valid-after 2012-07-12 00:00:00
+fresh-until 2012-07-12 01:00:00
+valid-until 2012-07-12 03:00:00
+voting-delay 300 300
+client-versions 0.2.2.35,0.2.2.36,0.2.2.37,0.2.3.10-alpha,0.2.3.11-alpha,0.2.3.12-alpha,0.2.3.13-alpha,0.2.3.14-alpha,0.2.3.15-alpha,0.2.3.16-alpha,0.2.3.17-beta,0.2.3.18-rc,0.2.3.19-rc
+server-versions 0.2.2.35,0.2.2.36,0.2.2.37,0.2.3.10-alpha,0.2.3.11-alpha,0.2.3.12-alpha,0.2.3.13-alpha,0.2.3.14-alpha,0.2.3.15-alpha,0.2.3.16-alpha,0.2.3.17-beta,0.2.3.18-rc,0.2.3.19-rc
+known-flags Authority BadExit Exit Fast Guard HSDir Named Running Stable Unnamed V2Dir Valid
+params CircuitPriorityHalflifeMsec=30000 bwauthpid=1
+dir-source tor26 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 86.59.21.38 86.59.21.38 80 443
+contact Peter Palfrader
+dir-key-certificate-version 3
+fingerprint 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4
+dir-key-published 2012-04-29 21:21:25
+dir-key-expires 2013-05-29 21:21:25
+dir-identity-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBigKCAYEA7cZXvDRxfjDYtr9/9UsQ852+6cmHMr8VVh8GkLwbq3RzqjkULwQ2
+R9mFvG4FnqMcMKXi62rYYA3fZL1afhT804cpvyp/D3dPM8QxW88fafFAgIFP4LiD
+0JYjnF8cva5qZ0nzlWnMXLb32IXSvsGSE2FRyAV0YN9a6k967LSgCfUnZ+IKMezW
+1vhL9YK4QIfsDowgtVsavg63GzGmA7JvZmn77+/J5wKz11vGr7Wttf8XABbH2taX
+O9j/KGBOX2OKhoF3mXfZSmUO2dV9NMwtkJ7zD///Ny6sfApWV6kVP4O9TdG3bAsl
++fHCoCKgF/jAAWzh6VckQTOPzQZaH5aMWfXrDlzFWg17MjonI+bBTD2Ex2pHczzJ
+bN7coDMRH2SuOXv8wFf27KdUxZ/GcrXSRGzlRLygxqlripUanjVGN2JvrVQVr0kz
+pjNjiZl2z8ZyZ5d4zQuBi074JPGgx62xAstP37v1mPw14sIWfLgY16ewYuS5bCxV
+lyS28jsPht9VAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-signing-key
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBANROlyEQEWJ20RC+DogV0Ww8mrUw9viscZ7eqAkyhDZKIt++2kVXszUI
+Zd2NoWG025f3np4zlTuIkz2PShn1yAYmKBlRcwbexgR6dXBToL3Zxe1Mezig/UuL
+kX75imfneBiLdtCRzaZs/Fa5cwd3msUNPVsq5Zmk0R7rCmBqiLDbAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-key-crosscert
+-----BEGIN ID SIGNATURE-----
+UuK7wNT0weVelnsMYgoj2apYzr5pJqaI7pM+IzWiSGq1NipqMDEwZqx0WVWR/izB
+kLQm1mxU0+84QxAtNNmwNo5uHXR1h2fZJQ2yHf8JLIjIEsaOeOfvDLkn9IyHwmIA
+OBPgHmAetivVUYc8lqejBO5l4xg8BpG7KK16yjTDflc=
+-----END ID SIGNATURE-----
+dir-key-certification
+-----BEGIN SIGNATURE-----
+t5PLDPgT2TJiM8fNmqXkXY0rK6u5LZEtMNqQ4BCQCrvUN87BPBpF4U0GptqVjmdK
+aKS0v6BMRBbSQhyro42jv8iaP8X57V39rJAEbQsWJVNnhBmgLPxY9LYS/he8dUPZ
+0LuNjNuBaekvUoPr6iunHGYUjVMZa3aOf+SeUxdS4ZudlozegDyBrkMeEVH/7DC/
+dx/VsqR5hIZ8/e+u3XQcSIYCmBbJxPNeOWNERi4npbyY0Iy2AJ1eJyX2onUsk2Qq
+jnMxPtuCSDAWEebChwtKTTV6EAnZzYcCZLxNLXcd4Tvfm2EgSw8xKtiDn+eABpcv
+7FaKEkuUBGLe+sN3jt3K05qOAOvVtCi0hSO/94+DO7PiXFxmb6Om6vEbKiGxagH2
+3jE6rNpJJsO0TspO3KTD7fpXJU7gtXIurcQwziXUGchK84aNFjdX/G1ra5M5kMHf
+hJt6p7rCqPyEVOwW+DIGVfucLfjtJu/h7XuWw9/htrE0TNx0Hah8V2+7Ok5XA10N
+-----END SIGNATURE-----
+r sumkledi ABPSI4nNUNC3hKPkBhyzHozozrU B5n4BiALAF8B5AqafxohyYiuj7E 2012-07-11 04:22:53 178.218.213.229 80 0
+s Exit Named Valid
+opt v Tor 0.2.2.35
+w Bandwidth=51
+p accept 80,443
+m 8,9,10,11,12 sha256=g1vx9si329muxV3tquWIXXySNOIwRGMeAESKs/v4DWs
+r Unnamed AEXri4INxBAZeyi0wvJZoC58nZs csTseFzwBV0RLsEdlyxDw6jTZ1o 2012-07-11 10:47:26 79.139.135.90 443 22
+s Fast HSDir Running V2Dir Valid
+opt v Tor 0.2.2.37
+w Bandwidth=92
+p reject 1-65535
+m 8,9,10,11,12 sha256=iZfmvEGdBG/qc9KYZUh4JsWEHbn9Bw2jy5i0AtCoRB0
+r default AFU4pMWKyq+eTPuBO0D9W179kQQ OZzEaq9N5+VX5yxzi051zqyEcPk 2012-07-11 08:17:21 2.90.115.167 443 9030
+s V2Dir Valid
+opt v Tor 0.2.3.15-alpha
+w Bandwidth=53
+p reject 1-65535
+m 8,9,10,11,12 sha256=m/RouK3TqoaYBBHCxgmzMPuGGCIEr0ufSTB1i85zicM
+r satoshi11 AFzRyEo3Ibdko7vl4rReoU3BDfM rWaYhhU9Kym4sXAVe+uE99VGpJs 2012-07-11 08:10:01 80.218.153.44 443 9030
+s V2Dir Valid
+opt v Tor 0.2.2.35
+w Bandwidth=196
+p reject 1-65535
+m 8,9,10,11,12 sha256=yxuOPz7IraIzzmU/qeZRJHOJrutNmvPwDwj2AmsHZSI
+directory-footer
+directory-signature 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 BF112F1C6D5543CFD0A32215ACABD4197B5279AD
+-----BEGIN SIGNATURE-----
+02UCTf06pLYkuLgUSR+L0vHOJ7gUyidKscg88q8TWUAiP57x27o+BlZdEMSu/ArT
+yBOz+0ZOWggb04maA2cwJQQEK2LkzxzBijmfoC6RhQx3wS8llhyOMaoR6rkobE1D
+oLqVZPDNPX87DkhmQfgBM2I3vYQX13YJwZc0jNCEGpU=
+-----END SIGNATURE-----
diff --git a/test/integ/descriptor/data/vote b/test/integ/descriptor/data/vote
new file mode 100644
index 0000000..d5f540f
--- /dev/null
+++ b/test/integ/descriptor/data/vote
@@ -0,0 +1,100 @@
+network-status-version 3
+vote-status vote
+consensus-methods 1 2 3 4 5 6 7 8 9 10 11 12
+published 2012-07-11 23:50:01
+valid-after 2012-07-12 00:00:00
+fresh-until 2012-07-12 01:00:00
+valid-until 2012-07-12 03:00:00
+voting-delay 300 300
+known-flags Authority BadExit Exit Fast Guard HSDir Running Stable V2Dir Valid
+params CircuitPriorityHalflifeMsec=30000 bwauthpid=1
+dir-source turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 76.73.17.194 76.73.17.194 9030 9090
+contact Mike Perry <mikeperryTAfsckedTODorg>
+dir-key-certificate-version 3
+fingerprint 27B6B5996C426270A5C95488AA5BCEB6BCC86956
+dir-key-published 2011-11-28 21:51:04
+dir-key-expires 2012-11-28 21:51:04
+dir-identity-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBigKCAYEA6uSmsoxj2MiJ3qyZq0qYXlRoG8o82SNqg+22m+t1c7MlQOZWPJYn
+XeMcBCt8xrTeIt2ZI+Q/Kt2QJSeD9WZRevTKk/kn5Tg2+xXPogalUU47y5tUohGz
++Q8+CxtRSXpDxBHL2P8rLHvGrI69wbNHGoQkce/7gJy9vw5Ie2qzbyXk1NG6V8Fb
+pr6A885vHo6TbhUnolz2Wqt/kN+UorjLkN2H3fV+iGcQFv42SyHYGDLa0WwL3PJJ
+r/veu36S3VaHBrfhutfioi+d3d4Ya0bKwiWi5Lm2CHuuRTgMpHLU9vlci8Hunuxq
+HsULe2oMsr4VEic7sW5SPC5Obpx6hStHdNv1GxoSEm3/vIuPM8pINpU5ZYAyH9yO
+Ef22ZHeiVMMKmpV9TtFyiFqvlI6GpQn3mNbsQqF1y3XCA3Q4vlRAkpgJVUSvTxFP
+2bNDobOyVCpCM/rwxU1+RCNY5MFJ/+oktUY+0ydvTen3gFdZdgNqCYjKPLfBNm9m
+RGL7jZunMUNvAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-signing-key
+-----BEGIN RSA PUBLIC KEY-----
+MIGJAoGBAJ5itcJRYNEM3Qf1OVWLRkwjqf84oXPc2ZusaJ5zOe7TVvBMra9GNyc0
+NM9y6zVkHCAePAjr4KbW/8P1olA6FUE2LV9bozaU1jFf6K8B2OELKs5FUEW+n+ic
+GM0x6MhngyXonWOcKt5Gj+mAu5lrno9tpNbPkz2Utr/Pi0nsDhWlAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-key-crosscert
+-----BEGIN ID SIGNATURE-----
+RHYImGTwg36wmEdAn7qaRg2sAfql7ZCtPIL/O3lU5OIdXXp0tNn/K00Bamqohjk+
+Tz4FKsKXGDlbGv67PQcZPOK6NF0GRkNh4pk89prrDO4XwtEn7rkHHdBH6/qQ7IRG
+GdDZHtZ1a69oFZvPWD3hUaB50xeIe7GoKdKIfdNNJ+8=
+-----END ID SIGNATURE-----
+dir-key-certification
+-----BEGIN SIGNATURE-----
+fasWOGyUZ3iMCYpDfJ+0JcMiTH25sXPWzvlHorEOyOMbaMqRYpZU4GHzt1jLgdl6
+AAoR6KdamsLg5VE8xzst48a4UFuzHFlklZ5O8om2rcvDd5DhSnWWYZnYJecqB+bo
+dNisPmaIVSAWb29U8BpNRj4GMC9KAgGYUj8aE/KtutAeEekFfFEHTfWZ2fFp4j3m
+9rY8FWraqyiF+Emq1T8pAAgMQ+79R3oZxq0TXS42Z4Anhms735ccauKhI3pDKjbl
+tD5vAzIHOyjAOXj7a6jY/GrnaBNuJ4qe/4Hf9UmzK/jKKwG95BPJtPTT4LoFwEB0
+KG2OUeQUNoCck4nDpsZwFqPlrWCHcHfTV2iDYFV1HQWDTtZz/qf+GtB8NXsq+I1w
+brADmvReM2BD6p/13h0QURCI5hq7ZYlIKcKrBa0jn1d9cduULl7vgKsRCJDls/ID
+emBZ6pUxMpBmV0v+PrA3v9w4DlE7GHAq61FF/zju2kpqj6MInbEvI/E+e438sWsL
+-----END SIGNATURE-----
+r sumkledi ABPSI4nNUNC3hKPkBhyzHozozrU B5n4BiALAF8B5AqafxohyYiuj7E 2012-07-11 04:22:53 178.218.213.229 80 0
+s Exit Valid
+opt v Tor 0.2.2.35
+w Bandwidth=51 Measured=36
+p accept 80,443
+m 8,9,10,11,12 sha256=g1vx9si329muxV3tquWIXXySNOIwRGMeAESKs/v4DWs
+r Unnamed AEXri4INxBAZeyi0wvJZoC58nZs csTseFzwBV0RLsEdlyxDw6jTZ1o 2012-07-11 10:47:26 79.139.135.90 443 22
+s Fast HSDir Running V2Dir Valid
+opt v Tor 0.2.2.37
+w Bandwidth=92 Measured=15
+p reject 1-65535
+m 8,9,10,11,12 sha256=iZfmvEGdBG/qc9KYZUh4JsWEHbn9Bw2jy5i0AtCoRB0
+r default AFU4pMWKyq+eTPuBO0D9W179kQQ OZzEaq9N5+VX5yxzi051zqyEcPk 2012-07-11 08:17:21 2.90.115.167 443 9030
+s V2Dir Valid
+opt v Tor 0.2.3.15-alpha
+w Bandwidth=53
+p reject 1-65535
+m 8,9,10,11,12 sha256=m/RouK3TqoaYBBHCxgmzMPuGGCIEr0ufSTB1i85zicM
+r satoshi11 AFzRyEo3Ibdko7vl4rReoU3BDfM rWaYhhU9Kym4sXAVe+uE99VGpJs 2012-07-11 08:10:01 80.218.153.44 443 9030
+s V2Dir Valid
+opt v Tor 0.2.2.35
+w Bandwidth=196 Measured=113
+p reject 1-65535
+m 8,9,10,11,12 sha256=yxuOPz7IraIzzmU/qeZRJHOJrutNmvPwDwj2AmsHZSI
+r JapanAnon AGw/p8P246zRPQ3ZsQx9+pM8I3s FpQ4fP9FE2j4AnpZTcPiUbaIjwQ 2012-07-11 15:55:42 220.0.231.71 443 9030
+s Exit V2Dir Valid
+opt v Tor 0.2.2.37
+w Bandwidth=41 Measured=5
+p accept 110,143,443,706,993,995,1863,5050,5190,5222-5223,6660-6669,6697,7000-7001,8300,8888
+m 8,9,10,11,12 sha256=fdV6McsFl7ZaX8YJjRCchKa7B7ImTr6++AE3e7zCkK8
+r ANONIONROUTER AHhuQ8zFQJdT8l42Axxc6m6kNwI UUUhUJVXZ5b+8Lizh1ghVkUTGo0 2012-07-11 20:13:16 93.128.114.184 24051 24052
+s Fast Running V2Dir Valid
+opt v Tor 0.2.2.37
+w Bandwidth=196 Measured=100
+p reject 1-65535
+m 8,9,10,11,12 sha256=ooi27oMS4TBXes4FY4JyULgZYZcFzAyvB1JicaQ8zxs
+r pornosteffi AJrkZLNAIMRi7J3Q5os1iBJTM38 tV2vC76eZNwVpSFO8+r9lCqJSVw 2012-07-11 11:00:29 88.78.83.210 443 0
+s Fast Running Valid
+opt v Tor 0.2.2.35
+w Bandwidth=32 Measured=14
+p reject 1-65535
+m 8,9,10,11,12 sha256=JiARdiiTbey4aLkt4x1DUgEU3oaD2oDB2dtP7SGl3EU
+directory-footer
+directory-signature 27B6B5996C426270A5C95488AA5BCEB6BCC86956 D5C30C15BB3F1DA27669C2D88439939E8F418FCF
+-----BEGIN SIGNATURE-----
+fskXN84wB3mXfo+yKGSt0AcDaaPuU3NwMR3ROxWgLN0KjAaVi2eV9PkPCsQkcgw3
+JZ/1HL9sHyZfo6bwaC6YSM9PNiiY6L7rnGpS7UkHiFI+M96VCMorvjm5YPs3FioJ
+DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
+-----END SIGNATURE-----
diff --git a/test/integ/descriptor/networkstatus_descriptor.py b/test/integ/descriptor/networkstatus_descriptor.py
new file mode 100644
index 0000000..bcdaaf5
--- /dev/null
+++ b/test/integ/descriptor/networkstatus_descriptor.py
@@ -0,0 +1,36 @@
+"""
+Integration tests for stem.descriptor.server_descriptor.
+"""
+
+from __future__ import with_statement
+
+import datetime
+import unittest
+
+import stem.exit_policy
+import stem.version
+import stem.descriptor.networkstatus_descriptor
+import test.integ.descriptor
+
+def _strptime(string):
+ return datetime.datetime.strptime(string, "%Y-%m-%d %H:%M:%S")
+
+class TestNetworkStatusDocument(unittest.TestCase):
+ def test_metrics_consensus(self):
+ """
+ Checks if consensus documents from Metrics are parsed properly.
+ """
+
+ descriptor_path = test.integ.descriptor.get_resource("metrics_consensus")
+
+ with file(descriptor_path) as descriptor_file:
+ desc = stem.descriptor.parse_file(descriptor_path, descriptor_file)
+
+ router = next(desc)
+ self.assertEquals("sumkledi", router.nickname)
+ self.assertEquals("ABPSI4nNUNC3hKPkBhyzHozozrU", router.identity)
+ self.assertEquals("8mCr8Sl7RF4ENU4jb0FZFA/3do8", router.digest)
+ self.assertEquals(_strptime("2012-07-12 04:01:55"), router.publication)
+ self.assertEquals("178.218.213.229", router.ip)
+ self.assertEquals(80, router.orport)
+ self.assertEquals(None, router.dirport)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits