aboutsummaryrefslogtreecommitdiff
path: root/tests/channels.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/channels.scm')
-rw-r--r--tests/channels.scm22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/channels.scm b/tests/channels.scm
index 55a0537e0f..1b6f640c4a 100644
--- a/tests/channels.scm
+++ b/tests/channels.scm
@@ -27,7 +27,11 @@
#:use-module (guix sets)
#:use-module (guix gexp)
#:use-module ((guix diagnostics)
- #:select (error-location? error-location location-line))
+ #: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 "")