diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-09 17:31:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-09 17:31:04 +0000 |
commit | 6884edf943572c2a23544813858edd92186214c3 (patch) | |
tree | fdd45051f4170e78d2a1e5feaab05295e5bc892a /src/integration-tests | |
parent | aac6badf87eb6b89def532f06aa9c6e1544f5d60 (diff) | |
download | gnunet-6884edf943572c2a23544813858edd92186214c3.tar.gz gnunet-6884edf943572c2a23544813858edd92186214c3.zip |
clique
Diffstat (limited to 'src/integration-tests')
-rw-r--r-- | src/integration-tests/Makefile.am | 16 | ||||
-rw-r--r-- | src/integration-tests/confs/c_no_nat_client_2.conf | 344 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0002-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0003-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0004-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0005-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0006-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0007-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0008-hostkey | bin | 0 -> 914 bytes | |||
-rw-r--r-- | src/integration-tests/hostkeys/0009-hostkey | bin | 0 -> 914 bytes | |||
-rwxr-xr-x | src/integration-tests/test_integration_clique.py.in | 441 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_disconnect.py.in | 4 |
12 files changed, 754 insertions, 51 deletions
diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index f30c40978..a40fa76e6 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am | |||
@@ -17,7 +17,8 @@ check_PROGRAMS = | |||
17 | if HAVE_PYTHON_PEXPECT | 17 | if HAVE_PYTHON_PEXPECT |
18 | check_SCRIPTS = \ | 18 | check_SCRIPTS = \ |
19 | test_integration_bootstrap_and_connect.py \ | 19 | test_integration_bootstrap_and_connect.py \ |
20 | test_integration_disconnect.py | 20 | test_integration_disconnect.py \ |
21 | test_integration_clique.py | ||
21 | endif | 22 | endif |
22 | 23 | ||
23 | 24 | ||
@@ -28,10 +29,6 @@ endif | |||
28 | 29 | ||
29 | do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' | 30 | do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g' |
30 | 31 | ||
31 | test_integration_clique.py: test_integration_clique.py.in Makefile | ||
32 | $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py | ||
33 | chmod +x test_integration_clique.py | ||
34 | |||
35 | test_integration_bootstrap_and_connect.py: test_integration_bootstrap_and_connect.py.in Makefile | 32 | test_integration_bootstrap_and_connect.py: test_integration_bootstrap_and_connect.py.in Makefile |
36 | $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py | 33 | $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect.py.in > test_integration_bootstrap_and_connect.py |
37 | chmod +x test_integration_bootstrap_and_connect.py | 34 | chmod +x test_integration_bootstrap_and_connect.py |
@@ -39,12 +36,15 @@ test_integration_bootstrap_and_connect.py: test_integration_bootstrap_and_connec | |||
39 | test_integration_disconnect.py: test_integration_disconnect.py.in Makefile | 36 | test_integration_disconnect.py: test_integration_disconnect.py.in Makefile |
40 | $(do_subst) < $(srcdir)/test_integration_disconnect.py.in > test_integration_disconnect.py | 37 | $(do_subst) < $(srcdir)/test_integration_disconnect.py.in > test_integration_disconnect.py |
41 | chmod +x test_integration_disconnect.py | 38 | chmod +x test_integration_disconnect.py |
42 | 39 | ||
40 | test_integration_clique.py: test_integration_clique.py.in Makefile | ||
41 | $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py | ||
42 | chmod +x test_integration_clique.py | ||
43 | 43 | ||
44 | EXTRA_DIST = \ | 44 | EXTRA_DIST = \ |
45 | test_integration_bootstrap_and_connect.py.in \ | 45 | test_integration_bootstrap_and_connect.py.in \ |
46 | test_integration_disconnect.py.in | 46 | test_integration_disconnect.py.in \ |
47 | # test_integration_clique.py.in | 47 | test_integration_clique.py.in |
48 | 48 | ||
49 | 49 | ||
50 | CLEANFILES = $(check_SCRIPTS) | 50 | CLEANFILES = $(check_SCRIPTS) |
diff --git a/src/integration-tests/confs/c_no_nat_client_2.conf b/src/integration-tests/confs/c_no_nat_client_2.conf new file mode 100644 index 000000000..bd675d7d2 --- /dev/null +++ b/src/integration-tests/confs/c_no_nat_client_2.conf | |||
@@ -0,0 +1,344 @@ | |||
1 | [PATHS] | ||
2 | SERVICEHOME = /tmp/c_no_nat_client_2/ | ||
3 | DEFAULTCONFIG = confs/c_no_nat_client_2.conf | ||
4 | |||
5 | [gnunetd] | ||
6 | #HOSTKEY = $SERVICEHOME/.hostkey | ||
7 | HOSTKEY = hostkeys/0002-hostkey | ||
8 | |||
9 | [resolver] | ||
10 | AUTOSTART = YES | ||
11 | PORT = 20053 | ||
12 | HOSTNAME = localhost | ||
13 | HOME = $SERVICEHOME | ||
14 | CONFIG = $DEFAULTCONFIG | ||
15 | BINARY = gnunet-service-resolver | ||
16 | ACCEPT_FROM = 127.0.0.1; | ||
17 | ACCEPT_FROM6 = ::1; | ||
18 | UNIXPATH = /tmp/test-service-resolver-42 | ||
19 | UNIX_MATCH_UID = NO | ||
20 | UNIX_MATCH_GID = NO | ||
21 | |||
22 | [mesh] | ||
23 | AUTOSTART = YES | ||
24 | PORT = 20052 | ||
25 | HOSTNAME = localhost | ||
26 | HOME = $SERVICEHOME | ||
27 | CONFIG = $DEFAULTCONFIG | ||
28 | BINARY = gnunet-service-mesh | ||
29 | ACCEPT_FROM = 127.0.0.1; | ||
30 | ACCEPT_FROM6 = ::1; | ||
31 | UNIXPATH = /tmp/test-service-mesh-41 | ||
32 | UNIX_MATCH_UID = YES | ||
33 | UNIX_MATCH_GID = YES | ||
34 | |||
35 | [nse] | ||
36 | AUTOSTART = YES | ||
37 | PORT = 20051 | ||
38 | HOSTNAME = localhost | ||
39 | HOME = $SERVICEHOME | ||
40 | CONFIG = $DEFAULTCONFIG | ||
41 | BINARY = gnunet-service-nse | ||
42 | ACCEPT_FROM = 127.0.0.1; | ||
43 | ACCEPT_FROM6 = ::1; | ||
44 | UNIXPATH = /tmp/test-service-nse-40 | ||
45 | UNIX_MATCH_UID = YES | ||
46 | UNIX_MATCH_GID = YES | ||
47 | PROOFFILE = $SERVICEHOME/.nse-proof | ||
48 | HISTOGRAM = $SERVICEHOME/nse-history.log | ||
49 | WORKDELAY = 5 ms | ||
50 | INTERVAL = 1 h | ||
51 | WORKBITS = 26 | ||
52 | |||
53 | [topology] | ||
54 | MINIMUM-FRIENDS = 0 | ||
55 | FRIENDS-ONLY = NO | ||
56 | AUTOCONNECT = YES | ||
57 | TARGET-CONNECTION-COUNT = 16 | ||
58 | FRIENDS = $SERVICEHOME/friends | ||
59 | CONFIG = $DEFAULTCONFIG | ||
60 | BINARY = gnunet-daemon-topology | ||
61 | |||
62 | [datastore] | ||
63 | AUTOSTART = YES | ||
64 | UNIXPATH = /tmp/test-service-datastore-39 | ||
65 | UNIX_MATCH_UID = YES | ||
66 | UNIX_MATCH_GID = YES | ||
67 | PORT = 20050 | ||
68 | HOSTNAME = localhost | ||
69 | HOME = $SERVICEHOME | ||
70 | CONFIG = $DEFAULTCONFIG | ||
71 | BINARY = gnunet-service-datastore | ||
72 | ACCEPT_FROM = 127.0.0.1; | ||
73 | ACCEPT_FROM6 = ::1; | ||
74 | QUOTA = 100 MB | ||
75 | BLOOMFILTER = $SERVICEHOME/fs/bloomfilter | ||
76 | DATABASE = sqlite | ||
77 | |||
78 | [datastore-sqlite] | ||
79 | FILENAME = $SERVICEHOME/datastore/sqlite.db | ||
80 | |||
81 | [datastore-postgres] | ||
82 | CONFIG = connect_timeout=10; dbname=gnunet | ||
83 | |||
84 | [datastore-mysql] | ||
85 | DATABASE = gnunet | ||
86 | CONFIG = ~/.my.cnf | ||
87 | |||
88 | [peerinfo] | ||
89 | AUTOSTART = YES | ||
90 | PORT = 20049 | ||
91 | HOSTNAME = localhost | ||
92 | HOME = $SERVICEHOME | ||
93 | CONFIG = $DEFAULTCONFIG | ||
94 | BINARY = gnunet-service-peerinfo | ||
95 | ACCEPT_FROM = 127.0.0.1; | ||
96 | ACCEPT_FROM6 = ::1; | ||
97 | UNIXPATH = /tmp/test-service-peerinfo-38 | ||
98 | UNIX_MATCH_UID = NO | ||
99 | UNIX_MATCH_GID = YES | ||
100 | HOSTS = $SERVICEHOME/data/hosts/ | ||
101 | |||
102 | [client] | ||
103 | HOME = $SERVICEHOME | ||
104 | |||
105 | [TESTING] | ||
106 | WEAKRANDOM = NO | ||
107 | CONNECT_TIMEOUT = 30 s | ||
108 | CONNECT_ATTEMPTS = 3 | ||
109 | MAX_OUTSTANDING_CONNECTIONS = 50 | ||
110 | DELETE_FILES = YES | ||
111 | |||
112 | [ats] | ||
113 | AUTOSTART = YES | ||
114 | PORT = 20048 | ||
115 | HOSTNAME = localhost | ||
116 | HOME = $SERVICEHOME | ||
117 | CONFIG = $DEFAULTCONFIG | ||
118 | BINARY = gnunet-service-ats | ||
119 | ACCEPT_FROM = 127.0.0.1; | ||
120 | ACCEPT_FROM6 = ::1; | ||
121 | UNIXPATH = /tmp/test-service-ats-37 | ||
122 | UNIX_MATCH_UID = YES | ||
123 | UNIX_MATCH_GID = YES | ||
124 | WAN_QUOTA_IN = 65536 | ||
125 | WAN_QUOTA_OUT = 65536 | ||
126 | DUMP_MLP = NO | ||
127 | DUMP_SOLUTION = NO | ||
128 | DUMP_OVERWRITE = NO | ||
129 | DUMP_MIN_PEERS = 0 | ||
130 | DUMP_MIN_ADDRS = 0 | ||
131 | ATS_MIN_INTERVAL = 15000 | ||
132 | ATS_EXEC_INTERVAL = 30000 | ||
133 | |||
134 | [transport] | ||
135 | AUTOSTART = YES | ||
136 | PORT = 20047 | ||
137 | HOSTNAME = localhost | ||
138 | HOME = $SERVICEHOME | ||
139 | CONFIG = $DEFAULTCONFIG | ||
140 | BINARY = gnunet-service-transport | ||
141 | NEIGHBOUR_LIMIT = 50 | ||
142 | ACCEPT_FROM = 127.0.0.1; | ||
143 | ACCEPT_FROM6 = ::1; | ||
144 | PLUGINS = tcp | ||
145 | UNIXPATH = /tmp/test-service-transport-36 | ||
146 | BLACKLIST_FILE = $SERVICEHOME/blacklist | ||
147 | UNIX_MATCH_UID = YES | ||
148 | UNIX_MATCH_GID = YES | ||
149 | |||
150 | [transport-tcp] | ||
151 | PORT = 20046 | ||
152 | ADVERTISED_PORT = 20046 | ||
153 | MAX_CONNECTIONS = 128 | ||
154 | TIMEOUT = 5 s | ||
155 | USE_LOCALADDR = YES | ||
156 | |||
157 | [transport-udp] | ||
158 | PORT = 20045 | ||
159 | BROADCAST = YES | ||
160 | BROADCAST_INTERVAL = 30000 | ||
161 | MAX_BPS = 1000000 | ||
162 | USE_LOCALADDR = YES | ||
163 | |||
164 | [transport-http] | ||
165 | PORT = 20044 | ||
166 | MAX_CONNECTIONS = 128 | ||
167 | |||
168 | [transport-https] | ||
169 | PORT = 20043 | ||
170 | CRYPTO_INIT = NORMAL | ||
171 | KEY_FILE = https.key | ||
172 | CERT_FILE = https.cert | ||
173 | MAX_CONNECTIONS = 128 | ||
174 | |||
175 | [transport-wlan] | ||
176 | INTERFACE = mon0 | ||
177 | TESTMODE = 0 | ||
178 | |||
179 | [datacache-mysql] | ||
180 | DATABASE = gnunet | ||
181 | CONFIG = ~/.my.cnf | ||
182 | |||
183 | [datacache-postgres] | ||
184 | CONFIG = connect_timeout=10; dbname=gnunet | ||
185 | |||
186 | [template] | ||
187 | AUTOSTART = NO | ||
188 | PORT = 20042 | ||
189 | HOSTNAME = localhost | ||
190 | HOME = $SERVICEHOME | ||
191 | CONFIG = $DEFAULTCONFIG | ||
192 | BINARY = gnunet-service-template | ||
193 | ACCEPT_FROM = 127.0.0.1; | ||
194 | ACCEPT_FROM6 = ::1; | ||
195 | UNIXPATH = /tmp/test-service-template-35 | ||
196 | UNIX_MATCH_UID = YES | ||
197 | UNIX_MATCH_GID = YES | ||
198 | |||
199 | [fs] | ||
200 | AUTOSTART = YES | ||
201 | INDEXDB = $SERVICEHOME/idxinfo.lst | ||
202 | TRUST = $SERVICEHOME/data/credit/ | ||
203 | IDENTITY_DIR = $SERVICEHOME/identities/ | ||
204 | STATE_DIR = $SERVICEHOME/persistence/ | ||
205 | UPDATE_DIR = $SERVICEHOME/updates/ | ||
206 | PORT = 20041 | ||
207 | HOSTNAME = localhost | ||
208 | HOME = $SERVICEHOME | ||
209 | CONFIG = $DEFAULTCONFIG | ||
210 | BINARY = gnunet-service-fs | ||
211 | ACCEPT_FROM = 127.0.0.1; | ||
212 | ACCEPT_FROM6 = ::1; | ||
213 | DELAY = YES | ||
214 | CONTENT_CACHING = YES | ||
215 | CONTENT_PUSHING = YES | ||
216 | UNIXPATH = /tmp/test-service-fs-34 | ||
217 | UNIX_MATCH_UID = NO | ||
218 | UNIX_MATCH_GID = YES | ||
219 | MAX_PENDING_REQUESTS = 65536 | ||
220 | MIN_MIGRATION_DELAY = 100 ms | ||
221 | EXPECTED_NEIGHBOUR_COUNT = 128 | ||
222 | |||
223 | [vpn] | ||
224 | CONFIG = $DEFAULTCONFIG | ||
225 | BINARY = gnunet-daemon-vpn | ||
226 | IPV6ADDR = 1234::1 | ||
227 | IPV6PREFIX = 32 | ||
228 | IPV4ADDR = 10.11.10.1 | ||
229 | IPV4MASK = 255.255.0.0 | ||
230 | VIRTDNS = 10.11.10.2 | ||
231 | VIRTDNS6 = 1234::17 | ||
232 | IFNAME = vpn-gnunet | ||
233 | |||
234 | [exit] | ||
235 | CONFIG = $DEFAULTCONFIG | ||
236 | BINARY = gnunet-daemon-exit | ||
237 | IPV6ADDR = 1234:1::1 | ||
238 | IPV6PREFIX = 32 | ||
239 | IPV4ADDR = 10.10.1.1 | ||
240 | IPV4MASK = 255.255.0.0 | ||
241 | IFNAME = exit-gnunet | ||
242 | ENABLE_UDP = NO | ||
243 | ENABLE_TCP = NO | ||
244 | |||
245 | [dns] | ||
246 | AUTOSTART = YES | ||
247 | PORT = 0 | ||
248 | HOSTNAME = localhost | ||
249 | HOME = $SERVICEHOME | ||
250 | CONFIG = $DEFAULTCONFIG | ||
251 | BINARY = gnunet-service-dns | ||
252 | ACCEPT_FROM = 127.0.0.1; | ||
253 | ACCEPT_FROM6 = ::1; | ||
254 | UNIXPATH = /tmp/test-service-dns-33 | ||
255 | PROVIDE_EXIT = NO | ||
256 | |||
257 | [arm] | ||
258 | PORT = 20040 | ||
259 | HOSTNAME = localhost | ||
260 | HOME = $SERVICEHOME | ||
261 | CONFIG = $DEFAULTCONFIG | ||
262 | BINARY = gnunet-service-arm | ||
263 | ACCEPT_FROM = 127.0.0.1; | ||
264 | ACCEPT_FROM6 = ::1; | ||
265 | DEFAULTSERVICES = topology hostlist fs | ||
266 | UNIXPATH = /tmp/test-service-arm-32 | ||
267 | UNIX_MATCH_UID = YES | ||
268 | UNIX_MATCH_GID = YES | ||
269 | |||
270 | [hostlist] | ||
271 | HTTPPORT = 8080 | ||
272 | HOME = $SERVICEHOME | ||
273 | HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data | ||
274 | CONFIG = $DEFAULTCONFIG | ||
275 | BINARY = gnunet-daemon-hostlist | ||
276 | OPTIONS = -b | ||
277 | SERVERS = http://localhost:8080/ | ||
278 | HTTP-PROXY = | ||
279 | |||
280 | [core] | ||
281 | AUTOSTART = YES | ||
282 | PORT = 20039 | ||
283 | HOSTNAME = localhost | ||
284 | HOME = $SERVICEHOME | ||
285 | CONFIG = $DEFAULTCONFIG | ||
286 | BINARY = gnunet-service-core | ||
287 | ACCEPT_FROM = 127.0.0.1; | ||
288 | ACCEPT_FROM6 = ::1; | ||
289 | UNIXPATH = /tmp/test-service-core-31 | ||
290 | UNIX_MATCH_UID = YES | ||
291 | UNIX_MATCH_GID = YES | ||
292 | |||
293 | [nat] | ||
294 | BEHIND_NAT = NO | ||
295 | PUNCHED_NAT = NO | ||
296 | ENABLE_UPNP = NO | ||
297 | USE_LOCALADDR = YES | ||
298 | USE_HOSTNAME = NO | ||
299 | ENABLE_ICMP_CLIENT = NO | ||
300 | ENABLE_ICMP_SERVER = NO | ||
301 | DISABLEV6 = YES | ||
302 | RETURN_LOCAL_ADDRESSES = NO | ||
303 | HOSTNAME_DNS_FREQUENCY = 1200000 | ||
304 | IFC_SCAN_FREQUENCY = 3000000 | ||
305 | DYNDNS_FREQUENCY = 140000 | ||
306 | EXTERNAL_ADDRESS = 127.0.0.1 | ||
307 | INTERNAL_ADDRESS = 127.0.0.1 | ||
308 | BINDTO = 127.0.0.1 | ||
309 | |||
310 | [gnunet-nat-server] | ||
311 | HOSTNAME = gnunet.org | ||
312 | PORT = 20038 | ||
313 | |||
314 | [statistics] | ||
315 | AUTOSTART = YES | ||
316 | PORT = 20037 | ||
317 | HOSTNAME = localhost | ||
318 | HOME = $SERVICEHOME | ||
319 | CONFIG = $DEFAULTCONFIG | ||
320 | BINARY = gnunet-service-statistics | ||
321 | ACCEPT_FROM = 127.0.0.1; | ||
322 | ACCEPT_FROM6 = ::1; | ||
323 | UNIXPATH = /tmp/test-service-statistics-30 | ||
324 | UNIX_MATCH_UID = NO | ||
325 | UNIX_MATCH_GID = YES | ||
326 | |||
327 | [dht] | ||
328 | AUTOSTART = YES | ||
329 | PORT = 20036 | ||
330 | HOSTNAME = localhost | ||
331 | HOME = $SERVICEHOME | ||
332 | CONFIG = $DEFAULTCONFIG | ||
333 | BINARY = gnunet-service-dht | ||
334 | ACCEPT_FROM = 127.0.0.1; | ||
335 | ACCEPT_FROM6 = ::1; | ||
336 | BUCKET_SIZE = 4 | ||
337 | UNIXPATH = /tmp/test-service-dht-29 | ||
338 | UNIX_MATCH_UID = YES | ||
339 | UNIX_MATCH_GID = YES | ||
340 | |||
341 | [dhtcache] | ||
342 | DATABASE = sqlite | ||
343 | QUOTA = 1 MB | ||
344 | |||
diff --git a/src/integration-tests/hostkeys/0002-hostkey b/src/integration-tests/hostkeys/0002-hostkey new file mode 100644 index 000000000..2ffb55fad --- /dev/null +++ b/src/integration-tests/hostkeys/0002-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0003-hostkey b/src/integration-tests/hostkeys/0003-hostkey new file mode 100644 index 000000000..13bc88934 --- /dev/null +++ b/src/integration-tests/hostkeys/0003-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0004-hostkey b/src/integration-tests/hostkeys/0004-hostkey new file mode 100644 index 000000000..a15a07347 --- /dev/null +++ b/src/integration-tests/hostkeys/0004-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0005-hostkey b/src/integration-tests/hostkeys/0005-hostkey new file mode 100644 index 000000000..4bcfffef4 --- /dev/null +++ b/src/integration-tests/hostkeys/0005-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0006-hostkey b/src/integration-tests/hostkeys/0006-hostkey new file mode 100644 index 000000000..c595d9141 --- /dev/null +++ b/src/integration-tests/hostkeys/0006-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0007-hostkey b/src/integration-tests/hostkeys/0007-hostkey new file mode 100644 index 000000000..f7e9dbc6b --- /dev/null +++ b/src/integration-tests/hostkeys/0007-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0008-hostkey b/src/integration-tests/hostkeys/0008-hostkey new file mode 100644 index 000000000..559a69c3d --- /dev/null +++ b/src/integration-tests/hostkeys/0008-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/hostkeys/0009-hostkey b/src/integration-tests/hostkeys/0009-hostkey new file mode 100644 index 000000000..7d8ce5e38 --- /dev/null +++ b/src/integration-tests/hostkeys/0009-hostkey | |||
Binary files differ | |||
diff --git a/src/integration-tests/test_integration_clique.py.in b/src/integration-tests/test_integration_clique.py.in index 892f80931..a2008742c 100755 --- a/src/integration-tests/test_integration_clique.py.in +++ b/src/integration-tests/test_integration_clique.py.in | |||
@@ -18,67 +18,426 @@ | |||
18 | # Boston, MA 02111-1307, USA. | 18 | # Boston, MA 02111-1307, USA. |
19 | # | 19 | # |
20 | # | 20 | # |
21 | # | ||
22 | # This test starts 3 peers and expects bootstrap and a connected clique | ||
23 | # | ||
24 | # Conditions for successful exit: | ||
25 | # Both peers have 1 connected peer in transport, core, topology, fs | ||
26 | |||
21 | import sys | 27 | import sys |
22 | import os | 28 | import os |
23 | import subprocess | 29 | import subprocess |
24 | import re | 30 | import re |
25 | import shutil | 31 | import shutil |
32 | import time | ||
33 | import pexpect | ||
26 | 34 | ||
35 | #definitions | ||
27 | 36 | ||
28 | testname = "test_integration_clique" | 37 | testname = "test_integration_clique" |
29 | verbose = True | 38 | verbose = False |
39 | gnunetarm = "" | ||
40 | gnunetstatistics = "" | ||
41 | success = False | ||
42 | timeout = 10 | ||
30 | 43 | ||
31 | srcdir = "../.." | 44 | #test conditions |
32 | gnunet_pyexpect_dir = os.path.join (srcdir, "contrib") | ||
33 | if gnunet_pyexpect_dir not in sys.path: | ||
34 | sys.path.append (gnunet_pyexpect_dir) | ||
35 | 45 | ||
36 | from gnunet_pyexpect import pexpect | ||
37 | 46 | ||
38 | if os.name == 'posix': | 47 | def vprintf (msg): |
39 | gnunetarm = 'gnunet-arm' | 48 | if verbose == True: |
40 | elif os.name == 'nt': | 49 | print msg |
41 | gnunetarm = 'gnunet-arm.exe' | ||
42 | 50 | ||
43 | if os.name == "nt": | 51 | def setup (): |
44 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), testname), True) | 52 | srcdir = "../.." |
45 | else: | 53 | gnunet_pyexpect_dir = os.path.join (srcdir, "contrib") |
46 | shutil.rmtree ("/tmp/" + testname, True) | 54 | if gnunet_pyexpect_dir not in sys.path: |
55 | sys.path.append (gnunet_pyexpect_dir) | ||
56 | from gnunet_pyexpect import pexpect | ||
57 | global gnunetarm | ||
58 | global gnunetstatistics | ||
59 | if os.name == 'posix': | ||
60 | gnunetarm = 'gnunet-arm' | ||
61 | gnunetstatistics = 'gnunet-statistics' | ||
62 | elif os.name == 'nt': | ||
63 | gnunetarm = 'gnunet-arm.exe' | ||
64 | gnunetstatistics = 'gnunet-statistics.exe' | ||
65 | if os.name == "nt": | ||
66 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), testname), True) | ||
67 | else: | ||
68 | shutil.rmtree ("/tmp/" + testname, True) | ||
47 | 69 | ||
48 | if verbose == True: | 70 | def start (): |
49 | print "Running " + testname | 71 | vprintf ("Starting bootstrap server & client") |
72 | try: | ||
73 | server = subprocess.Popen ([gnunetarm, '-sq', '-c', './confs/c_bootstrap_server.conf']) | ||
74 | server.communicate () | ||
75 | except OSError: | ||
76 | print "Can not start bootstrap server, exiting..." | ||
77 | exit (1) | ||
78 | try: | ||
79 | client = subprocess.Popen ([gnunetarm, '-sq', '-c', 'confs/c_no_nat_client.conf']) | ||
80 | client.communicate () | ||
81 | except OSError: | ||
82 | print "Can not start bootstrap client, exiting..." | ||
83 | exit (1) | ||
84 | try: | ||
85 | client = subprocess.Popen ([gnunetarm, '-sq', '-c', 'confs/c_no_nat_client_2.conf']) | ||
86 | client.communicate () | ||
87 | except OSError: | ||
88 | print "Can not start bootstrap client 2, exiting..." | ||
89 | exit (1) | ||
90 | vprintf ("Bootstrap server & client started") | ||
50 | 91 | ||
92 | def stop (): | ||
93 | try: | ||
94 | client = subprocess.Popen ([gnunetarm, '-eq', '-c', 'confs/c_no_nat_client.conf']) | ||
95 | client.communicate () | ||
96 | except OSError: | ||
97 | print "Can not stop bootstrap client 1, exiting..." | ||
98 | exit (1) | ||
99 | vprintf ("Bootstrap client stopped") | ||
51 | 100 | ||
52 | 101 | ||
102 | def cleanup (): | ||
103 | if os.name == "nt": | ||
104 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True) | ||
105 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client"), True) | ||
106 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_no_nat_client_2"), True) | ||
107 | else: | ||
108 | shutil.rmtree ("/tmp/c_bootstrap_server/", True) | ||
109 | shutil.rmtree ("/tmp/c_no_nat_client/", True) | ||
110 | shutil.rmtree ("/tmp/c_no_nat_client_2/", True) | ||
53 | 111 | ||
54 | exit () | 112 | def check_statistics (conf, subsystem, name, value): |
55 | # dummy copied from fs | 113 | from gnunet_pyexpect import pexpect |
56 | arm = subprocess.Popen ([gnunetarm, '-sq', '-c', 'test_gnunet_fs_ns_data.conf']) | 114 | server = pexpect () |
57 | arm.communicate () | 115 | server.spawn (None, [gnunetstatistics, '-c', conf ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
116 | #server.expect ("stdout", re.compile (r"")) | ||
117 | test = server.read("stdout", 10240) | ||
118 | if (test.find(str(value)) == -1): | ||
119 | return False | ||
120 | else: | ||
121 | return True | ||
122 | |||
123 | |||
58 | 124 | ||
59 | try: | 125 | def check_connect (): |
60 | pseu = pexpect () | 126 | server_transport_connected = False |
61 | pseu.spawn (None, [pseudonym, '-c', 'test_gnunet_fs_ns_data.conf', '-C', 'licenses', '-k', 'gplad', '-m', 'description:Free Software Licenses', '-R', 'myroot'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 127 | server_topology_connected = False |
62 | pseu.spawn (None, [pseudonym, '-c', 'test_gnunet_fs_ns_data.conf', '-o'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 128 | server_core_connected = False |
63 | pseu.expect ("stdout", re.compile (r"licenses (.*)\r?\n")) | 129 | server_core_session_map = False |
130 | server_fs_connected = False | ||
131 | client_transport_connected = False | ||
132 | client_topology_connected = False | ||
133 | client_core_connected = False | ||
134 | client_core_session_map = False | ||
135 | client_fs_connected = False | ||
136 | |||
137 | client2_transport_connected = False | ||
138 | client2_topology_connected = False | ||
139 | client2_core_connected = False | ||
140 | client2_core_session_map = False | ||
141 | client2_fs_connected = False | ||
142 | |||
143 | connected = False | ||
144 | count = 1 | ||
145 | while ((connected == False) and (count <= timeout)): | ||
146 | # Perform TRANSPORT | ||
147 | if ((False == server_transport_connected) and (True == check_statistics ('./confs/c_bootstrap_server.conf', 'transport', '# peers connected',2))): | ||
148 | server_transport_connected = True | ||
149 | vprintf ('Server transport services is connected') | ||
150 | |||
151 | if ((False == client_transport_connected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'transport', '# peers connected',2))): | ||
152 | client_transport_connected = True | ||
153 | vprintf ('Client transport services is connected') | ||
154 | |||
155 | if ((False == client2_transport_connected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'transport', '# peers connected',2))): | ||
156 | client2_transport_connected = True | ||
157 | vprintf ('Client 2 transport services is connected') | ||
64 | 158 | ||
65 | pub = pexpect () | 159 | # Perform TRANSPORT |
66 | pub.spawn (None, [publish, '-c', 'test_gnunet_fs_ns_data.conf', '-k', 'licenses', '-P', 'licenses', '-u', 'gnunet://fs/chk/PC0M19QMQC0BPSHR6BGA228PP6INER1D610MGEMOMEM87222FN8HVUO7PQGO0O9HD2GVLHF2N5IDHEQUNK6LKE428FPO96SKQEA486O.PG7K85JGQ6N599MD5HEP3CHEVFPKQD9JB6NPSLVA3T1SKDS66CFI499VS6MGQ88B0QUAVT1282TCRD4GGFVUKDLGI8F0SPIANA3J2LG.35147', '-t', 'gpl', '-N', 'gpl3'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 160 | if ((False == server_core_connected) and (True == check_statistics ('./confs/c_bootstrap_server.conf', 'core', '# neighbour entries allocated',2))): |
161 | server_core_connected = True | ||
162 | vprintf ('Server core services is connected') | ||
163 | |||
164 | if ((False == client_core_connected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'core', '# neighbour entries allocated',2))): | ||
165 | client_core_connected = True | ||
166 | vprintf ('Client core services is connected') | ||
67 | 167 | ||
68 | s = pexpect () | 168 | if ((False == client2_core_connected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'core', '# neighbour entries allocated',2))): |
69 | s.spawn (None, [search, '-V', '-t', '1000', '-N', '1', '-c', 'test_gnunet_fs_ns_data.conf', 'gplad'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 169 | client2_core_connected = True |
70 | s.expect ("stdout", re.compile (r'#0:\r?\n')) | 170 | vprintf ('Client2 core services is connected') |
71 | s.expect ("stdout", re.compile (r'gnunet-download gnunet://fs/sks/.*/myroot\r?\n')) | 171 | |
72 | s.expect ("stdout", re.compile (r'\s*description: Free Software Licenses\r?\n')) | 172 | # Perform TRANSPORT |
173 | if ((False == server_core_session_map) and (True == check_statistics ('./confs/c_bootstrap_server.conf', 'core', '# entries in session map',2))): | ||
174 | server_core_session_map = True | ||
175 | vprintf ('Server core services is connected') | ||
176 | |||
177 | if ((False == client_core_session_map) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'core', '# entries in session map',2))): | ||
178 | client_core_session_map = True | ||
179 | vprintf ('Client core notifies about connected') | ||
73 | 180 | ||
74 | pseu = pexpect () | 181 | if ((False == client2_core_session_map) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'core', '# entries in session map',2))): |
75 | pseu.spawn (None, [pseudonym, '-c', 'test_gnunet_fs_ns_data.conf'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 182 | client2_core_session_map = True |
76 | pseu.expect ("stdout", re.compile (r'Free Software Licenses.*:\r?\n')) | 183 | vprintf ('Client2 core notifies about connected') |
77 | 184 | ||
78 | finally: | 185 | # Perform TRANSPORT |
79 | arm = subprocess.Popen ([gnunetarm, '-eq', '-c', 'test_gnunet_fs_ns_data.conf']) | 186 | if ((False == server_topology_connected) and (True == check_statistics ('./confs/c_bootstrap_server.conf', 'topology', '# peers connected',2))): |
80 | arm.communicate () | 187 | server_topology_connected = True |
81 | if os.name == "nt": | 188 | vprintf ('Server topology services is connected') |
82 | shutil.rmtree (os.path.join (os.getenv ("TEMP"), "gnunet-test-fs-py-ns"), True) | 189 | |
190 | if ((False == client_topology_connected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'topology', '# peers connected',2))): | ||
191 | client_topology_connected = True | ||
192 | vprintf ('Client topology services is connected') | ||
193 | |||
194 | if ((False == client2_topology_connected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'topology', '# peers connected',2))): | ||
195 | client2_topology_connected = True | ||
196 | vprintf ('Client2 topology services is connected') | ||
197 | |||
198 | # Perform TRANSPORT | ||
199 | if ((False == server_fs_connected) and (True == check_statistics ('./confs/c_bootstrap_server.conf', 'fs', '# peers connected',2))): | ||
200 | server_fs_connected = True | ||
201 | vprintf ('Server fs services is connected') | ||
202 | |||
203 | if ((False == client_fs_connected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'fs', '# peers connected',2))): | ||
204 | client_fs_connected = True | ||
205 | vprintf ('Client fs services is connected') | ||
206 | |||
207 | if ((False == client2_fs_connected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'fs', '# peers connected',2))): | ||
208 | client2_fs_connected = True | ||
209 | vprintf ('Client2 fs services is connected') | ||
210 | |||
211 | # Check if conditions fulfilled | ||
212 | if ((True == client_transport_connected) and (True == client2_transport_connected) and (True == server_transport_connected) and | ||
213 | (True == client_topology_connected) and (True == client2_topology_connected) and (True == server_topology_connected) and | ||
214 | (True == client_core_connected) and (True == client2_core_connected) and (True == server_core_connected) and | ||
215 | (True == client_core_session_map) and (True == client2_core_session_map) and (True == server_core_session_map) and | ||
216 | (True == client_fs_connected) and (True == client2_fs_connected) and (True == server_fs_connected)): | ||
217 | connected = True | ||
218 | break | ||
219 | print '.', | ||
220 | time.sleep(1) | ||
221 | count += 1 | ||
222 | if (connected == False): | ||
223 | print '' | ||
224 | if (server_transport_connected == False): | ||
225 | print ('Server transport was NOT connected') | ||
226 | if (server_topology_connected == False): | ||
227 | print ('Server topology was NOT connected') | ||
228 | if (server_core_connected == False): | ||
229 | print ('Server core was NOT connected') | ||
230 | if (server_core_session_map == False): | ||
231 | print ('Server core sessions did NOT increase') | ||
232 | |||
233 | if (client_transport_connected == False): | ||
234 | print ('Client transport was NOT connected') | ||
235 | if (client_topology_connected == False): | ||
236 | print ('Client topology was NOT connected') | ||
237 | if (client_core_connected == False): | ||
238 | print ('Client core was NOT connected') | ||
239 | if (client_core_session_map == False): | ||
240 | print ('Client core sessions did NOT increase') | ||
241 | |||
242 | if (client2_transport_connected == False): | ||
243 | print ('Client2 transport was NOT connected') | ||
244 | if (client2_topology_connected == False): | ||
245 | print ('Client2 topology was NOT connected') | ||
246 | if (client2_core_connected == False): | ||
247 | print ('Client2 core was NOT connected') | ||
248 | if (client2_core_session_map == False): | ||
249 | print ('Client2 core sessions did NOT increase') | ||
250 | return False | ||
83 | else: | 251 | else: |
84 | shutil.rmtree ("/tmp/gnunet-test-fs-py-ns", True) | 252 | return True |
253 | |||
254 | def check_disconnect_client (): | ||
255 | vprintf ("Shutting down client 2") | ||
256 | try: | ||
257 | server = subprocess.Popen ([gnunetarm, '-eq', '-c', './confs/c_no_nat_client_2.conf']) | ||
258 | server.communicate () | ||
259 | except OSError: | ||
260 | print "Can not stop client 2, exiting..." | ||
261 | exit (1) | ||
262 | |||
263 | client_transport_disconnected = False | ||
264 | client_topology_disconnected = False | ||
265 | client_core_disconnected = False | ||
266 | client_core_session_map = False | ||
267 | client_fs_disconnected = False | ||
268 | |||
269 | disconnected = False | ||
270 | count = 1 | ||
271 | while ((disconnected == False) and (count <= timeout)): | ||
272 | if ((False == client_transport_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'transport', '# peers connected',0))): | ||
273 | client_transport_disconnected = True | ||
274 | vprintf ('Client transport services is disconnected') | ||
275 | |||
276 | if ((False == client_core_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'core', '# neighbour entries allocated',0))): | ||
277 | client_core_disconnected = True | ||
278 | vprintf ('Client core services is disconnected') | ||
279 | |||
280 | if ((False == client_core_session_map) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'core', '# entries in session map',0))): | ||
281 | client_core_session_map = True | ||
282 | vprintf ('Client core notifies about disconnected') | ||
283 | |||
284 | if ((False == client_topology_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'topology', '# peers connected',0))): | ||
285 | client_topology_disconnected = True | ||
286 | vprintf ('Client topology services is disconnected') | ||
287 | |||
288 | if ((False == client_fs_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'fs', '# peers connected',0))): | ||
289 | client_fs_disconnected = True | ||
290 | vprintf ('Client fs services is disconnected') | ||
291 | |||
292 | # Check if conditions fulfilled | ||
293 | if ((True == client_transport_disconnected) and | ||
294 | (True == client_topology_disconnected) and | ||
295 | (True == client_core_disconnected) and | ||
296 | (True == client_core_session_map) and | ||
297 | (True == client_fs_disconnected)): | ||
298 | disconnected = True | ||
299 | break | ||
300 | print '.' | ||
301 | time.sleep(1) | ||
302 | count += 1 | ||
303 | if (disconnected == False): | ||
304 | print '' | ||
305 | if (client_transport_disconnected == False): | ||
306 | print ('Client transport was NOT disconnected') | ||
307 | if (client_topology_disconnected == False): | ||
308 | print ('Client topology was NOT disconnected') | ||
309 | if (client_core_disconnected == False): | ||
310 | print ('Client core was NOT disconnected') | ||
311 | if (server_core_session_map == False): | ||
312 | print ('Server core sessions did NOT increase') | ||
313 | return False | ||
314 | else: | ||
315 | return True | ||
316 | |||
317 | def check_disconnect_server (): | ||
318 | vprintf ("Shutting down bootstrap server") | ||
319 | try: | ||
320 | server = subprocess.Popen ([gnunetarm, '-eq', '-c', './confs/c_bootstrap_server.conf']) | ||
321 | server.communicate () | ||
322 | except OSError: | ||
323 | print "Can not stop bootstrap server, exiting..." | ||
324 | exit (1) | ||
325 | |||
326 | client_transport_disconnected = False | ||
327 | client_topology_disconnected = False | ||
328 | client_core_disconnected = False | ||
329 | client_core_session_map = False | ||
330 | client_fs_disconnected = False | ||
331 | |||
332 | client2_transport_disconnected = False | ||
333 | client2_topology_disconnected = False | ||
334 | client2_core_disconnected = False | ||
335 | client2_core_session_map = False | ||
336 | client2_fs_disconnected = False | ||
337 | |||
338 | disconnected = False | ||
339 | count = 1 | ||
340 | while ((disconnected == False) and (count <= timeout)): | ||
341 | if ((False == client_transport_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'transport', '# peers connected',1))): | ||
342 | client_transport_disconnected = True | ||
343 | vprintf ('Client transport services is disconnected') | ||
344 | |||
345 | if ((False == client_core_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'core', '# neighbour entries allocated',1))): | ||
346 | client_core_disconnected = True | ||
347 | vprintf ('Client core services is disconnected') | ||
348 | |||
349 | if ((False == client_core_session_map) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'core', '# entries in session map',1))): | ||
350 | client_core_session_map = True | ||
351 | vprintf ('Client core notifies about disconnected') | ||
352 | |||
353 | if ((False == client_topology_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'topology', '# peers connected',1))): | ||
354 | client_topology_disconnected = True | ||
355 | vprintf ('Client topology services is disconnected') | ||
356 | |||
357 | if ((False == client_fs_disconnected) and (True == check_statistics ('./confs/c_no_nat_client.conf', 'fs', '# peers connected',1))): | ||
358 | client_fs_disconnected = True | ||
359 | vprintf ('Client fs services is disconnected') | ||
360 | |||
361 | if ((False == client2_transport_disconnected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'transport', '# peers connected',1))): | ||
362 | client2_transport_disconnected = True | ||
363 | vprintf ('Client2 transport services is disconnected') | ||
364 | |||
365 | if ((False == client2_core_disconnected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'core', '# neighbour entries allocated',1))): | ||
366 | client2_core_disconnected = True | ||
367 | vprintf ('Client2 core services is disconnected') | ||
368 | |||
369 | if ((False == client2_core_session_map) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'core', '# entries in session map',1))): | ||
370 | client2_core_session_map = True | ||
371 | vprintf ('Client2 core notifies about disconnected') | ||
372 | |||
373 | if ((False == client2_topology_disconnected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'topology', '# peers connected',1))): | ||
374 | client2_topology_disconnected = True | ||
375 | vprintf ('Client2 topology services is disconnected') | ||
376 | |||
377 | if ((False == client2_fs_disconnected) and (True == check_statistics ('./confs/c_no_nat_client_2.conf', 'fs', '# peers connected',1))): | ||
378 | client2_fs_disconnected = True | ||
379 | vprintf ('Client2 fs services is disconnected') | ||
380 | |||
381 | |||
382 | # Check if conditions fulfilled | ||
383 | if ((True == client_transport_disconnected) and | ||
384 | (True == client_topology_disconnected) and | ||
385 | (True == client_core_disconnected) and | ||
386 | (True == client_core_session_map) and | ||
387 | (True == client_fs_disconnected) and | ||
388 | (True == client2_transport_disconnected) and | ||
389 | (True == client2_topology_disconnected) and | ||
390 | (True == client2_core_disconnected) and | ||
391 | (True == client2_core_session_map) and | ||
392 | (True == client2_fs_disconnected)): | ||
393 | disconnected = True | ||
394 | #break | ||
395 | print '.' | ||
396 | time.sleep(1) | ||
397 | count += 1 | ||
398 | if (disconnected == False): | ||
399 | print '' | ||
400 | if (client_transport_disconnected == False): | ||
401 | print ('Client transport was NOT disconnected') | ||
402 | if (client_topology_disconnected == False): | ||
403 | print ('Client topology was NOT disconnected') | ||
404 | if (client_core_disconnected == False): | ||
405 | print ('Client core was NOT disconnected') | ||
406 | if (client_core_session_map == False): | ||
407 | print ('Client core sessions did NOT decrease') | ||
408 | if (client2_transport_disconnected == False): | ||
409 | print ('Client2 transport was NOT disconnected') | ||
410 | if (client2_topology_disconnected == False): | ||
411 | print ('Client2 topology was NOT disconnected') | ||
412 | if (client2_core_disconnected == False): | ||
413 | print ('Client2 core was NOT disconnected') | ||
414 | if (client2_core_session_map == False): | ||
415 | print ('Client2 core sessions did NOT decrease') | ||
416 | return False | ||
417 | else: | ||
418 | return True | ||
419 | |||
420 | # | ||
421 | # Test execution | ||
422 | # | ||
423 | |||
424 | vprintf ("Running " + testname) | ||
425 | setup () | ||
426 | start () | ||
427 | |||
428 | ret = check_connect () | ||
429 | if (ret == True): | ||
430 | vprintf ('Peers connected') | ||
431 | if (True == check_disconnect_server ()): | ||
432 | if (True == check_disconnect_client ()): | ||
433 | success = True | ||
434 | |||
435 | stop () | ||
436 | cleanup () | ||
437 | |||
438 | if (success == False): | ||
439 | print ('Test failed') | ||
440 | exit (1) | ||
441 | else: | ||
442 | exit (0) | ||
443 | |||
diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in index 1b9423675..3ded5dd7a 100755 --- a/src/integration-tests/test_integration_disconnect.py.in +++ b/src/integration-tests/test_integration_disconnect.py.in | |||
@@ -261,8 +261,8 @@ def check_disconnect (): | |||
261 | print ('Client topology was NOT disconnected') | 261 | print ('Client topology was NOT disconnected') |
262 | if (client_core_disconnected == False): | 262 | if (client_core_disconnected == False): |
263 | print ('Client core was NOT disconnected') | 263 | print ('Client core was NOT disconnected') |
264 | if (server_core_session_map == False): | 264 | if (client_core_session_map == False): |
265 | print ('Server core sessions did NOT increase') | 265 | print ('Server core sessions did NOT decrease') |
266 | return False | 266 | return False |
267 | else: | 267 | else: |
268 | return True | 268 | return True |