aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-08-13 20:42:06 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-08-13 20:42:06 +0200
commit462ad9f56b9665b8d22960acee73ad91f1052c9c (patch)
tree814be463d6d0517e7db9b9e6f15dbc7516955674 /gnu/tests
parent7f5f61ae99321a7a6e08b0100cd428e11ce6a837 (diff)
parent1b1b006afd31c5526f34d157baef492c7dde2e9c (diff)
downloadpatches-462ad9f56b9665b8d22960acee73ad91f1052c9c.tar
patches-462ad9f56b9665b8d22960acee73ad91f1052c9c.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/reconfigure.scm32
1 files changed, 29 insertions, 3 deletions
diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm
index 3a2f0a2e53..fb11e6164e 100644
--- a/gnu/tests/reconfigure.scm
+++ b/gnu/tests/reconfigure.scm
@@ -19,8 +19,10 @@
(define-module (gnu tests reconfigure)
#:use-module (gnu bootloader)
#:use-module (gnu services shepherd)
- #:use-module (gnu system vm)
#:use-module (gnu system)
+ #:use-module (gnu system accounts)
+ #:use-module (gnu system shadow)
+ #:use-module (gnu system vm)
#:use-module (gnu tests)
#:use-module (guix derivations)
#:use-module (guix gexp)
@@ -43,7 +45,13 @@
generation of the system profile."
(define os
(marionette-operating-system
- (simple-operating-system)
+ (operating-system
+ (inherit (simple-operating-system))
+ (users (cons (user-account
+ (name "jakob")
+ (group "users")
+ (home-directory "/home/jakob"))
+ %base-user-accounts)))
#:imported-modules '((gnu services herd)
(guix combinators))))
@@ -84,7 +92,25 @@ generation of the system profile."
(test-equal "script created new generation"
(length (system-generations marionette))
- (1+ (length generations-prior))))
+ (1+ (length generations-prior)))
+
+ (test-assert "script activated the new generation"
+ (and (eqv? 'symlink
+ (marionette-eval
+ '(stat:type (lstat "/run/current-system"))
+ marionette))
+ (string= #$os
+ (marionette-eval
+ '(readlink "/run/current-system")
+ marionette))))
+
+ (test-assert "script activated user accounts"
+ (marionette-eval
+ '(string-contains (call-with-input-file "/etc/passwd"
+ (lambda (port)
+ (get-string-all port)))
+ "jakob")
+ marionette)))
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0)))))