diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-17 16:14:26 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-12-17 16:14:26 +0000 |
commit | d626dae9f02dd793a0175cbb89d17785caee8cf5 (patch) | |
tree | 7c2ac17f3dd5c6a79a9afdd8250ee0e820d08252 /src/integration-tests | |
parent | aba51a8fe1f22b62ce735a725e2badc4f21b21d0 (diff) | |
download | gnunet-d626dae9f02dd793a0175cbb89d17785caee8cf5.tar.gz gnunet-d626dae9f02dd793a0175cbb89d17785caee8cf5.zip |
clique test
removed unusued confs, tests
Diffstat (limited to 'src/integration-tests')
-rw-r--r-- | src/integration-tests/Makefile.am | 46 | ||||
-rw-r--r-- | src/integration-tests/confs/c_no_nat_client.conf | 1 | ||||
-rw-r--r-- | src/integration-tests/confs/c_no_nat_client_2.conf | 132 | ||||
-rw-r--r-- | src/integration-tests/confs/c_normal_client_tcp.conf | 62 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0004-hostkey | 1 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0005-hostkey | 2 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0006-hostkey | 1 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0007-hostkey | 1 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0008-hostkey | 1 | ||||
-rw-r--r-- | src/integration-tests/hostkeys/0009-hostkey | 1 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_bootstrap_and_connect.py.in | 2 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_clique.py.in | 138 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_disconnect.py.in | 6 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_reconnect.py.in | 2 | ||||
-rwxr-xr-x | src/integration-tests/test_integration_reconnect_nat.py.in | 2 |
15 files changed, 156 insertions, 242 deletions
diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index 87540efa0..8fab9a837 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am | |||
@@ -18,10 +18,8 @@ check_SCRIPTS = \ | |||
18 | test_integration_bootstrap_and_connect.py \ | 18 | test_integration_bootstrap_and_connect.py \ |
19 | test_integration_disconnect.py \ | 19 | test_integration_disconnect.py \ |
20 | test_integration_reconnect.py \ | 20 | test_integration_reconnect.py \ |
21 | test_integration_reconnect_nat.py | 21 | test_integration_reconnect_nat.py \ |
22 | # test_integration_bootstrap_and_connect_and_disconnect.py \ | 22 | test_integration_clique.py |
23 | # test_integration_bootstrap_and_connect_and_disconnect_nat.py \ | ||
24 | # test_integration_clique.py \ | ||
25 | # test_integration_clique_nat.py \ | 23 | # test_integration_clique_nat.py \ |
26 | # test_integration_connect_on_restart.py | 24 | # test_integration_connect_on_restart.py |
27 | endif | 25 | endif |
@@ -64,28 +62,9 @@ test_integration_reconnect_nat.py: test_integration_reconnect_nat.py.in Makefile | |||
64 | $(do_subst) < $(srcdir)/test_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py | 62 | $(do_subst) < $(srcdir)/test_integration_reconnect_nat.py.in > test_integration_reconnect_nat.py |
65 | chmod +x test_integration_reconnect_nat.py | 63 | chmod +x test_integration_reconnect_nat.py |
66 | 64 | ||
67 | 65 | test_integration_clique.py: test_integration_clique.py.in Makefile | |
68 | 66 | $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py | |
69 | 67 | chmod +x test_integration_clique.py | |
70 | #test_integration_bootstrap_and_connect_and_disconnect.py: test_integration_bootstrap_and_connect_and_disconnect.py.in Makefile | ||
71 | # $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect_and_disconnect.py.in > test_integration_bootstrap_and_connect_and_disconnect.py | ||
72 | # chmod +x test_integration_bootstrap_and_connect_and_disconnect.py | ||
73 | |||
74 | #test_integration_bootstrap_and_connect_and_disconnect_nat.py: test_integration_bootstrap_and_connect_and_disconnect_nat.py.in Makefile | ||
75 | # $(do_subst) < $(srcdir)/test_integration_bootstrap_and_connect_and_disconnect_nat.py.in > test_integration_bootstrap_and_connect_and_disconnect_nat.py | ||
76 | # chmod +x test_integration_bootstrap_and_connect_and_disconnect_nat.py | ||
77 | |||
78 | |||
79 | |||
80 | #test_integration_disconnect_nat.py: test_integration_disconnect_nat.py.in Makefile | ||
81 | # $(do_subst) < $(srcdir)/test_integration_disconnect_nat.py.in > test_integration_disconnect_nat.py | ||
82 | # chmod +x test_integration_disconnect_nat.py | ||
83 | |||
84 | |||
85 | |||
86 | #test_integration_clique.py: test_integration_clique.py.in Makefile | ||
87 | # $(do_subst) < $(srcdir)/test_integration_clique.py.in > test_integration_clique.py | ||
88 | # chmod +x test_integration_clique.py | ||
89 | 68 | ||
90 | #test_integration_clique_nat.py: test_integration_clique_nat.py.in Makefile | 69 | #test_integration_clique_nat.py: test_integration_clique_nat.py.in Makefile |
91 | # $(do_subst) < $(srcdir)/test_integration_clique_nat.py.in > test_integration_clique_nat.py | 70 | # $(do_subst) < $(srcdir)/test_integration_clique_nat.py.in > test_integration_clique_nat.py |
@@ -100,13 +79,10 @@ EXTRA_DIST = \ | |||
100 | gnunet_testing.py.in \ | 79 | gnunet_testing.py.in \ |
101 | gnunet_pyexpect.py.in \ | 80 | gnunet_pyexpect.py.in \ |
102 | test_integration_bootstrap_and_connect.py.in \ | 81 | test_integration_bootstrap_and_connect.py.in \ |
103 | test_integration_bootstrap_and_connect_and_disconnect.py.in \ | ||
104 | test_integration_bootstrap_and_connect_and_disconnect_nat.py.in \ | ||
105 | test_integration_connect_on_restart.py.in \ | ||
106 | test_integration_disconnect.py.in \ | 82 | test_integration_disconnect.py.in \ |
107 | test_integration_reconnect.py.in \ | 83 | test_integration_reconnect.py.in \ |
84 | test_integration_reconnect_nat.py.in \ | ||
108 | test_integration_clique.py.in \ | 85 | test_integration_clique.py.in \ |
109 | test_integration_clique_nat.py.in \ | ||
110 | confs/test_defaults.conf \ | 86 | confs/test_defaults.conf \ |
111 | confs/c_bootstrap_server.conf \ | 87 | confs/c_bootstrap_server.conf \ |
112 | confs/c_nat_client.conf \ | 88 | confs/c_nat_client.conf \ |
@@ -115,14 +91,8 @@ EXTRA_DIST = \ | |||
115 | hostkeys/c_bootstrap_server \ | 91 | hostkeys/c_bootstrap_server \ |
116 | hostkeys/c_no_nat_client \ | 92 | hostkeys/c_no_nat_client \ |
117 | hostkeys/c_no_nat_client_2 \ | 93 | hostkeys/c_no_nat_client_2 \ |
118 | hostkeys/c_nat_client \ | 94 | hostkeys/c_nat_client |
119 | hostkeys/0004-hostkey \ | 95 | # test_integration_clique_nat.py.in |
120 | hostkeys/0005-hostkey \ | ||
121 | hostkeys/0006-hostkey \ | ||
122 | hostkeys/0007-hostkey \ | ||
123 | hostkeys/0008-hostkey \ | ||
124 | hostkeys/0009-hostkey | ||
125 | # test_integration_disconnect_nat.py | ||
126 | 96 | ||
127 | CLEANFILES = \ | 97 | CLEANFILES = \ |
128 | $(check_SCRIPTS) \ | 98 | $(check_SCRIPTS) \ |
diff --git a/src/integration-tests/confs/c_no_nat_client.conf b/src/integration-tests/confs/c_no_nat_client.conf index 731331ba3..cb69fa4fe 100644 --- a/src/integration-tests/confs/c_no_nat_client.conf +++ b/src/integration-tests/confs/c_no_nat_client.conf | |||
@@ -82,7 +82,6 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-fs-20 | |||
82 | PORT = 20023 | 82 | PORT = 20023 |
83 | 83 | ||
84 | [vpn] | 84 | [vpn] |
85 | BINARY = gnunet-service-vpn | ||
86 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-vpn-29 | 85 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-vpn-29 |
87 | 86 | ||
88 | [dv] | 87 | [dv] |
diff --git a/src/integration-tests/confs/c_no_nat_client_2.conf b/src/integration-tests/confs/c_no_nat_client_2.conf index b475ff284..9da32fe14 100644 --- a/src/integration-tests/confs/c_no_nat_client_2.conf +++ b/src/integration-tests/confs/c_no_nat_client_2.conf | |||
@@ -1,95 +1,117 @@ | |||
1 | @INLINE@ confs/test_defaults.conf | 1 | @INLINE@ confs/test_defaults.conf |
2 | 2 | ||
3 | [PATHS] | ||
4 | GNUNET_TEST_HOME = /tmp/c_no_nat_client_2/ | ||
5 | |||
6 | [PEER] | ||
7 | PRIVATE_KEY = hostkeys/c_no_nat_client_2 | ||
8 | |||
9 | |||
10 | [transport] | ||
11 | PLUGINS = tcp udp http_client https_client | ||
12 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22 | ||
13 | PORT = 20039 | ||
14 | |||
15 | [transport-tcp] | ||
16 | PORT = 20038 | ||
17 | ADVERTISED_PORT = 20038 | ||
18 | |||
19 | [transport-udp] | ||
20 | PORT = 20027 | ||
21 | BROADCAST_INTERVAL = 30 s | ||
22 | |||
23 | [hostlist] | ||
24 | SERVERS = http://localhost:8080/ | ||
25 | |||
26 | [nat] | ||
27 | BEHIND_NAT = NO | ||
28 | DISABLEV6 = NO | ||
29 | |||
30 | |||
3 | [arm] | 31 | [arm] |
4 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-arm-32 | 32 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-arm-18 |
5 | PORT = 20040 | 33 | PORT = 20022 |
34 | |||
35 | [namestore] | ||
36 | AUTOSTART = YES | ||
6 | 37 | ||
7 | [dns] | 38 | [dns] |
8 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dns-33 | 39 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dns-19 |
40 | |||
41 | [consensus] | ||
42 | AUTOSTART = YES | ||
9 | 43 | ||
10 | [lockmanager] | 44 | [lockmanager] |
11 | AUTOSTART = YES | 45 | AUTOSTART = YES |
12 | 46 | ||
13 | [core] | 47 | [core] |
14 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-core-31 | 48 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-core-17 |
15 | PORT = 20039 | 49 | PORT = 20021 |
16 | 50 | ||
17 | [ats] | 51 | [ats] |
18 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-ats-37 | 52 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-ats-23 |
19 | PORT = 20048 | 53 | WAN_QUOTA_IN = 64 KiB |
54 | WAN_QUOTA_OUT = 64 KiB | ||
55 | PORT = 20030 | ||
20 | 56 | ||
21 | [mesh] | 57 | [mesh] |
22 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-mesh-41 | 58 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-mesh-27 |
23 | PORT = 20052 | 59 | PORT = 20034 |
24 | 60 | ||
25 | [datastore] | 61 | [datastore] |
26 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-datastore-39 | 62 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-datastore-25 |
27 | PORT = 20050 | 63 | PORT = 20032 |
28 | 64 | ||
29 | [resolver] | 65 | [resolver] |
30 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-resolver-42 | 66 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-resolver-28 |
31 | PORT = 20053 | 67 | PORT = 20035 |
32 | 68 | ||
33 | [dht] | 69 | [dht] |
34 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dht-29 | 70 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dht-15 |
35 | PORT = 20036 | 71 | PORT = 20018 |
36 | 72 | ||
37 | [nat] | 73 | [dhtcache] |
38 | BEHIND_NAT = NO | 74 | DATABASE = heap |
75 | QUOTA = 50 MB | ||
39 | 76 | ||
40 | [gnunet-nat-server] | 77 | [gnunet-nat-server] |
41 | PORT = 20038 | 78 | PORT = 20020 |
42 | 79 | ||
43 | [fs] | 80 | [fs] |
44 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-fs-34 | 81 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-fs-20 |
45 | PORT = 20041 | 82 | PORT = 20023 |
46 | |||
47 | [transport] | ||
48 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-36 | ||
49 | PORT = 20047 | ||
50 | |||
51 | [transport-tcp] | ||
52 | PORT = 20046 | ||
53 | ADVERTISED_PORT = 20046 | ||
54 | |||
55 | [transport-udp] | ||
56 | PORT = 20045 | ||
57 | |||
58 | [hostlist] | ||
59 | SERVERS = http://localhost:8080/ | ||
60 | 83 | ||
61 | [vpn] | 84 | [vpn] |
62 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-vpn.sock | 85 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-vpn-29 |
63 | 86 | ||
64 | [dv] | 87 | [dv] |
65 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dv-b_no_nat_c-2 | 88 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dv-b_no_nat_c-1 |
66 | 89 | ||
67 | [peerinfo] | 90 | [peerinfo] |
68 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-peerinfo-38 | 91 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-peerinfo-24 |
69 | PORT = 20049 | 92 | USE_INCLUDED_HELLOS = YES |
93 | PORT = 20031 | ||
70 | 94 | ||
71 | [statistics] | 95 | [statistics] |
72 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-statistics-30 | 96 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-statistics-16 |
73 | PORT = 20037 | 97 | PORT = 20019 |
74 | |||
75 | [PATHS] | ||
76 | GNUNET_TEST_HOME = /tmp/c_no_nat_client_2/ | ||
77 | DEFAULTCONFIG = c_no_nat_client_2.conf | ||
78 | |||
79 | [PEER] | ||
80 | PRIVATE_KEY = hostkeys/c_no_nat_client_2 | ||
81 | 98 | ||
82 | [template] | 99 | [template] |
83 | PORT = 20042 | 100 | PORT = 20024 |
84 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-template-35 | 101 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-template-21 |
85 | 102 | ||
86 | [nse] | 103 | [nse] |
87 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-nse-40 | 104 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-nse-26 |
88 | PORT = 20051 | 105 | UNIX_MATCH_UID = NO |
106 | WORKBITS = 22 | ||
107 | PORT = 20033 | ||
108 | |||
109 | [gns] | ||
110 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-gns-35 | ||
111 | PORT = 20038 | ||
89 | 112 | ||
90 | [transport-http] | 113 | [dv] |
91 | PORT = 20044 | 114 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dv-36 |
115 | PORT = 20039 | ||
92 | 116 | ||
93 | [transport-https] | ||
94 | PORT = 20043 | ||
95 | 117 | ||
diff --git a/src/integration-tests/confs/c_normal_client_tcp.conf b/src/integration-tests/confs/c_normal_client_tcp.conf deleted file mode 100644 index 54d8b050d..000000000 --- a/src/integration-tests/confs/c_normal_client_tcp.conf +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | @INLINE@ confs/test_defaults.conf | ||
2 | |||
3 | [arm] | ||
4 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-arm-46 | ||
5 | PORT = 20058 | ||
6 | |||
7 | [core] | ||
8 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-core-45 | ||
9 | PORT = 20057 | ||
10 | |||
11 | [ats] | ||
12 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-ats-51 | ||
13 | PORT = 20066 | ||
14 | |||
15 | [datastore] | ||
16 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-datastore-53 | ||
17 | PORT = 20068 | ||
18 | |||
19 | [resolver] | ||
20 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-resolver-56 | ||
21 | PORT = 20071 | ||
22 | |||
23 | [dht] | ||
24 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dht-43 | ||
25 | PORT = 20054 | ||
26 | |||
27 | [fs] | ||
28 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-fs-48 | ||
29 | PORT = 20059 | ||
30 | |||
31 | [transport] | ||
32 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-50 | ||
33 | PORT = 20065 | ||
34 | |||
35 | [transport-tcp] | ||
36 | PORT = 0 | ||
37 | ADVERTISED_PORT = 20064 | ||
38 | |||
39 | [transport-udp] | ||
40 | PORT = 0 | ||
41 | |||
42 | [peerinfo] | ||
43 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-peerinfo-52 | ||
44 | USE_INCLUDED_HELLOS = YES | ||
45 | PORT = 20067 | ||
46 | |||
47 | [PATHS] | ||
48 | GNUNET_TEST_HOME = /tmp/c_normal_client | ||
49 | |||
50 | [nse] | ||
51 | UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-nse-54 | ||
52 | PORT = 20069 | ||
53 | |||
54 | [gnunetd] | ||
55 | HOSTKEY = hostkeys/0002-hostkey | ||
56 | |||
57 | [transport-http] | ||
58 | PORT = 0 | ||
59 | |||
60 | [transport-https] | ||
61 | PORT = 0 | ||
62 | |||
diff --git a/src/integration-tests/hostkeys/0004-hostkey b/src/integration-tests/hostkeys/0004-hostkey deleted file mode 100644 index a920fa590..000000000 --- a/src/integration-tests/hostkeys/0004-hostkey +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | gyŒµâ¹è!ŸãÇÑ`aÔh¥XZæ-¡tõà·Ò \ No newline at end of file | ||
diff --git a/src/integration-tests/hostkeys/0005-hostkey b/src/integration-tests/hostkeys/0005-hostkey deleted file mode 100644 index a11af9f8b..000000000 --- a/src/integration-tests/hostkeys/0005-hostkey +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | š¬F…dúéä!¿ö•Öe$r ܯ | ||
2 | ú ˆ($%³iÑ) \ No newline at end of file | ||
diff --git a/src/integration-tests/hostkeys/0006-hostkey b/src/integration-tests/hostkeys/0006-hostkey deleted file mode 100644 index 14344c4f8..000000000 --- a/src/integration-tests/hostkeys/0006-hostkey +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | &ºw•EÚ¿MÕÊ°€ û@*⪬Ð{J!g…Óff \ No newline at end of file | ||
diff --git a/src/integration-tests/hostkeys/0007-hostkey b/src/integration-tests/hostkeys/0007-hostkey deleted file mode 100644 index cd2349dc6..000000000 --- a/src/integration-tests/hostkeys/0007-hostkey +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | ”w¸žÃN^CC¬æXÑ|äÏkIV4´öÔŠ…k‘\™„ \ No newline at end of file | ||
diff --git a/src/integration-tests/hostkeys/0008-hostkey b/src/integration-tests/hostkeys/0008-hostkey deleted file mode 100644 index 4f0dcc273..000000000 --- a/src/integration-tests/hostkeys/0008-hostkey +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | uu0tT!h?.ô01—KÔ1[ÿ:¦}ô$Ž,KçÈ–À \ No newline at end of file | ||
diff --git a/src/integration-tests/hostkeys/0009-hostkey b/src/integration-tests/hostkeys/0009-hostkey deleted file mode 100644 index 756769a2d..000000000 --- a/src/integration-tests/hostkeys/0009-hostkey +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | Íý˜Q§ò"Û?ãÿu’g<GÌ’ÃJݯßh@˜4O€T \ No newline at end of file | ||
diff --git a/src/integration-tests/test_integration_bootstrap_and_connect.py.in b/src/integration-tests/test_integration_bootstrap_and_connect.py.in index cb0359e1f..1ba4c3c59 100755 --- a/src/integration-tests/test_integration_bootstrap_and_connect.py.in +++ b/src/integration-tests/test_integration_bootstrap_and_connect.py.in | |||
@@ -120,7 +120,7 @@ def SigHandler(signum = None, frame = None): | |||
120 | print 'Test was aborted!' | 120 | print 'Test was aborted!' |
121 | if (None != server): | 121 | if (None != server): |
122 | server.stop () | 122 | server.stop () |
123 | if (None != server): | 123 | if (None != client): |
124 | client.stop () | 124 | client.stop () |
125 | cleanup () | 125 | cleanup () |
126 | sys.exit(success) | 126 | sys.exit(success) |
diff --git a/src/integration-tests/test_integration_clique.py.in b/src/integration-tests/test_integration_clique.py.in index 17bd60776..e1856ba2b 100755 --- a/src/integration-tests/test_integration_clique.py.in +++ b/src/integration-tests/test_integration_clique.py.in | |||
@@ -19,12 +19,14 @@ | |||
19 | # | 19 | # |
20 | # | 20 | # |
21 | # | 21 | # |
22 | # This test starts 3 peers and expects bootstrap and a connected clique | 22 | # This test starts 3 peers (nated, server, no nat)and expects bootstrap |
23 | # and a connected clique | ||
23 | # | 24 | # |
24 | # Conditions for successful exit: | 25 | # Conditions for successful exit: |
25 | # Both peers have 1 connected peer in transport, core, topology, fs | 26 | # Both peers have 2 connected peers in transport, core, topology, fs and dht |
26 | 27 | ||
27 | import sys | 28 | import sys |
29 | import signal | ||
28 | import os | 30 | import os |
29 | import subprocess | 31 | import subprocess |
30 | import re | 32 | import re |
@@ -68,7 +70,7 @@ def cleanup (): | |||
68 | if (os.path.exists(path)): | 70 | if (os.path.exists(path)): |
69 | test.p ("Failed to remove " + path) | 71 | test.p ("Failed to remove " + path) |
70 | retries = 10 | 72 | retries = 10 |
71 | path = os.path.join (tmp, "c_no_nat_client_2") | 73 | path = os.path.join (tmp, "c_nat_client") |
72 | test.p ("Removing " + path) | 74 | test.p ("Removing " + path) |
73 | while ((os.path.exists(path)) and (retries > 0)): | 75 | while ((os.path.exists(path)) and (retries > 0)): |
74 | shutil.rmtree ((path), False) | 76 | shutil.rmtree ((path), False) |
@@ -81,65 +83,13 @@ def cleanup (): | |||
81 | def success_cont (check): | 83 | def success_cont (check): |
82 | global success | 84 | global success |
83 | success = True; | 85 | success = True; |
86 | print 'Connected clique successfully' | ||
84 | 87 | ||
85 | def fail_cont (check): | 88 | def fail_cont (check): |
86 | global success | 89 | global success |
87 | success= False; | 90 | success= False; |
88 | check.evaluate(True) | ||
89 | |||
90 | |||
91 | def check_disconnect_client (): | ||
92 | test.p ('Shutting down bootstrap client') | ||
93 | client.stop () | ||
94 | check = Check (test) | ||
95 | |||
96 | check.add (StatisticsCondition (client2, 'transport', '# peers connected',0)) | ||
97 | check.add (StatisticsCondition (client2, 'core', '# neighbour entries allocated',0)) | ||
98 | check.add (StatisticsCondition (client2, 'core', '# peers connected',0)) | ||
99 | check.add (StatisticsCondition (client2, 'topology', '# peers connected',0)) | ||
100 | check.add (StatisticsCondition (client2, 'fs', '# peers connected',0)) | ||
101 | |||
102 | check.run_blocking (check_timeout, success_cont, fail_cont) | ||
103 | |||
104 | |||
105 | def success_disconnect_server_cont (check): | ||
106 | check_disconnect_client () | ||
107 | |||
108 | |||
109 | def fail_disconnect_server_cont (check): | ||
110 | global success | ||
111 | success= False; | ||
112 | check.evaluate(True) | ||
113 | |||
114 | |||
115 | def check_disconnect_server (): | ||
116 | test.p ('Shutting down bootstrap server') | ||
117 | server.stop () | ||
118 | check = Check (test) | ||
119 | check.add (StatisticsCondition (client, 'transport', '# peers connected',1)) | ||
120 | check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',1)) | ||
121 | check.add (StatisticsCondition (client, 'core', '# peers connected',1)) | ||
122 | check.add (StatisticsCondition (client, 'topology', '# peers connected',1)) | ||
123 | check.add (StatisticsCondition (client, 'fs', '# peers connected',1)) | ||
124 | |||
125 | check.add (StatisticsCondition (client2, 'transport', '# peers connected',1)) | ||
126 | check.add (StatisticsCondition (client2, 'core', '# neighbour entries allocated',1)) | ||
127 | check.add (StatisticsCondition (client2, 'core', '# peers connected',1)) | ||
128 | check.add (StatisticsCondition (client2, 'topology', '# peers connected',1)) | ||
129 | check.add (StatisticsCondition (client2, 'fs', '# peers connected',1)) | ||
130 | |||
131 | check.run_blocking (check_timeout, success_disconnect_server_cont, fail_disconnect_server_cont) | ||
132 | |||
133 | |||
134 | def success_connect_cont (check): | ||
135 | check_disconnect_server () | ||
136 | |||
137 | |||
138 | def fail_connect_cont (check): | ||
139 | global success | ||
140 | success= False; | ||
141 | check.evaluate(True) | 91 | check.evaluate(True) |
142 | 92 | print 'Failed to connect clique' | |
143 | 93 | ||
144 | def check_connect (): | 94 | def check_connect (): |
145 | check = Check (test) | 95 | check = Check (test) |
@@ -147,52 +97,96 @@ def check_connect (): | |||
147 | check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',2)) | 97 | check.add (StatisticsCondition (client, 'core', '# neighbour entries allocated',2)) |
148 | check.add (StatisticsCondition (client, 'core', '# peers connected',2)) | 98 | check.add (StatisticsCondition (client, 'core', '# peers connected',2)) |
149 | check.add (StatisticsCondition (client, 'topology', '# peers connected',2)) | 99 | check.add (StatisticsCondition (client, 'topology', '# peers connected',2)) |
100 | check.add (StatisticsCondition (client, 'dht', '# peers connected',2)) | ||
150 | check.add (StatisticsCondition (client, 'fs', '# peers connected',2)) | 101 | check.add (StatisticsCondition (client, 'fs', '# peers connected',2)) |
151 | 102 | ||
152 | check.add (StatisticsCondition (client2, 'transport', '# peers connected',2)) | 103 | check.add (StatisticsCondition (client_nat, 'transport', '# peers connected',2)) |
153 | check.add (StatisticsCondition (client2, 'core', '# neighbour entries allocated',2)) | 104 | check.add (StatisticsCondition (client_nat, 'core', '# neighbour entries allocated',2)) |
154 | check.add (StatisticsCondition (client2, 'core', '# peers connected',2)) | 105 | check.add (StatisticsCondition (client_nat, 'core', '# peers connected',2)) |
155 | check.add (StatisticsCondition (client2, 'topology', '# peers connected',2)) | 106 | check.add (StatisticsCondition (client_nat, 'topology', '# peers connected',2)) |
156 | check.add (StatisticsCondition (client2, 'fs', '# peers connected',2)) | 107 | check.add (StatisticsCondition (client_nat, 'dht', '# peers connected',2)) |
108 | check.add (StatisticsCondition (client_nat, 'fs', '# peers connected',2)) | ||
157 | 109 | ||
158 | check.add (StatisticsCondition (server, 'transport', '# peers connected',2)) | 110 | check.add (StatisticsCondition (server, 'transport', '# peers connected',2)) |
159 | check.add (StatisticsCondition (server, 'core', '# neighbour entries allocated',2)) | 111 | check.add (StatisticsCondition (server, 'core', '# neighbour entries allocated',2)) |
160 | check.add (StatisticsCondition (server, 'core', '# peers connected',2)) | 112 | check.add (StatisticsCondition (server, 'core', '# peers connected',2)) |
161 | check.add (StatisticsCondition (server, 'topology', '# peers connected',2)) | 113 | check.add (StatisticsCondition (server, 'topology', '# peers connected',2)) |
114 | check.add (StatisticsCondition (server, 'dht', '# peers connected',2)) | ||
162 | check.add (StatisticsCondition (server, 'fs', '# peers connected',2)) | 115 | check.add (StatisticsCondition (server, 'fs', '# peers connected',2)) |
163 | 116 | ||
164 | check.run_blocking (check_timeout, success_connect_cont, fail_connect_cont) | 117 | check.run_blocking (check_timeout, success_cont, fail_cont) |
165 | 118 | ||
166 | # | 119 | # |
167 | # Test execution | 120 | # Test execution |
168 | # | 121 | # |
122 | |||
123 | def SigHandler(signum = None, frame = None): | ||
124 | global success | ||
125 | global server | ||
126 | global client | ||
127 | global client_nat | ||
128 | |||
129 | print 'Test was aborted!' | ||
130 | if (None != server): | ||
131 | server.stop () | ||
132 | if (None != client): | ||
133 | client.stop () | ||
134 | if (None != client_nat): | ||
135 | client_nat.stop () | ||
136 | cleanup () | ||
137 | sys.exit(success) | ||
138 | |||
169 | def run (): | 139 | def run (): |
170 | global success | 140 | global success |
171 | global test | 141 | global test |
172 | global server | 142 | global server |
173 | global client | 143 | global client |
174 | global client2 | 144 | global client_nat |
175 | 145 | ||
176 | success = False | 146 | success = False |
177 | test = Test ('test_integration_disconnect', verbose) | 147 | server = None |
148 | client = None | ||
149 | client_nat = None | ||
150 | test = Test ('test_integration_clique', verbose) | ||
178 | cleanup () | 151 | cleanup () |
179 | 152 | ||
180 | server = Peer(test, './confs/c_bootstrap_server.conf'); | 153 | server = Peer(test, './confs/c_bootstrap_server.conf'); |
181 | server.start(); | 154 | if (True != server.start()): |
155 | print 'Failed to start server' | ||
156 | if (None != server): | ||
157 | server.stop () | ||
158 | cleanup () | ||
159 | sys.exit(success) | ||
182 | 160 | ||
183 | client = Peer(test, './confs/c_no_nat_client.conf'); | 161 | client = Peer(test, './confs/c_no_nat_client.conf'); |
184 | client.start(); | 162 | if (True != client.start()): |
163 | print 'Failed to start client' | ||
164 | if (None != server): | ||
165 | server.stop () | ||
166 | if (None != client): | ||
167 | client.stop () | ||
168 | cleanup () | ||
169 | sys.exit(success) | ||
185 | 170 | ||
186 | client2 = Peer(test, './confs/c_no_nat_client_2.conf'); | 171 | client_nat = Peer(test, './confs/c_nat_client.conf'); |
187 | client2.start(); | 172 | if (True != client_nat.start()): |
173 | print 'Failed to start client_nat' | ||
174 | if (None != server): | ||
175 | server.stop () | ||
176 | if (None != client): | ||
177 | client.stop () | ||
178 | if (None != client_nat): | ||
179 | client_nat.stop () | ||
180 | cleanup () | ||
181 | sys.exit(success) | ||
188 | 182 | ||
189 | if ((client.started == True) and (client2.started == True) and (server.started == True)): | 183 | if ((client.started == True) and (client_nat.started == True) and (server.started == True)): |
190 | test.p ('Peers started, running check') | 184 | test.p ('Peers started, running check') |
191 | check_connect () | 185 | check_connect () |
192 | 186 | ||
193 | server.stop () | 187 | server.stop () |
194 | client.stop () | 188 | client.stop () |
195 | client2.stop () | 189 | client_nat.stop () |
196 | 190 | ||
197 | cleanup () | 191 | cleanup () |
198 | 192 | ||
@@ -209,7 +203,7 @@ except (KeyboardInterrupt, SystemExit): | |||
209 | print 'Test interrupted' | 203 | print 'Test interrupted' |
210 | server.stop () | 204 | server.stop () |
211 | client.stop () | 205 | client.stop () |
212 | client2.stop () | 206 | client_nat.stop () |
213 | cleanup () | 207 | cleanup () |
214 | if (success == False): | 208 | if (success == False): |
215 | sys.exit(1) | 209 | sys.exit(1) |
diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in index 1de1cf042..c2d3102c7 100755 --- a/src/integration-tests/test_integration_disconnect.py.in +++ b/src/integration-tests/test_integration_disconnect.py.in | |||
@@ -123,7 +123,7 @@ def SigHandler(signum = None, frame = None): | |||
123 | print 'Test was aborted!' | 123 | print 'Test was aborted!' |
124 | if (None != server): | 124 | if (None != server): |
125 | server.stop () | 125 | server.stop () |
126 | if (None != server): | 126 | if (None != client): |
127 | client.stop () | 127 | client.stop () |
128 | cleanup () | 128 | cleanup () |
129 | sys.exit(success) | 129 | sys.exit(success) |
@@ -151,15 +151,13 @@ def run (): | |||
151 | print 'Failed to start server' | 151 | print 'Failed to start server' |
152 | if (None != server): | 152 | if (None != server): |
153 | server.stop () | 153 | server.stop () |
154 | if (None != server): | ||
155 | client.stop () | ||
156 | cleanup () | 154 | cleanup () |
157 | sys.exit(success) | 155 | sys.exit(success) |
158 | if (True != client.start()): | 156 | if (True != client.start()): |
159 | print 'Failed to start client' | 157 | print 'Failed to start client' |
160 | if (None != server): | 158 | if (None != server): |
161 | server.stop () | 159 | server.stop () |
162 | if (None != server): | 160 | if (None != client): |
163 | client.stop () | 161 | client.stop () |
164 | cleanup () | 162 | cleanup () |
165 | sys.exit(success) | 163 | sys.exit(success) |
diff --git a/src/integration-tests/test_integration_reconnect.py.in b/src/integration-tests/test_integration_reconnect.py.in index 62bd4bd98..b70ac85f2 100755 --- a/src/integration-tests/test_integration_reconnect.py.in +++ b/src/integration-tests/test_integration_reconnect.py.in | |||
@@ -152,7 +152,7 @@ def SigHandler(signum = None, frame = None): | |||
152 | print 'Test was aborted!' | 152 | print 'Test was aborted!' |
153 | if (None != server): | 153 | if (None != server): |
154 | server.stop () | 154 | server.stop () |
155 | if (None != server): | 155 | if (None != client): |
156 | client.stop () | 156 | client.stop () |
157 | cleanup () | 157 | cleanup () |
158 | sys.exit(success) | 158 | sys.exit(success) |
diff --git a/src/integration-tests/test_integration_reconnect_nat.py.in b/src/integration-tests/test_integration_reconnect_nat.py.in index 4f55be463..34c110e72 100755 --- a/src/integration-tests/test_integration_reconnect_nat.py.in +++ b/src/integration-tests/test_integration_reconnect_nat.py.in | |||
@@ -152,7 +152,7 @@ def SigHandler(signum = None, frame = None): | |||
152 | print 'Test was aborted!' | 152 | print 'Test was aborted!' |
153 | if (None != server): | 153 | if (None != server): |
154 | server.stop () | 154 | server.stop () |
155 | if (None != server): | 155 | if (None != client): |
156 | client.stop () | 156 | client.stop () |
157 | cleanup () | 157 | cleanup () |
158 | sys.exit(success) | 158 | sys.exit(success) |