diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-03-01 11:46:10 +0100 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-04-10 14:46:59 +0900 |
| commit | 4cbd5f883d1b05fd518f88e9256261b4229a6896 (patch) | |
| tree | c4935e6410d4645c371d5595ac8ea1c6669a6bcc /tests | |
| parent | 35ee6d0039a1815b763a476b2a00f42dc081423f (diff) | |
guix: openpgp: Refactor openpgp-fingerprint->bytevector.
Both (guix channel) and (guix git-authenticate) use similar procedures.
To refactor the one in (guix git-authenticate), move the procedure
to (guix openpgp).
* guix/channels.scm: Replace autoloaded import
openpgp-public-key-fingerprint with openpgp-fingerprint->bytevector.
(openpgp-fingerprint->bytevector):
Move function definition from here...
* guix/openpgp.scm (openpgp-fingerprint->bytevector): ...to here.
* guix/git-authenticate.scm (read-authorizations):
Use openpgp-fingerprint->bytevector.
* guix/scripts/git/authenticate.scm:
Avoid using the (guix channels) module.
* tests/git-authenticate.scm : Likewise.
Change-Id: Ifd20588fcfaab601990098bd8575ee985e87394a
Reviewed-by: Danny Milosavljevic <dannym@friendly-machines.com>
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/git-authenticate.scm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/git-authenticate.scm b/tests/git-authenticate.scm index 4de223d4224..f6bc248c868 100644 --- a/tests/git-authenticate.scm +++ b/tests/git-authenticate.scm | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | #:use-module (git) | 20 | #:use-module (git) |
| 21 | #:use-module (guix git) | 21 | #:use-module (guix git) |
| 22 | #:use-module (guix git-authenticate) | 22 | #:use-module (guix git-authenticate) |
| 23 | #:use-module ((guix channels) #:select (openpgp-fingerprint)) | ||
| 24 | #:use-module ((guix diagnostics) | 23 | #:use-module ((guix diagnostics) |
| 25 | #:select (formatted-message? formatted-message-arguments)) | 24 | #:select (formatted-message? formatted-message-arguments)) |
| 26 | #:use-module (guix openpgp) | 25 | #:use-module (guix openpgp) |
| @@ -354,7 +353,7 @@ | |||
| 354 | ;; COMMIT0 is signed with the right key, and COMMIT1 is fine. | 353 | ;; COMMIT0 is signed with the right key, and COMMIT1 is fine. |
| 355 | (authenticate-repository repository | 354 | (authenticate-repository repository |
| 356 | (commit-id commit0) | 355 | (commit-id commit0) |
| 357 | (openpgp-fingerprint fingerprint) | 356 | (openpgp-fingerprint->bytevector fingerprint) |
| 358 | #:keyring-reference "master" | 357 | #:keyring-reference "master" |
| 359 | #:cache-key (random-text)))))))) | 358 | #:cache-key (random-text)))))))) |
| 360 | 359 | ||
| @@ -386,7 +385,7 @@ | |||
| 386 | 'intro-lacks-signature))) | 385 | 'intro-lacks-signature))) |
| 387 | (authenticate-repository repository | 386 | (authenticate-repository repository |
| 388 | (commit-id commit0) | 387 | (commit-id commit0) |
| 389 | (openpgp-fingerprint fingerprint) | 388 | (openpgp-fingerprint->bytevector fingerprint) |
| 390 | #:keyring-reference "master" | 389 | #:keyring-reference "master" |
| 391 | #:cache-key (random-text))))))))) | 390 | #:cache-key (random-text))))))))) |
| 392 | 391 | ||
| @@ -426,7 +425,7 @@ | |||
| 426 | 'wrong-intro-signing-key))) | 425 | 'wrong-intro-signing-key))) |
| 427 | (authenticate-repository repository | 426 | (authenticate-repository repository |
| 428 | (commit-id commit0) | 427 | (commit-id commit0) |
| 429 | (openpgp-fingerprint fingerprint) | 428 | (openpgp-fingerprint->bytevector fingerprint) |
| 430 | #:keyring-reference "master" | 429 | #:keyring-reference "master" |
| 431 | #:cache-key (random-text))))))))) | 430 | #:cache-key (random-text))))))))) |
| 432 | 431 | ||
| @@ -469,7 +468,7 @@ | |||
| 469 | 'target-commit-not-a-descendant-of-intro))) | 468 | 'target-commit-not-a-descendant-of-intro))) |
| 470 | (authenticate-repository repository | 469 | (authenticate-repository repository |
| 471 | (commit-id commit1) | 470 | (commit-id commit1) |
| 472 | (openpgp-fingerprint fingerprint) | 471 | (openpgp-fingerprint->bytevector fingerprint) |
| 473 | #:end (commit-id commit-alt) | 472 | #:end (commit-id commit-alt) |
| 474 | #:keyring-reference "master" | 473 | #:keyring-reference "master" |
| 475 | #:cache-key (random-text))))))))) | 474 | #:cache-key (random-text))))))))) |
