summaryrefslogtreecommitdiff
path: root/tests/common.scm
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-07-15 23:08:21 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-07-15 23:08:21 +0300
commitb42a143f044c9944c01baffb638d1576fc1d1c46 (patch)
treed9d46ae18e8b15d8b35a88f1c7a652deb099bc21 /tests/common.scm
parenttests/tunnel.scm: Update copyright dates (diff)
downloadguile-ssh-b42a143f044c9944c01baffb638d1576fc1d1c46.tar.gz
tests/common.scm (call-with-connected-session): Ensure that session is connected
* tests/common.scm (call-with-connected-session): Ensure that session is connected. * tests/tunnel.scm ("make-tunnel"): Improve test case: start server process before testing of the client part.
Diffstat (limited to 'tests/common.scm')
-rw-r--r--tests/common.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/common.scm b/tests/common.scm
index 83318d6..77034ea 100644
--- a/tests/common.scm
+++ b/tests/common.scm
@@ -171,7 +171,10 @@ SSH session object, return the result of the procedure call. The session is
disconnected when the PROC is finished."
(let ((session (make-session-for-test)))
(dynamic-wind
- (lambda () (connect! session))
+ (lambda ()
+ (let ((result (connect! session)))
+ (unless (equal? result 'ok)
+ (error "Could not connect to a server" session result))))
(lambda () (proc session))
(lambda () (disconnect! session)))))