<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/swh.scm, branch sysadmin-team</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>swh: ‘lookup-origin-revision’ handles branches pointing to directories.</title>
<updated>2024-03-09T17:55:49+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2024-02-20T15:52:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=ddd455c0dd5a527f3c7e94b8b9056155facb37e6'/>
<id>ddd455c0dd5a527f3c7e94b8b9056155facb37e6</id>
<content type='text'>
Fixes &lt;https://issues.guix.gnu.org/69070&gt;.

* guix/swh.scm (branch-target): Add clause for 'directory and 'alias.
(lookup-origin-revision): Iterate over all the visits of ORIGIN instead
of just the first one.  Handle the case where ‘branch-target’ returns
something other than a release or revision.
* tests/swh.scm ("lookup-origin-revision"): New test.

Change-Id: I7f636739a719908763bca1d3e7376341dd62e816
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://issues.guix.gnu.org/69070&gt;.

* guix/swh.scm (branch-target): Add clause for 'directory and 'alias.
(lookup-origin-revision): Iterate over all the visits of ORIGIN instead
of just the first one.  Handle the case where ‘branch-target’ returns
something other than a release or revision.
* tests/swh.scm ("lookup-origin-revision"): New test.

Change-Id: I7f636739a719908763bca1d3e7376341dd62e816
</pre>
</div>
</content>
</entry>
<entry>
<title>swh: Add bindings for the “ExtID” API.</title>
<updated>2024-02-12T11:03:53+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2024-01-25T21:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=be773bd192466fa7e26938a157c0885adf46139e'/>
<id>be773bd192466fa7e26938a157c0885adf46139e</id>
<content type='text'>
This interface was deployed at archive.softwareheritage.org a few days
ago.  Our main use case will be looking up directories by “nar-sha256”
hashes.

* guix/swh.scm (&lt;external-id&gt;): New JSON-mapped record type.
(lookup-external-id, lookup-directory-by-nar-hash): New procedures.
* tests/swh.scm (%external-id): New variable.
("lookup-directory-by-nar-hash"): New test.

Change-Id: Ib671c7798aeb6f8132ac78f2b06b9285da8e7bd5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This interface was deployed at archive.softwareheritage.org a few days
ago.  Our main use case will be looking up directories by “nar-sha256”
hashes.

* guix/swh.scm (&lt;external-id&gt;): New JSON-mapped record type.
(lookup-external-id, lookup-directory-by-nar-hash): New procedures.
* tests/swh.scm (%external-id): New variable.
("lookup-directory-by-nar-hash"): New test.

Change-Id: Ib671c7798aeb6f8132ac78f2b06b9285da8e7bd5
</pre>
</div>
</content>
</entry>
<entry>
<title>swh: Test proper handling of null visit snapshot URL.</title>
<updated>2021-01-21T10:22:08+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2021-01-21T10:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=5225732b9b54ffa92b9d199246b87dae666a3f77'/>
<id>5225732b9b54ffa92b9d199246b87dae666a3f77</id>
<content type='text'>
* tests/swh.scm (%origin): Change "visits_url" to "origin_visits_url".
(%visits): New variable.
("origin-visit, no snapshots"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/swh.scm (%origin): Change "visits_url" to "origin_visits_url".
(%visits): New variable.
("origin-visit, no snapshots"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix malformed JSON.</title>
<updated>2020-12-21T16:47:35+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-12-21T10:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=9608f4003dedd8dfe99327c15668ca1a43ebd93b'/>
<id>9608f4003dedd8dfe99327c15668ca1a43ebd93b</id>
<content type='text'>
Guile-JSON 4.3.2 would parse in spite of these typos, but 4.4.1 is
stricter.

* tests/swh.scm (%directory-entries): Add missing comma.
* tests/cve-sample.json: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Guile-JSON 4.3.2 would parse in spite of these typos, but 4.4.1 is
stricter.

* tests/swh.scm (%directory-entries): Add missing comma.
* tests/cve-sample.json: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>swh: Adjust 'origin' test.</title>
<updated>2020-02-27T22:29:30+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-02-27T22:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=749b9582061f7d929be83a194040b63b41afec81'/>
<id>749b9582061f7d929be83a194040b63b41afec81</id>
<content type='text'>
This is a followup to 3d2f29382de2d0ee852745cc002dfe2b5d22e1c2.

* tests/swh.scm (%origin): Remove "id".
("lookup-origin"): Remove use of 'origin-id'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to 3d2f29382de2d0ee852745cc002dfe2b5d22e1c2.

* tests/swh.scm (%origin): Remove "id".
("lookup-origin"): Remove use of 'origin-id'.
</pre>
</div>
</content>
</entry>
<entry>
<title>swh: Add hooks for rate limiting handling.</title>
<updated>2019-09-02T13:25:01+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-08-29T13:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=ba1c1853a79a5930ca7db7a6b368859f805df98d'/>
<id>ba1c1853a79a5930ca7db7a6b368859f805df98d</id>
<content type='text'>
* guix/swh.scm (%allow-request?, %save-rate-limit-reset-time)
(%general-rate-limit-reset-time): New variables.
(request-rate-limit-reached?, update-rate-limit-reset-time!): New
procedures.
(call): Call '%allow-request?'.  Change 'swh-error' protocol to pass
METHOD in addition to URL.
* tests/swh.scm ("rate limit reached")
("%allow-request? and request-rate-limit-reached?"): New tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/swh.scm (%allow-request?, %save-rate-limit-reset-time)
(%general-rate-limit-reset-time): New variables.
(request-rate-limit-reached?, update-rate-limit-reset-time!): New
procedures.
(call): Call '%allow-request?'.  Change 'swh-error' protocol to pass
METHOD in addition to URL.
* tests/swh.scm ("rate limit reached")
("%allow-request? and request-rate-limit-reached?"): New tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: 'with-http-server' accepts multiple responses.</title>
<updated>2019-09-02T13:25:01+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-08-29T14:01:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=9323ab550f3bcb75fcaefbb20847595974702d5b'/>
<id>9323ab550f3bcb75fcaefbb20847595974702d5b</id>
<content type='text'>
* guix/tests/http.scm (call-with-http-server): Replace 'code' and 'data'
parameters with 'responses+data'.  Compute RESPONSES as a function of
that.  Remove #:headers parameter.
[http-write]: Quit only when RESPONSES is empty.
[server-body]: Get the response and data from RESPONSES, and set it to
point to the rest.
(with-http-server): Adjust accordingly.
* tests/derivations.scm ("'download' built-in builder")
("'download' built-in builder, invalid hash")
("'download' built-in builder, not found")
("'download' built-in builder, check mode"): Adjust to new
'with-http-server' interface.
* tests/lint.scm ("home-page: 200")
("home-page: 200 but short length")
("home-page: 404", "home-page: 301, invalid"):
("home-page: 301 -&gt; 200", "home-page: 301 -&gt; 404")
("source: 200", "source: 200 but short length")
("source: 404", "source: 404 and 200")
("source: 301 -&gt; 200", "source: 301 -&gt; 404"):
("github-url", github-url): Likewise.
* tests/swh.scm (with-json-result)
("lookup-origin, not found"): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/tests/http.scm (call-with-http-server): Replace 'code' and 'data'
parameters with 'responses+data'.  Compute RESPONSES as a function of
that.  Remove #:headers parameter.
[http-write]: Quit only when RESPONSES is empty.
[server-body]: Get the response and data from RESPONSES, and set it to
point to the rest.
(with-http-server): Adjust accordingly.
* tests/derivations.scm ("'download' built-in builder")
("'download' built-in builder, invalid hash")
("'download' built-in builder, not found")
("'download' built-in builder, check mode"): Adjust to new
'with-http-server' interface.
* tests/lint.scm ("home-page: 200")
("home-page: 200 but short length")
("home-page: 404", "home-page: 301, invalid"):
("home-page: 301 -&gt; 200", "home-page: 301 -&gt; 404")
("source: 200", "source: 200 but short length")
("source: 404", "source: 404 and 200")
("source: 301 -&gt; 200", "source: 301 -&gt; 404"):
("github-url", github-url): Likewise.
* tests/swh.scm (with-json-result)
("lookup-origin, not found"): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>swh: Add basic tests.</title>
<updated>2019-07-22T09:53:39+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-07-20T18:13:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=96f1cbeff84819f9886d15763b4c477cdecd7784'/>
<id>96f1cbeff84819f9886d15763b4c477cdecd7784</id>
<content type='text'>
* guix/swh.scm (%swh-base-url): Turn into a parameter and export it.
* tests/swh.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/swh.scm (%swh-base-url): Turn into a parameter and export it.
* tests/swh.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
</pre>
</div>
</content>
</entry>
</feed>
