summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-05-04 17:54:36 +0200
committerLudovic Courtès <ludo@gnu.org>2026-05-10 17:01:08 +0200
commitc9dcd203e5356f13b736d5be121fd61874be1a93 (patch)
tree7a581b4e6871e2db834c7d3ed558b8024a4b2247 /tests
parentf13901f6cbd663019090963664ace72345165461 (diff)
pull, time-machine: ‘--allow-untrusted-channels’ takes an argument.
* guix/scripts/pull.scm (%default-options): Change ‘require-trusted-channels?’ to ‘require-trusted-channels’. (show-help, %options): Support optional argument to ‘--allow-untrusted-channels’. (channel-list): Adjust accordingly. * guix/scripts/time-machine.scm (show-help, %options) (%default-options): Likewise. * tests/guix-time-machine.sh: Add test. * doc/guix.texi (Invoking guix pull) (Invoking guix time-machine): Adjust accordingly. Suggested-by: Reepca Russelstein <reepca@russelstein.xyz> Change-Id: I342ebbcc7355953487a5c6c8ac85048943a5ac46 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-time-machine.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/guix-time-machine.sh b/tests/guix-time-machine.sh
index 262e3d5fef8..e61232f94fa 100644
--- a/tests/guix-time-machine.sh
+++ b/tests/guix-time-machine.sh
@@ -74,6 +74,17 @@ cat > "$channels_file" <<EOF
74EOF 74EOF
75guix repl -- "$channels_file" 75guix repl -- "$channels_file"
76 76
77# Under 'pre-inst-env', there are zero trusted channels by default.
78cat > "$channels_file" <<EOF
79%default-channels
80EOF
81
82# Ignore the user's ~/.config/guix/trusted-channels.scm and ensure this
83# command fails.
84XDG_CONFIG_HOME="$XDG_CACHE_HOME/dot-config" \
85guix time-machine -C "$channels_file" --allow-untrusted-channels=no 2> "$log_file" && false
86grep "'guix' is not trusted" "$log_file"
87
77if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null 88if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
78then 89then
79 # Ignore the user's ~/.config/guix/trusted-channels.scm. Under 90 # Ignore the user's ~/.config/guix/trusted-channels.scm. Under