[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avo
From: |
Maxime Devos |
Subject: |
[bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports, |
Date: |
Thu, 20 Jan 2022 13:59:16 +0100 |
User-agent: |
Evolution 3.38.3-1 |
X-Debbugs-CC: ludo@gnu.org
Hi,
This patch series addresses:
Ludovic Courtès schreef op zo 16-01-2022 om 23:19 [+0100]:
> I think the whole point of having the ‘%github-api’ parameter is that
> it allows us to mock the HTTP server instead of having to override
> bindings such as ‘http-fetch’.
>
> I’d have a slight preference for doing that, similar to what is done
> in tests/cpan.scm for instance. WDYT?
(see <https://issues.guix.gnu.org/53060#3>.)
by extending with-http-server to with-http-server* to allow arbitrary
request handlers and extending with-http-server to allow verifying the
URI of a request.
tests/cpan.scm has been modified to verify the URIs.
tests/import-github.scm and tests/minetest.scm have been modified to
avoid mocking.
Somewhat unrelated, tests/lint.scm, tests/cpan.scm and
tests/challenge.scm have been modified to avoid hard coding ports,
as a follow-up to commit c05ceaf2b650d090cf39a048193505cb4e6bd257:
[...]
Previously, test cases could fail if some process was listening
at a hard-coded port. This patch eliminates most of these
potential failures, by automatically assigning an unbound port.
This should allow for building multiple guix trees in parallel
outside a build container, though this is currently untested.
[...]
After this patch series, there's to my knowledge only one instance of
hardcoded ports remaining, in tests/lint.scm ("home-page: Connection
refused").
This patch series is also available at
https://notabug.org/maximed/guix-gnunet (branch
more-precise-http-tests, commit
f0a0303c17b5aa92493aea5a6d28183421b7cf44).
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,,
Maxime Devos <=
- [bug#53389] [PATCH 1/9] tests: Support arbitrary HTTP request handlers., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 2/9] tests: Generalise %local-url., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 3/9] tests/minetest: Run a HTTP server instead of mocking., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 8/9] tests/cpan: Verify URIs., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 5/9] tests/cpan: Do not hard code a HTTP port., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 6/9] tests/lint: Do not assume the next port is free., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 7/9] tests: Allow checking the URI of a HTTP request., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 9/9] tests/challenge: Do not hard code HTTP ports., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 4/9] tests/import-github: Run a HTTP server instead of mocking., Maxime Devos, 2022/01/20
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Ludovic Courtès, 2022/01/22