mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
swh: Adjust 'origin' test.
This is a followup to 3d2f29382d
.
* tests/swh.scm (%origin): Remove "id".
("lookup-origin"): Remove use of 'origin-id'.
This commit is contained in:
parent
10a6b85969
commit
749b958206
1 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -25,8 +25,7 @@ (define-module (test-swh)
|
||||||
;; Test the JSON mapping machinery used in (guix swh).
|
;; Test the JSON mapping machinery used in (guix swh).
|
||||||
|
|
||||||
(define %origin
|
(define %origin
|
||||||
"{ \"id\": 42,
|
"{ \"visits_url\": \"/visits/42\",
|
||||||
\"visits_url\": \"/visits/42\",
|
|
||||||
\"type\": \"git\",
|
\"type\": \"git\",
|
||||||
\"url\": \"http://example.org/guix.git\" }")
|
\"url\": \"http://example.org/guix.git\" }")
|
||||||
|
|
||||||
|
@ -48,11 +47,10 @@ (define-syntax-rule (with-json-result str exp ...)
|
||||||
(test-begin "swh")
|
(test-begin "swh")
|
||||||
|
|
||||||
(test-equal "lookup-origin"
|
(test-equal "lookup-origin"
|
||||||
(list 42 "git" "http://example.org/guix.git")
|
(list "git" "http://example.org/guix.git")
|
||||||
(with-json-result %origin
|
(with-json-result %origin
|
||||||
(let ((origin (lookup-origin "http://example.org/guix.git")))
|
(let ((origin (lookup-origin "http://example.org/guix.git")))
|
||||||
(list (origin-id origin)
|
(list (origin-type origin)
|
||||||
(origin-type origin)
|
|
||||||
(origin-url origin)))))
|
(origin-url origin)))))
|
||||||
|
|
||||||
(test-equal "lookup-origin, not found"
|
(test-equal "lookup-origin, not found"
|
||||||
|
|
Loading…
Reference in a new issue