mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
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”.
This commit is contained in:
parent
a0818d0236
commit
917c17c052
1 changed files with 8 additions and 11 deletions
|
@ -24,14 +24,15 @@ (define-module (gnu tests virtualization)
|
|||
#: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 @@ (define %childhurd-os
|
|||
(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 @@ (define run
|
|||
(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)))
|
||||
|
|
Loading…
Reference in a new issue