[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53389] [PATCH 9/9] tests/challenge: Do not hard code HTTP ports.
From: |
Maxime Devos |
Subject: |
[bug#53389] [PATCH 9/9] tests/challenge: Do not hard code HTTP ports. |
Date: |
Thu, 20 Jan 2022 13:08:49 +0000 |
This is a follow-up to commit 4aea90b1876179aab8d603a42533a6bdf97ccd3c.
* tests/challenge.scm (call-mismatch-test): Set %http-server-port to 0 instead
of 9001. Remove the first parametrisation of %http-server-port as it was
unnecessary. Adjust calls to %local-url to use the right port number.
---
tests/challenge.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/challenge.scm b/tests/challenge.scm
index c9de33ed34..2807b4fa00 100644
--- a/tests/challenge.scm
+++ b/tests/challenge.scm
@@ -198,16 +198,16 @@ value."
(nar2 -> (call-with-bytevector-output-port
(lambda (port)
(write-file out2 port)))))
- (parameterize ((%http-server-port 9000))
- (with-http-server/keep-lingering
- `((200 ,(make-narinfo item size1 hash1))
- (200 ,nar1))
- (parameterize ((%http-server-port 9001))
+ (with-http-server/keep-lingering
+ `((200 ,(make-narinfo item size1 hash1))
+ (200 ,nar1))
+ (let ((port1 (%http-server-port)))
+ (parameterize ((%http-server-port 0))
(with-http-server/keep-lingering
`((200 ,(make-narinfo item size2 hash2))
(200 ,nar2))
- (mlet* %store-monad ((urls -> (list (%local-url 9000)
- (%local-url 9001)))
+ (mlet* %store-monad ((urls -> (list (%local-url port1)
+ (%local-url)))
(reports (compare-contents (list item)
urls)))
(return (proc (car reports))))))))))))
--
2.30.2
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Maxime Devos, 2022/01/20
- [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 <=
- [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
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Maxime Devos, 2022/01/22
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Ludovic Courtès, 2022/01/25
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Maxime Devos, 2022/01/25
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Maxime Devos, 2022/01/22
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Maxime Devos, 2022/01/22
- [bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Maxime Devos, 2022/01/22
- [bug#53389] [PATCH 1/9] tests: Support arbitrary HTTP request handlers., Maxime Devos, 2022/01/22
[bug#53389] [PATCH 0/9] Replace some mocking with with-http-server*, avoid hardcoding ports,, Ludovic Courtès, 2022/01/20