diff options
-rw-r--r-- | src/transport/Makefile.am | 12 | ||||
-rw-r--r-- | src/transport/test_quota_compliance.c | 4 | ||||
-rw-r--r-- | src/transport/test_quota_compliance_udp_peer1.conf | 104 | ||||
-rw-r--r-- | src/transport/test_quota_compliance_udp_peer2.conf | 102 |
4 files changed, 218 insertions, 4 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index fbda1c614..a7d49d6e4 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -203,7 +203,8 @@ check_PROGRAMS = \ | |||
203 | $(HTTPS_REL_TEST) \ | 203 | $(HTTPS_REL_TEST) \ |
204 | test_quota_compliance_tcp \ | 204 | test_quota_compliance_tcp \ |
205 | test_quota_compliance_http \ | 205 | test_quota_compliance_http \ |
206 | test_quota_compliance_https | 206 | test_quota_compliance_https \ |
207 | test_quota_compliance_udp | ||
207 | # TODO: add tests for nat, etc. | 208 | # TODO: add tests for nat, etc. |
208 | 209 | ||
209 | if !DISABLE_TEST_RUN | 210 | if !DISABLE_TEST_RUN |
@@ -222,7 +223,8 @@ TESTS = \ | |||
222 | $(HTTPS_REL_TEST) \ | 223 | $(HTTPS_REL_TEST) \ |
223 | test_quota_compliance_tcp \ | 224 | test_quota_compliance_tcp \ |
224 | test_quota_compliance_http \ | 225 | test_quota_compliance_http \ |
225 | test_quota_compliance_https | 226 | test_quota_compliance_https \ |
227 | test_quota_compliance_udp | ||
226 | endif | 228 | endif |
227 | 229 | ||
228 | test_transport_api_tcp_SOURCES = \ | 230 | test_transport_api_tcp_SOURCES = \ |
@@ -327,6 +329,12 @@ test_quota_compliance_https_LDADD = \ | |||
327 | $(top_builddir)/src/transport/libgnunettransport.la \ | 329 | $(top_builddir)/src/transport/libgnunettransport.la \ |
328 | $(top_builddir)/src/util/libgnunetutil.la | 330 | $(top_builddir)/src/util/libgnunetutil.la |
329 | 331 | ||
332 | test_quota_compliance_udp_SOURCES = \ | ||
333 | test_quota_compliance.c | ||
334 | test_quota_compliance_udp_LDADD = \ | ||
335 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
336 | $(top_builddir)/src/util/libgnunetutil.la | ||
337 | |||
330 | endif | 338 | endif |
331 | 339 | ||
332 | EXTRA_DIST = \ | 340 | EXTRA_DIST = \ |
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index bfcf3f1fd..087d72da0 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -595,8 +595,8 @@ run (void *cls, | |||
595 | } | 595 | } |
596 | else if (is_udp) | 596 | else if (is_udp) |
597 | { | 597 | { |
598 | setup_peer (&p1, "test_quota_compliance_tcp_peer1.conf"); | 598 | setup_peer (&p1, "test_quota_compliance_udp_peer1.conf"); |
599 | setup_peer (&p2, "test_quota_compliance_tcp_peer2.conf"); | 599 | setup_peer (&p2, "test_quota_compliance_udp_peer2.conf"); |
600 | } | 600 | } |
601 | else if (is_tcp_nat) | 601 | else if (is_tcp_nat) |
602 | { | 602 | { |
diff --git a/src/transport/test_quota_compliance_udp_peer1.conf b/src/transport/test_quota_compliance_udp_peer1.conf new file mode 100644 index 000000000..1b9771a37 --- /dev/null +++ b/src/transport/test_quota_compliance_udp_peer1.conf | |||
@@ -0,0 +1,104 @@ | |||
1 | [PATHS] | ||
2 | SERVICEHOME = /tmp/test_quota_compliance_peer1/ | ||
3 | DEFAULTCONFIG = test_quota_compliance_udp_peer1.conf | ||
4 | |||
5 | [fs] | ||
6 | AUTOSTART = NO | ||
7 | |||
8 | [datastore] | ||
9 | AUTOSTART = NO | ||
10 | |||
11 | [hostlist] | ||
12 | HTTP-PROXY = | ||
13 | SERVERS = http://gnunet.org:8080/ | ||
14 | OPTIONS = -b | ||
15 | BINARY = gnunet-daemon-hostlist | ||
16 | CONFIG = $DEFAULTCONFIG | ||
17 | HOME = $SERVICEHOME | ||
18 | HOSTNAME = localhost | ||
19 | HTTPPORT = 8080 | ||
20 | |||
21 | [topology] | ||
22 | BINARY = gnunet-daemon-topology | ||
23 | CONFIG = $DEFAULTCONFIG | ||
24 | FRIENDS = $SERVICEHOME/friends | ||
25 | TARGET-CONNECTION-COUNT = 16 | ||
26 | AUTOCONNECT = YES | ||
27 | FRIENDS-ONLY = NO | ||
28 | MINIMUM-FRIENDS = 0 | ||
29 | |||
30 | [core] | ||
31 | AUTOSTART = NO | ||
32 | |||
33 | [transport-udp] | ||
34 | PORT = 4368 | ||
35 | |||
36 | |||
37 | [transport] | ||
38 | plugins = udp | ||
39 | #DEBUG = YES | ||
40 | PREFIX = | ||
41 | ACCEPT_FROM6 = ::1; | ||
42 | ACCEPT_FROM = 127.0.0.1; | ||
43 | NEIGHBOUR_LIMIT = 50 | ||
44 | BINARY = gnunet-service-transport | ||
45 | CONFIG = $DEFAULTCONFIG | ||
46 | HOME = $SERVICEHOME | ||
47 | HOSTNAME = localhost | ||
48 | PORT = 4091 | ||
49 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_transport_peer1.sock | ||
50 | |||
51 | [peerinfo] | ||
52 | TRUST = $SERVICEHOME/data/credit/ | ||
53 | HOSTS = $SERVICEHOME/data/hosts/ | ||
54 | ACCEPT_FROM6 = ::1; | ||
55 | ACCEPT_FROM = 127.0.0.1; | ||
56 | BINARY = gnunet-service-peerinfo | ||
57 | CONFIG = $DEFAULTCONFIG | ||
58 | HOME = $SERVICEHOME | ||
59 | HOSTNAME = localhost | ||
60 | PORT = 4090 | ||
61 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_peerinfo_peer1.sock | ||
62 | |||
63 | [resolver] | ||
64 | ACCEPT_FROM6 = ::1; | ||
65 | ACCEPT_FROM = 127.0.0.1; | ||
66 | BINARY = gnunet-service-resolver | ||
67 | CONFIG = $DEFAULTCONFIG | ||
68 | HOME = $SERVICEHOME | ||
69 | HOSTNAME = localhost | ||
70 | PORT = 4089 | ||
71 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_resolver_peer1.sock | ||
72 | |||
73 | [statistics] | ||
74 | ACCEPT_FROM6 = ::1; | ||
75 | ACCEPT_FROM = 127.0.0.1; | ||
76 | BINARY = gnunet-service-statistics | ||
77 | CONFIG = $DEFAULTCONFIG | ||
78 | HOME = $SERVICEHOME | ||
79 | HOSTNAME = localhost | ||
80 | PORT = 4088 | ||
81 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_statistics_peer1.sock | ||
82 | |||
83 | [arm] | ||
84 | DEFAULTSERVICES = | ||
85 | ACCEPT_FROM6 = ::1; | ||
86 | ACCEPT_FROM = 127.0.0.1; | ||
87 | BINARY = gnunet-service-arm | ||
88 | CONFIG = $DEFAULTCONFIG | ||
89 | HOME = $SERVICEHOME | ||
90 | HOSTNAME = localhost | ||
91 | PORT = 4087 | ||
92 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_arm_peer1.sock | ||
93 | |||
94 | [TESTING] | ||
95 | WEAKRANDOM = YES | ||
96 | |||
97 | [gnunetd] | ||
98 | HOSTKEY = $SERVICEHOME/.hostkey | ||
99 | |||
100 | |||
101 | [dht] | ||
102 | AUTOSTART = NO | ||
103 | |||
104 | |||
diff --git a/src/transport/test_quota_compliance_udp_peer2.conf b/src/transport/test_quota_compliance_udp_peer2.conf new file mode 100644 index 000000000..83f39369d --- /dev/null +++ b/src/transport/test_quota_compliance_udp_peer2.conf | |||
@@ -0,0 +1,102 @@ | |||
1 | [PATHS] | ||
2 | SERVICEHOME = /tmp/test_quota_compliance_peer2 | ||
3 | DEFAULTCONFIG = test_quota_compliance_udp_peer2.conf | ||
4 | |||
5 | [transport-udp] | ||
6 | PORT = 3368 | ||
7 | [fs] | ||
8 | AUTOSTART = NO | ||
9 | |||
10 | [datastore] | ||
11 | AUTOSTART = NO | ||
12 | |||
13 | [hostlist] | ||
14 | HTTP-PROXY = | ||
15 | SERVERS = http://gnunet.org:8080/ | ||
16 | OPTIONS = -b | ||
17 | BINARY = gnunet-daemon-hostlist | ||
18 | CONFIG = $DEFAULTCONFIG | ||
19 | HOME = $SERVICEHOME | ||
20 | HOSTNAME = localhost | ||
21 | HTTPPORT = 8080 | ||
22 | |||
23 | [topology] | ||
24 | BINARY = gnunet-daemon-topology | ||
25 | CONFIG = $DEFAULTCONFIG | ||
26 | FRIENDS = $SERVICEHOME/friends | ||
27 | TARGET-CONNECTION-COUNT = 16 | ||
28 | AUTOCONNECT = YES | ||
29 | FRIENDS-ONLY = NO | ||
30 | MINIMUM-FRIENDS = 0 | ||
31 | |||
32 | [core] | ||
33 | AUTOSTART = NO | ||
34 | |||
35 | [transport] | ||
36 | plugins = udp | ||
37 | #DEBUG = YES | ||
38 | PREFIX = | ||
39 | ACCEPT_FROM6 = ::1; | ||
40 | ACCEPT_FROM = 127.0.0.1; | ||
41 | NEIGHBOUR_LIMIT = 50 | ||
42 | BINARY = gnunet-service-transport | ||
43 | CONFIG = $DEFAULTCONFIG | ||
44 | HOME = $SERVICEHOME | ||
45 | HOSTNAME = localhost | ||
46 | PORT = 3091 | ||
47 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_transport_peer2.sock | ||
48 | |||
49 | [peerinfo] | ||
50 | TRUST = $SERVICEHOME/data/credit/ | ||
51 | HOSTS = $SERVICEHOME/data/hosts/ | ||
52 | ACCEPT_FROM6 = ::1; | ||
53 | ACCEPT_FROM = 127.0.0.1; | ||
54 | BINARY = gnunet-service-peerinfo | ||
55 | CONFIG = $DEFAULTCONFIG | ||
56 | HOME = $SERVICEHOME | ||
57 | HOSTNAME = localhost | ||
58 | PORT = 3090 | ||
59 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_peerinfo_peer2.sock | ||
60 | |||
61 | [resolver] | ||
62 | ACCEPT_FROM6 = ::1; | ||
63 | ACCEPT_FROM = 127.0.0.1; | ||
64 | BINARY = gnunet-service-resolver | ||
65 | CONFIG = $DEFAULTCONFIG | ||
66 | HOME = $SERVICEHOME | ||
67 | HOSTNAME = localhost | ||
68 | PORT = 3089 | ||
69 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_resolver_peer2.sock | ||
70 | |||
71 | [statistics] | ||
72 | ACCEPT_FROM6 = ::1; | ||
73 | ACCEPT_FROM = 127.0.0.1; | ||
74 | BINARY = gnunet-service-statistics | ||
75 | CONFIG = $DEFAULTCONFIG | ||
76 | HOME = $SERVICEHOME | ||
77 | HOSTNAME = localhost | ||
78 | PORT = 3088 | ||
79 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_statistics_peer2.sock | ||
80 | |||
81 | [arm] | ||
82 | DEFAULTSERVICES = | ||
83 | ACCEPT_FROM6 = ::1; | ||
84 | ACCEPT_FROM = 127.0.0.1; | ||
85 | BINARY = gnunet-service-arm | ||
86 | CONFIG = $DEFAULTCONFIG | ||
87 | HOME = $SERVICEHOME | ||
88 | HOSTNAME = localhost | ||
89 | PORT = 3087 | ||
90 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_arm_peer2.sock | ||
91 | |||
92 | [TESTING] | ||
93 | WEAKRANDOM = YES | ||
94 | |||
95 | [gnunetd] | ||
96 | HOSTKEY = $SERVICEHOME/.hostkey | ||
97 | |||
98 | |||
99 | [dht] | ||
100 | AUTOSTART = NO | ||
101 | |||
102 | |||