summaryrefslogtreecommitdiff
path: root/tests/store.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2021-02-09 15:09:43 -0500
committerLeo Famulari <leo@famulari.name>2021-02-09 15:09:43 -0500
commit388bd35dd0df2d231bc2cce3746d7d5fd15df23a (patch)
tree82e7cc45b8279f83439214c7c79dc7161ffda94d /tests/store.scm
parentf1c7c2f697877fcb68b53ea062ff8a88f274a2fe (diff)
parentd00380b0077b0df2a0b790bb115d07c1533b8863 (diff)
downloadguix-patches-388bd35dd0df2d231bc2cce3746d7d5fd15df23a.tar
guix-patches-388bd35dd0df2d231bc2cce3746d7d5fd15df23a.tar.gz
Merge branch 'master' into staging-next
Diffstat (limited to 'tests/store.scm')
-rw-r--r--tests/store.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/store.scm b/tests/store.scm
index c9a08ac690..cda0e0302f 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -201,6 +201,17 @@
;; (valid-path? %store p1)
;; (member (pk p2) (live-paths %store)))))
+(test-assert "add-indirect-root and find-roots"
+ (call-with-temporary-directory
+ (lambda (directory)
+ (let* ((item (add-text-to-store %store "something" (random-text)))
+ (root (string-append directory "/gc-root")))
+ (symlink item root)
+ (add-indirect-root %store root)
+ (let ((result (member (cons root item) (find-roots %store))))
+ (delete-file root)
+ result)))))
+
(test-assert "permanent root"
(let* ((p (with-store store
(let ((p (add-text-to-store store "random-text"