summary refs log tree commit diff
path: root/gnu/tests/ssh.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-11-02 22:24:24 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-11-02 22:24:24 +0100
commitb4c22f25468cbb0b1644194381b25c795502bc16 (patch)
tree1f33dfd08b808a8e5c9518c78012b8b80e8d9016 /gnu/tests/ssh.scm
parent5146f22b3b1615ed9d10796a0b1fffdf617138ef (diff)
parent77576be41f3b94c0f47457d338ddbbc8bf870ba9 (diff)
downloadguix-b4c22f25468cbb0b1644194381b25c795502bc16.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/tests/ssh.scm')
-rw-r--r--gnu/tests/ssh.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm
index 41be360355..6abc6c2501 100644
--- a/gnu/tests/ssh.scm
+++ b/gnu/tests/ssh.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -169,6 +170,33 @@ root with an empty password."
                  (call-with-remote-input-file sftp-session witness
                                               read)))))
 
+          ;; Connect to the guest over SSH.  Make sure we can run commands
+          ;; from the system profile.
+          (test-equal "run executables from system profile"
+            #t
+            (call-with-connected-session/auth
+             (lambda (session)
+               (let ((channel (make-channel session)))
+                 (channel-open-session channel)
+                 (channel-request-exec
+                  channel
+                  (string-append
+                   "mkdir -p /root/.guix-profile/bin && "
+                   "touch /root/.guix-profile/bin/path-witness && "
+                   "chmod 755 /root/.guix-profile/bin/path-witness"))
+                 (zero? (channel-get-exit-status channel))))))
+
+          ;; Connect to the guest over SSH.  Make sure we can run commands
+          ;; from the user profile.
+          (test-equal "run executable from user profile"
+            #t
+            (call-with-connected-session/auth
+             (lambda (session)
+               (let ((channel (make-channel session)))
+                 (channel-open-session channel)
+                 (channel-request-exec channel "path-witness")
+                 (zero? (channel-get-exit-status channel))))))
+
           (test-end)
           (exit (= (test-runner-fail-count (test-runner-current)) 0)))))