aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/Makefile.am12
-rw-r--r--src/transport/test_quota_compliance.c4
-rw-r--r--src/transport/test_quota_compliance_udp_peer1.conf104
-rw-r--r--src/transport/test_quota_compliance_udp_peer2.conf102
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
209if !DISABLE_TEST_RUN 210if !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
226endif 228endif
227 229
228test_transport_api_tcp_SOURCES = \ 230test_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
332test_quota_compliance_udp_SOURCES = \
333 test_quota_compliance.c
334test_quota_compliance_udp_LDADD = \
335 $(top_builddir)/src/transport/libgnunettransport.la \
336 $(top_builddir)/src/util/libgnunetutil.la
337
330endif 338endif
331 339
332EXTRA_DIST = \ 340EXTRA_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]
2SERVICEHOME = /tmp/test_quota_compliance_peer1/
3DEFAULTCONFIG = test_quota_compliance_udp_peer1.conf
4
5[fs]
6AUTOSTART = NO
7
8[datastore]
9AUTOSTART = NO
10
11[hostlist]
12HTTP-PROXY =
13SERVERS = http://gnunet.org:8080/
14OPTIONS = -b
15BINARY = gnunet-daemon-hostlist
16CONFIG = $DEFAULTCONFIG
17HOME = $SERVICEHOME
18HOSTNAME = localhost
19HTTPPORT = 8080
20
21[topology]
22BINARY = gnunet-daemon-topology
23CONFIG = $DEFAULTCONFIG
24FRIENDS = $SERVICEHOME/friends
25TARGET-CONNECTION-COUNT = 16
26AUTOCONNECT = YES
27FRIENDS-ONLY = NO
28MINIMUM-FRIENDS = 0
29
30[core]
31AUTOSTART = NO
32
33[transport-udp]
34PORT = 4368
35
36
37[transport]
38plugins = udp
39#DEBUG = YES
40PREFIX =
41ACCEPT_FROM6 = ::1;
42ACCEPT_FROM = 127.0.0.1;
43NEIGHBOUR_LIMIT = 50
44BINARY = gnunet-service-transport
45CONFIG = $DEFAULTCONFIG
46HOME = $SERVICEHOME
47HOSTNAME = localhost
48PORT = 4091
49UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_transport_peer1.sock
50
51[peerinfo]
52TRUST = $SERVICEHOME/data/credit/
53HOSTS = $SERVICEHOME/data/hosts/
54ACCEPT_FROM6 = ::1;
55ACCEPT_FROM = 127.0.0.1;
56BINARY = gnunet-service-peerinfo
57CONFIG = $DEFAULTCONFIG
58HOME = $SERVICEHOME
59HOSTNAME = localhost
60PORT = 4090
61UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_peerinfo_peer1.sock
62
63[resolver]
64ACCEPT_FROM6 = ::1;
65ACCEPT_FROM = 127.0.0.1;
66BINARY = gnunet-service-resolver
67CONFIG = $DEFAULTCONFIG
68HOME = $SERVICEHOME
69HOSTNAME = localhost
70PORT = 4089
71UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_resolver_peer1.sock
72
73[statistics]
74ACCEPT_FROM6 = ::1;
75ACCEPT_FROM = 127.0.0.1;
76BINARY = gnunet-service-statistics
77CONFIG = $DEFAULTCONFIG
78HOME = $SERVICEHOME
79HOSTNAME = localhost
80PORT = 4088
81UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_statistics_peer1.sock
82
83[arm]
84DEFAULTSERVICES =
85ACCEPT_FROM6 = ::1;
86ACCEPT_FROM = 127.0.0.1;
87BINARY = gnunet-service-arm
88CONFIG = $DEFAULTCONFIG
89HOME = $SERVICEHOME
90HOSTNAME = localhost
91PORT = 4087
92UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_arm_peer1.sock
93
94[TESTING]
95WEAKRANDOM = YES
96
97[gnunetd]
98HOSTKEY = $SERVICEHOME/.hostkey
99
100
101[dht]
102AUTOSTART = 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]
2SERVICEHOME = /tmp/test_quota_compliance_peer2
3DEFAULTCONFIG = test_quota_compliance_udp_peer2.conf
4
5[transport-udp]
6PORT = 3368
7[fs]
8AUTOSTART = NO
9
10[datastore]
11AUTOSTART = NO
12
13[hostlist]
14HTTP-PROXY =
15SERVERS = http://gnunet.org:8080/
16OPTIONS = -b
17BINARY = gnunet-daemon-hostlist
18CONFIG = $DEFAULTCONFIG
19HOME = $SERVICEHOME
20HOSTNAME = localhost
21HTTPPORT = 8080
22
23[topology]
24BINARY = gnunet-daemon-topology
25CONFIG = $DEFAULTCONFIG
26FRIENDS = $SERVICEHOME/friends
27TARGET-CONNECTION-COUNT = 16
28AUTOCONNECT = YES
29FRIENDS-ONLY = NO
30MINIMUM-FRIENDS = 0
31
32[core]
33AUTOSTART = NO
34
35[transport]
36plugins = udp
37#DEBUG = YES
38PREFIX =
39ACCEPT_FROM6 = ::1;
40ACCEPT_FROM = 127.0.0.1;
41NEIGHBOUR_LIMIT = 50
42BINARY = gnunet-service-transport
43CONFIG = $DEFAULTCONFIG
44HOME = $SERVICEHOME
45HOSTNAME = localhost
46PORT = 3091
47UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_transport_peer2.sock
48
49[peerinfo]
50TRUST = $SERVICEHOME/data/credit/
51HOSTS = $SERVICEHOME/data/hosts/
52ACCEPT_FROM6 = ::1;
53ACCEPT_FROM = 127.0.0.1;
54BINARY = gnunet-service-peerinfo
55CONFIG = $DEFAULTCONFIG
56HOME = $SERVICEHOME
57HOSTNAME = localhost
58PORT = 3090
59UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_peerinfo_peer2.sock
60
61[resolver]
62ACCEPT_FROM6 = ::1;
63ACCEPT_FROM = 127.0.0.1;
64BINARY = gnunet-service-resolver
65CONFIG = $DEFAULTCONFIG
66HOME = $SERVICEHOME
67HOSTNAME = localhost
68PORT = 3089
69UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_resolver_peer2.sock
70
71[statistics]
72ACCEPT_FROM6 = ::1;
73ACCEPT_FROM = 127.0.0.1;
74BINARY = gnunet-service-statistics
75CONFIG = $DEFAULTCONFIG
76HOME = $SERVICEHOME
77HOSTNAME = localhost
78PORT = 3088
79UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_statistics_peer2.sock
80
81[arm]
82DEFAULTSERVICES =
83ACCEPT_FROM6 = ::1;
84ACCEPT_FROM = 127.0.0.1;
85BINARY = gnunet-service-arm
86CONFIG = $DEFAULTCONFIG
87HOME = $SERVICEHOME
88HOSTNAME = localhost
89PORT = 3087
90UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_arm_peer2.sock
91
92[TESTING]
93WEAKRANDOM = YES
94
95[gnunetd]
96HOSTKEY = $SERVICEHOME/.hostkey
97
98
99[dht]
100AUTOSTART = NO
101
102