aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-30 23:19:38 +0200
committerLudovic Courtès <ludo@gnu.org>2020-03-31 00:06:36 +0200
commitb9c79cae53f5f828e078ac5aafc2d80fa3204aae (patch)
tree369a0035a140726c2dde1e41ebe2346a2a259cbc
parent1a9a373eb445d21add006a46c18df0da11e52cbe (diff)
downloadguix-b9c79cae53f5f828e078ac5aafc2d80fa3204aae.tar
guix-b9c79cae53f5f828e078ac5aafc2d80fa3204aae.tar.gz
guix package: Add 'transaction-upgrade-entry' test.
* tests/packages.scm ("transaction-upgrade-entry, zero upgrades, equivalent package"): New test.
-rw-r--r--tests/packages.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index c2ec1f2c24..d0befbe45d 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -109,6 +109,19 @@
(manifest-transaction)))))
(manifest-transaction-null? tx)))
+(test-assert "transaction-upgrade-entry, zero upgrades, equivalent package"
+ (let* ((old (dummy-package "foo" (version "1")))
+ (drv (package-derivation %store old))
+ (tx (mock ((gnu packages) find-best-packages-by-name
+ (const (list old)))
+ (transaction-upgrade-entry
+ %store
+ (manifest-entry
+ (inherit (package->manifest-entry old))
+ (item (derivation->output-path drv)))
+ (manifest-transaction)))))
+ (manifest-transaction-null? tx)))
+
(test-assert "transaction-upgrade-entry, one upgrade"
(let* ((old (dummy-package "foo" (version "1")))
(new (dummy-package "foo" (version "2")))