aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2013-06-27 18:27:44 +0300
committerNick Mathewson <nickm@torproject.org>2013-08-15 12:03:34 -0400
commit6ad535e6dca8e9e284a0fa3384679756dca34a87 (patch)
tree2f2c9683348ca187248118b07b9dec2cf65fa80e /src/test/test.c
parentcb54e44587473782c2865c3ea4aca6e0666943a8 (diff)
downloadtor-6ad535e6dca8e9e284a0fa3384679756dca34a87.tar
tor-6ad535e6dca8e9e284a0fa3384679756dca34a87.tar.gz
If a single client connects with multiple transports, note all transports.
Diffstat (limited to 'src/test/test.c')
-rw-r--r--src/test/test.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 822f93a15..e0c6772c2 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -1944,10 +1944,15 @@ test_geoip_with_pt(void)
geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "entropy", now-7200);
}
+ /* 2 connections from the same IP with two different transports. */
+ SET_TEST_ADDRESS(++i);
+ geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "fire", now-7200);
+ geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "google", now-7200);
+
/* Test the transport history string. */
s = geoip_get_transport_history();
tor_assert(s);
- test_streq(s, "<OR>=8,alpha=16,beta=8,charlie=16,ddr=136,entropy=8");
+ test_streq(s, "<OR>=8,alpha=16,beta=8,charlie=16,ddr=136,entropy=8,fire=8,google=8");
/* Stop collecting entry statistics. */
geoip_entry_stats_term();