diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2020-07-25 18:26:18 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2020-07-25 19:11:37 +0200 |
| commit | d51bfe242fbe6f3f8f71d723e8fe0c7bbe711ba1 (patch) | |
| tree | 6d8519ba2ab3e5475ff44dfa3a1c2aa9ec8a50b9 /tests/channels.scm | |
| parent | 252a1926bc7d7aa0b39d89a484c0c1b82e945fcd (diff) | |
Use 'formatted-message' instead of '&message' where appropriate.
* gnu.scm (%try-use-modules): Use 'formatted-message' instead of
'&message'.
* gnu/machine/digital-ocean.scm (maybe-raise-unsupported-configuration-error):
Likewise.
* gnu/machine/ssh.scm (machine-check-file-system-availability): Likewise.
(machine-check-building-for-appropriate-system): Likewise.
(deploy-managed-host): Likewise.
(maybe-raise-unsupported-configuration-error): Likewise.
* gnu/packages.scm (search-patch): Likewise.
* gnu/services.scm (%service-with-default-value): Likewise.
(files->etc-directory): Likewise.
(fold-services): Likewise.
* gnu/system.scm (locale-name->definition*): Likewise.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Likewise.
(check-luks-device): Likewise.
* guix/channels.scm (latest-channel-instance): Likewise.
* guix/cve.scm (json->cve-items): Likewise.
* guix/git-authenticate.scm (commit-signing-key): Likewise.
(commit-authorized-keys): Likewise.
(authenticate-commit): Likewise.
(verify-introductory-commit): Likewise.
* guix/remote.scm (remote-pipe-for-gexp): Likewise.
* guix/scripts/graph.scm (assert-package): Likewise.
* guix/scripts/offload.scm (private-key-from-file*): Likewise.
* guix/ssh.scm (authenticate-server*): Likewise.
(open-ssh-session): Likewise.
(remote-inferior): Likewise.
* guix/ui.scm (matching-generations): Likewise.
* guix/upstream.scm (package-update): Likewise.
* tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"):
Catch 'formatted-message?'.
("authenticate-channel, wrong first commit signer"): Likewise.
* tests/lint.scm ("patches: not found"): Adjust message string.
* tests/packages.scm ("patch not found yields a run-time error"): Catch
'formatted-message?'.
* guix/lint.scm (check-patch-file-names): Handle 'formatted-message?'.
(check-derivation): Ditto.
Diffstat (limited to 'tests/channels.scm')
| -rw-r--r-- | tests/channels.scm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/channels.scm b/tests/channels.scm index 55a0537e0fa..1b6f640c4a5 100644 --- a/tests/channels.scm +++ b/tests/channels.scm | |||
| @@ -27,7 +27,11 @@ | |||
| 27 | #:use-module (guix sets) | 27 | #:use-module (guix sets) |
| 28 | #:use-module (guix gexp) | 28 | #:use-module (guix gexp) |
| 29 | #:use-module ((guix diagnostics) | 29 | #:use-module ((guix diagnostics) |
| 30 | #:select (error-location? error-location location-line)) | 30 | #:select (error-location? |
| 31 | error-location location-line | ||
| 32 | formatted-message? | ||
| 33 | formatted-message-string | ||
| 34 | formatted-message-arguments)) | ||
| 31 | #:use-module ((guix build utils) #:select (which)) | 35 | #:use-module ((guix build utils) #:select (which)) |
| 32 | #:use-module (git) | 36 | #:use-module (git) |
| 33 | #:use-module (guix git) | 37 | #:use-module (guix git) |
| @@ -415,8 +419,8 @@ | |||
| 415 | (channel (channel (url (string-append "file://" directory)) | 419 | (channel (channel (url (string-append "file://" directory)) |
| 416 | (name 'guix)))) | 420 | (name 'guix)))) |
| 417 | 421 | ||
| 418 | (guard (c ((message-condition? c) | 422 | (guard (c ((formatted-message? c) |
| 419 | (->bool (string-contains (condition-message c) | 423 | (->bool (string-contains (formatted-message-string c) |
| 420 | "introduction")))) | 424 | "introduction")))) |
| 421 | (with-store store | 425 | (with-store store |
| 422 | ;; Attempt a downgrade from NEW to OLD. | 426 | ;; Attempt a downgrade from NEW to OLD. |
| @@ -459,9 +463,15 @@ | |||
| 459 | (channel (channel (name 'example) | 463 | (channel (channel (name 'example) |
| 460 | (url (string-append "file://" directory)) | 464 | (url (string-append "file://" directory)) |
| 461 | (introduction intro)))) | 465 | (introduction intro)))) |
| 462 | (guard (c ((message-condition? c) | 466 | (guard (c ((formatted-message? c) |
| 463 | (->bool (string-contains (condition-message c) | 467 | (and (string-contains (formatted-message-string c) |
| 464 | "initial commit")))) | 468 | "initial commit") |
| 469 | (equal? (formatted-message-arguments c) | ||
| 470 | (list | ||
| 471 | (oid->string (commit-id commit1)) | ||
| 472 | (key-fingerprint %ed25519-public-key-file) | ||
| 473 | (key-fingerprint | ||
| 474 | %ed25519bis-public-key-file)))))) | ||
| 465 | (authenticate-channel channel directory | 475 | (authenticate-channel channel directory |
| 466 | (commit-id-string commit2) | 476 | (commit-id-string commit2) |
| 467 | #:keyring-reference-prefix "") | 477 | #:keyring-reference-prefix "") |
