diff options
author | Christopher Baines <mail@cbaines.net> | 2021-07-11 10:44:59 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-07-11 11:57:05 +0100 |
commit | af209170f7b3ea3e1d6539573cc5fc0255239ec5 (patch) | |
tree | 4a19703d7e80184dcd09ef50281e6d050563631e /tests | |
parent | b4188bda9df04231f9dee9956a68daa049a71584 (diff) | |
download | data-service-af209170f7b3ea3e1d6539573cc5fc0255239ec5.tar data-service-af209170f7b3ea3e1d6539573cc5fc0255239ec5.tar.gz |
Track package replacements
Start at least looking for package replacements, and storing the
details (particularly the derivation). I'm looking at doing this so that build
servers using the Guix Data Service can build these derivations.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/model-package.scm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/model-package.scm b/tests/model-package.scm index e953645..a0fdc45 100644 --- a/tests/model-package.scm +++ b/tests/model-package.scm @@ -53,7 +53,8 @@ `(("en_US.UTF-8" . "Fake description"))))) (with-mock-inferior-packages (lambda () - (use-modules (guix-data-service model package) + (use-modules (guix-data-service model utils) + (guix-data-service model package) (guix-data-service model git-repository) (guix-data-service model guix-revision) (guix-data-service model package-metadata)) @@ -71,12 +72,16 @@ conn "" mock-inferior-packages - (test-license-set-ids conn)))) + (test-license-set-ids conn))) + (package-replacement-package-ids + (make-list (length mock-inferior-packages) + (cons "integer" NULL)))) (match (inferior-packages->package-ids conn (zip (map mock-inferior-package-name mock-inferior-packages) (map mock-inferior-package-version mock-inferior-packages) - package-metadata-ids)) + package-metadata-ids + package-replacement-package-ids)) ((x) (number? x)))))) #:always-rollback? #t) @@ -87,18 +92,23 @@ conn "" mock-inferior-packages - (test-license-set-ids conn)))) + (test-license-set-ids conn))) + (package-replacement-package-ids + (make-list (length mock-inferior-packages) + (cons "integer" NULL)))) (test-equal (inferior-packages->package-ids conn (zip (map mock-inferior-package-name mock-inferior-packages) (map mock-inferior-package-version mock-inferior-packages) - package-metadata-ids)) + package-metadata-ids + package-replacement-package-ids)) (inferior-packages->package-ids conn (zip (map mock-inferior-package-name mock-inferior-packages) (map mock-inferior-package-version mock-inferior-packages) - package-metadata-ids))))) + package-metadata-ids + package-replacement-package-ids))))) #:always-rollback? #t)))))) (test-end) |