diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-10-05 22:29:43 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-10-05 23:14:55 +0200 |
commit | 917c17c052beebefa109c4eff3a7b0307460a4c7 (patch) | |
tree | 9493931bdb3002809c2ee5fa753a8dad98222470 /gnu | |
parent | a0818d0236056dae043f9d1997b0c45ee40bbe26 (diff) |
tests: childhurd: Test SSH connection with a non-root user.
* gnu/tests/virtualization.scm (%childhurd-os): Remove ‘services’ and
add ‘users’ to the GNU/Hurd ‘operating-system’ declaration.
(run-childhurd-test)[run-command-over-ssh]: Log in as “test” instead of
“root”.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/tests/virtualization.scm | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index b79164737b..ef4b130334 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm @@ -24,14 +24,15 @@ #:use-module (gnu tests) #:use-module (gnu image) #:use-module (gnu system) + #:use-module (gnu system accounts) #:use-module (gnu system file-systems) #:use-module (gnu system image) #:use-module (gnu system images hurd) + #:use-module ((gnu system shadow) #:select (%base-user-accounts)) #:use-module (gnu system vm) #:use-module (gnu services) #:use-module (gnu services dbus) #:use-module (gnu services networking) - #:use-module (gnu services ssh) #:use-module (gnu services virtualization) #:use-module (gnu packages ssh) #:use-module (gnu packages virtualization) @@ -232,17 +233,13 @@ (service dhcp-client-service-type) (service hurd-vm-service-type (hurd-vm-configuration - ;; Allow root login with an empty password to simplify the test - ;; below. (os (operating-system (inherit %hurd-vm-operating-system) - (services - (modify-services (operating-system-user-services - %hurd-vm-operating-system) - (openssh-service-type - config => (openssh-configuration - (inherit config) - (permit-root-login #t))))))))))) + (users (cons (user-account + (name "test") + (group "users") + (password "")) ;empty password + %base-user-accounts)))))))) (define (run-childhurd-test) (define (import-module? module) @@ -277,7 +274,7 @@ (ice-9 match) (ice-9 textual-ports)) - (let ((session (make-session #:user "root" + (let ((session (make-session #:user "test" #:port 10022 #:host "localhost" #:log-verbosity 'rare))) |