summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorReepca Russelstein <reepca@russelstein.xyz>2026-06-28 23:03:28 -0500
committerLudovic Courtès <ludo@gnu.org>2026-06-30 10:57:49 +0200
commite3062240efe5f7348399759ceb14309936946757 (patch)
treed5949b7567069f881b96c3f9d4b6ee6983f8c8cb /tests
parentbb6f47ea7765d1e5b908f1129a30208c60851a69 (diff)
tests: guix-time-machine: explicitly configure zero trusted channels.
(current-channels) is empty in a regular guix checkout, but 'guix build guix' passes --with-channel-commit=..., which causes it to return the configured guix channel. Consequently (trusted-channels) isn't empty and these tests fail in 'guix build guix'. * tests/guix-time-machine.sh: explicitly create an empty trusted-channels.scm. Change-Id: I4584ee96f49edbad414cae611126679e9000e555 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-time-machine.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/guix-time-machine.sh b/tests/guix-time-machine.sh
index e61232f94fa..6a273fd3935 100644
--- a/tests/guix-time-machine.sh
+++ b/tests/guix-time-machine.sh
@@ -74,11 +74,16 @@ 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 77cat > "$channels_file" <<EOF
79%default-channels 78%default-channels
80EOF 79EOF
81 80
81# Ensure there are zero trusted channels
82mkdir -p "$XDG_CACHE_HOME/dot-config/guix"
83cat > "$XDG_CACHE_HOME/dot-config/guix/trusted-channels.scm" <<EOF
84(list)
85EOF
86
82# Ignore the user's ~/.config/guix/trusted-channels.scm and ensure this 87# Ignore the user's ~/.config/guix/trusted-channels.scm and ensure this
83# command fails. 88# command fails.
84XDG_CONFIG_HOME="$XDG_CACHE_HOME/dot-config" \ 89XDG_CONFIG_HOME="$XDG_CACHE_HOME/dot-config" \
@@ -87,9 +92,8 @@ grep "'guix' is not trusted" "$log_file"
87 92
88if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null 93if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
89then 94then
90 # Ignore the user's ~/.config/guix/trusted-channels.scm. Under 95 # Ignore the user's ~/.config/guix/trusted-channels.scm. We've ensured
91 # ./pre-inst-env zero channels are trusted by default so the following 96 # there are no trusted channels so the following command must fail.
92 # command must fail.
93 XDG_CONFIG_HOME="$XDG_CACHE_HOME/dot-config" \ 97 XDG_CONFIG_HOME="$XDG_CACHE_HOME/dot-config" \
94 guix time-machine \ 98 guix time-machine \
95 -C swh:1:cnt:003e1e0c1b9b358082201332c926ae54e9549002 \ 99 -C swh:1:cnt:003e1e0c1b9b358082201332c926ae54e9549002 \