aboutsummaryrefslogtreecommitdiff
path: root/src/integration-tests/test_integration_disconnect.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/integration-tests/test_integration_disconnect.py.in')
-rwxr-xr-xsrc/integration-tests/test_integration_disconnect.py.in65
1 files changed, 41 insertions, 24 deletions
diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in
index 0397fafd2..f708aee1d 100755
--- a/src/integration-tests/test_integration_disconnect.py.in
+++ b/src/integration-tests/test_integration_disconnect.py.in
@@ -43,7 +43,7 @@ from gnunet_testing import *
43#definitions 43#definitions
44 44
45testname = "test_integration_disconnect" 45testname = "test_integration_disconnect"
46verbose = False 46verbose = True
47check_timeout = 30 47check_timeout = 30
48 48
49 49
@@ -112,28 +112,45 @@ def check_connect ():
112# 112#
113# Test execution 113# Test execution
114# 114#
115success = False 115def run ():
116 116 global test
117test = Test ('test_integration_disconnect', verbose) 117 global server
118 118 global client
119server = Peer(test, './confs/c_bootstrap_server.conf'); 119 global success
120server.start();
121
122client = Peer(test, './confs/c_no_nat_client.conf');
123client.start();
124
125
126if ((client.started == True) and (server.started == True)):
127 test.p ('Peers started, running check')
128 check_connect ()
129 120
130server.stop () 121 success = False
131client.stop () 122
132 123 test = Test ('test_integration_disconnect', verbose)
133cleanup () 124
125 server = Peer(test, './confs/c_bootstrap_server.conf');
126 server.start();
127
128 client = Peer(test, './confs/c_no_nat_client.conf');
129 client.start();
130
131
132 if ((client.started == True) and (server.started == True)):
133 test.p ('Peers started, running check')
134 check_connect ()
135
136 server.stop ()
137 client.stop ()
138
139 cleanup ()
140
141 if (success == False):
142 print ('Test failed')
143 return True
144 else:
145 return False
134 146
135if (success == False): 147
136 print ('Test failed') 148try:
137 exit (1) 149 run ()
138else: 150except (KeyboardInterrupt, SystemExit):
139 exit (0) 151 print 'Test interrupted'
152 server.stop ()
153 client.stop ()
154 cleanup ()
155sys.exit(success)
156 \ No newline at end of file