diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2016-07-15 23:15:48 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2016-07-15 23:15:48 +0300 |
| commit | 68190d6f8b0322d4592aa72118ac666dccb9c5e1 (patch) | |
| tree | 5f9cf43c17deb6de46339cdb8347b19ca6cc0db7 /tests | |
| parent | tests/common.scm (call-with-connected-session): Ensure that session is connected (diff) | |
| download | guile-ssh-68190d6f8b0322d4592aa72118ac666dccb9c5e1.tar.gz | |
tests/dist.scm ("with-ssh"): Simplify the client part
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dist.scm | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/tests/dist.scm b/tests/dist.scm index 2249757..188e390 100644 --- a/tests/dist.scm +++ b/tests/dist.scm @@ -207,22 +207,17 @@ (message-reply-success msg))))))) ;; Client (lambda () - (let ((session (make-session-for-test))) - (session-set! session 'log-verbosity 'functions) + (call-with-connected-session + (lambda (session) + (authenticate-server session) - (let ((result (connect! session))) - (or (equal? result 'ok) - (error "Could not connect to a server" session result))) + (unless (equal? (userauth-none! session) 'success) + (error "Could not authenticate with a server" session)) - (authenticate-server session) - - (or (equal? (userauth-none! session) 'success) - (error "Could not authenticate with a server" session)) - - (let ((n (make-node session #:start-repl-server? #f))) - (= (with-ssh n - (+ 21 21)) - 42)))))) + (let ((n (make-node session #:start-repl-server? #f))) + (= (with-ssh n + (+ 21 21)) + 42))))))) ;;; |
