diff options
author | Leo Famulari <leo@famulari.name> | 2021-01-25 15:21:09 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2021-01-25 15:40:55 -0500 |
commit | 68dd78e2e47248b3e1e7ba1807a92a8374b39097 (patch) | |
tree | d38564293f285d688a55b23e8a6424c6b26213b1 /tests/store.scm | |
parent | 8b55544212a90b0276df49596a3d373e5c2e8f5c (diff) | |
parent | 3f0af15131e524891df8c9f013f1be1597fe2d7e (diff) | |
download | guix-patches-68dd78e2e47248b3e1e7ba1807a92a8374b39097.tar guix-patches-68dd78e2e47248b3e1e7ba1807a92a8374b39097.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests/store.scm')
-rw-r--r-- | tests/store.scm | 13 |
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" |