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 4de223d422..f6bc248c86 100644 --- a/tests/git-authenticate.scm +++ b/tests/git-authenticate.scm @@ -20,7 +20,6 @@ #:use-module (git) #:use-module (guix git) #:use-module (guix git-authenticate) - #:use-module ((guix channels) #:select (openpgp-fingerprint)) #:use-module ((guix diagnostics) #:select (formatted-message? formatted-message-arguments)) #:use-module (guix openpgp) @@ -354,7 +353,7 @@ ;; COMMIT0 is signed with the right key, and COMMIT1 is fine. (authenticate-repository repository (commit-id commit0) - (openpgp-fingerprint fingerprint) + (openpgp-fingerprint->bytevector fingerprint) #:keyring-reference "master" #:cache-key (random-text)))))))) @@ -386,7 +385,7 @@ 'intro-lacks-signature))) (authenticate-repository repository (commit-id commit0) - (openpgp-fingerprint fingerprint) + (openpgp-fingerprint->bytevector fingerprint) #:keyring-reference "master" #:cache-key (random-text))))))))) @@ -426,7 +425,7 @@ 'wrong-intro-signing-key))) (authenticate-repository repository (commit-id commit0) - (openpgp-fingerprint fingerprint) + (openpgp-fingerprint->bytevector fingerprint) #:keyring-reference "master" #:cache-key (random-text))))))))) @@ -469,7 +468,7 @@ 'target-commit-not-a-descendant-of-intro))) (authenticate-repository repository (commit-id commit1) - (openpgp-fingerprint fingerprint) + (openpgp-fingerprint->bytevector fingerprint) #:end (commit-id commit-alt) #:keyring-reference "master" #:cache-key (random-text))))))))) |
