summaryrefslogtreecommitdiff
path: root/tests/publish.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-22 09:50:06 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-22 14:05:59 +0100
commitab2a74e4dbfd396566a8b14223f5849304d4fe6b (patch)
tree69f74204ea1a360e2043740de982851eb2340615 /tests/publish.scm
parent5cd074ea32debac844ce3761f6baa3f63e3d61b2 (diff)
downloadpatches-ab2a74e4dbfd396566a8b14223f5849304d4fe6b.tar
patches-ab2a74e4dbfd396566a8b14223f5849304d4fe6b.tar.gz
publish: The public and private keys are now SRFI-39 parameters.
* guix/scripts/publish.scm (%default-options): Add 'public-key-file' and 'private-key-file'. (lazy-read-file-sexp): Remove. (%private-key, %public-key): Turn into SRFI-39 parameters. (signed-string, render-narinfo): Adjust accordingly. (guix-publish): Honor 'public-key-file' and 'private-key-file' from OPTS. Use 'parameterize'. * guix/pk-crypto.scm (read-file-sexp): New procedure. * tests/publish.scm: Initialize '%public-key' and '%private-key'.
Diffstat (limited to 'tests/publish.scm')
-rw-r--r--tests/publish.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/publish.scm b/tests/publish.scm
index 0fd3b50ecb..c0a0f72d9b 100644
--- a/tests/publish.scm
+++ b/tests/publish.scm
@@ -33,6 +33,7 @@
#:use-module ((guix records) #:select (recutils->alist))
#:use-module ((guix serialization) #:select (restore-file))
#:use-module (guix pk-crypto)
+ #:use-module ((guix pki) #:select (%public-key-file %private-key-file))
#:use-module (guix zlib)
#:use-module (web uri)
#:use-module (web client)
@@ -100,6 +101,10 @@
;; Wait until the two servers are ready.
(wait-until-ready 6789)
+;; Initialize the public/private key SRFI-39 parameters.
+(%public-key (read-file-sexp %public-key-file))
+(%private-key (read-file-sexp %private-key-file))
+
(test-begin "publish")