Adapt some license related code to work without mock in the tests

With Guile 3, there's a potential for mock to work in even fewer
circumstances. So, adapt the code to enable writing the tests without mock.
This commit is contained in:
Christopher Baines 2020-02-24 21:35:44 +00:00
parent ce10833459
commit 2f41fe79be
7 changed files with 88 additions and 92 deletions

View file

@ -45,6 +45,7 @@
#:use-module (guix-data-service model guix-revision)
#:use-module (guix-data-service model package-derivation)
#:use-module (guix-data-service model guix-revision-package-derivation)
#:use-module (guix-data-service model license)
#:use-module (guix-data-service model license-set)
#:use-module (guix-data-service model lint-checker)
#:use-module (guix-data-service model lint-warning)
@ -626,8 +627,11 @@ WHERE job_id = $1"
(define (insert-packages conn inf packages)
(let* ((package-license-set-ids
(with-time-logging "fetching inferior package license metadata"
(inferior-packages->license-set-ids conn inf
packages)))
(inferior-packages->license-set-ids
conn
(inferior-packages->license-id-lists
conn
(inferior-packages->license-data inf packages)))))
(packages-metadata-ids
(with-time-logging "fetching inferior package metadata"
(inferior-packages->package-metadata-ids