summaryrefslogtreecommitdiff
path: root/tests/channels.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-05-20 17:57:54 +0200
committerLudovic Courtès <ludo@gnu.org>2020-05-25 00:00:28 +0200
commit8d1d56578aa95118650ed2197bfb7fac40f4218a (patch)
treed2d27f204da98f3f4fc43a757ca910e724acab81 /tests/channels.scm
parent9b049de84ed101e2c0a5d071e76f424b3bc46bd9 (diff)
git: 'update-cached-checkout' returns the commit relation.
* guix/git.scm (update-cached-checkout): Add #:starting-commit parameter. Call 'commit-relation' when #:starting-commit is true. Always return the relation or #f as the third value. (latest-repository-commit): Adjust accordingly. * guix/import/opam.scm (get-opam-repository): Likewise. * tests/channels.scm ("latest-channel-instances includes channel dependencies") ("latest-channel-instances excludes duplicate channel dependencies"): Update mock of 'update-cached-checkout' accordingly.
Diffstat (limited to 'tests/channels.scm')
-rw-r--r--tests/channels.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/channels.scm b/tests/channels.scm
index 910088ba157..3578b57204c 100644
--- a/tests/channels.scm
+++ b/tests/channels.scm
@@ -136,11 +136,11 @@
136 (url "test"))) 136 (url "test")))
137 (test-dir (channel-instance-checkout instance--simple))) 137 (test-dir (channel-instance-checkout instance--simple)))
138 (mock ((guix git) update-cached-checkout 138 (mock ((guix git) update-cached-checkout
139 (lambda* (url #:key ref) 139 (lambda* (url #:key ref starting-commit)
140 (match url 140 (match url
141 ("test" (values test-dir "caf3cabba9e")) 141 ("test" (values test-dir "caf3cabba9e" #f))
142 (_ (values (channel-instance-checkout instance--no-deps) 142 (_ (values (channel-instance-checkout instance--no-deps)
143 "abcde1234"))))) 143 "abcde1234" #f)))))
144 (with-store store 144 (with-store store
145 (let ((instances (latest-channel-instances store (list channel)))) 145 (let ((instances (latest-channel-instances store (list channel))))
146 (and (eq? 2 (length instances)) 146 (and (eq? 2 (length instances))
@@ -155,11 +155,11 @@
155 (url "test"))) 155 (url "test")))
156 (test-dir (channel-instance-checkout instance--with-dupes))) 156 (test-dir (channel-instance-checkout instance--with-dupes)))
157 (mock ((guix git) update-cached-checkout 157 (mock ((guix git) update-cached-checkout
158 (lambda* (url #:key ref) 158 (lambda* (url #:key ref starting-commit)
159 (match url 159 (match url
160 ("test" (values test-dir "caf3cabba9e")) 160 ("test" (values test-dir "caf3cabba9e" #f))
161 (_ (values (channel-instance-checkout instance--no-deps) 161 (_ (values (channel-instance-checkout instance--no-deps)
162 "abcde1234"))))) 162 "abcde1234" #f)))))
163 (with-store store 163 (with-store store
164 (let ((instances (latest-channel-instances store (list channel)))) 164 (let ((instances (latest-channel-instances store (list channel))))
165 (and (= 2 (length instances)) 165 (and (= 2 (length instances))