summaryrefslogtreecommitdiff
path: root/tests/channels.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-08-26 18:35:14 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-08-26 18:35:14 +0200
commit17dddeeee560527a8f30d37761949d658056cb09 (patch)
tree15b0b19c55787f556eb9b42c28d173bddc5435db /tests/channels.scm
parent331a09654eb7e9f6212b7e8469077fa7393e8b11 (diff)
parent6a9581741e4ee81226aeb2f1c997df76670a6aab (diff)
downloadguix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar
guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'tests/channels.scm')
-rw-r--r--tests/channels.scm24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/channels.scm b/tests/channels.scm
index cde3b668fb..1b6f640c4a 100644
--- a/tests/channels.scm
+++ b/tests/channels.scm
@@ -26,8 +26,12 @@
#:use-module (guix derivations)
#:use-module (guix sets)
#:use-module (guix gexp)
- #:use-module ((guix utils)
- #:select (error-location? error-location location-line))
+ #:use-module ((guix diagnostics)
+ #:select (error-location?
+ error-location location-line
+ formatted-message?
+ formatted-message-string
+ formatted-message-arguments))
#:use-module ((guix build utils) #:select (which))
#:use-module (git)
#:use-module (guix git)
@@ -415,8 +419,8 @@
(channel (channel (url (string-append "file://" directory))
(name 'guix))))
- (guard (c ((message-condition? c)
- (->bool (string-contains (condition-message c)
+ (guard (c ((formatted-message? c)
+ (->bool (string-contains (formatted-message-string c)
"introduction"))))
(with-store store
;; Attempt a downgrade from NEW to OLD.
@@ -459,9 +463,15 @@
(channel (channel (name 'example)
(url (string-append "file://" directory))
(introduction intro))))
- (guard (c ((message-condition? c)
- (->bool (string-contains (condition-message c)
- "initial commit"))))
+ (guard (c ((formatted-message? c)
+ (and (string-contains (formatted-message-string c)
+ "initial commit")
+ (equal? (formatted-message-arguments c)
+ (list
+ (oid->string (commit-id commit1))
+ (key-fingerprint %ed25519-public-key-file)
+ (key-fingerprint
+ %ed25519bis-public-key-file))))))
(authenticate-channel channel directory
(commit-id-string commit2)
#:keyring-reference-prefix "")