guix_mirror_bot pushed a commit to branch add-tests-for-guix-shell-container
in repository guix.

commit 99b0b7aa1f36f6ede4de495ff3db7e2b87ec8db1
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Fri Nov 14 11:14:00 2025 +0900

    shell: Create cached profile directory once connected to the daemon.
    
    * gnu/tests/base.scm (guix-daemon-test-cases)
    <"containerized guix shell">
    <"containerized guix shell, unprivileged user">: New tests.
    
    Relates-to: guix/guix#126
    Change-Id: I782461c80c254467108c6b8d676d269866795746
---
 gnu/tests/base.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index dc51880d8e..dbb5df5fea 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -1168,6 +1168,21 @@ to supplementary group ~a...~%" other)
                                hello))
                          #$marionette))
 
+
+      ;; Check that guix-daemon is up and running and that the build
+      ;; environment is properly set up (build users, etc.).
+      (test-equal "containerized guix shell"
+        0
+        (marionette-eval
+         '(system "guix shell --no-cwd --bootstrap -C hello -- hello")
+         #$marionette))
+
+      (test-equal "containerized guix shell, unprivileged user"
+        0
+        (marionette-eval
+         '(system "su - user -c 'guix shell --bootstrap -C hello -- hello'")
+         #$marionette))
+
       (test-equal "guix build hello"
         0
         ;; Check that guix-daemon is up and running and that the build

Reply via email to