fix: resolve 3 in-container test failures in CI compose run
1. REST 404 "Unknown host: prosody": the tester reaches prosody by service name (http://prosody:5280), so aiohttp sends Host: prosody, which Prosody rejects as an unknown vhost. The auto host-header heuristic only overrides for IP/localhost. Set REST_HOST_HEADER= example.com explicitly in the tester env so HTTP routing lands on the example.com VirtualHost that serves mod_http_rest /rest. 2. healthcheck.sh not found: the static test_04_infra checks resolve ../config/healthcheck.sh (= /config/healthcheck.sh) but the tester image only ships /tests. Mount ./config:/config:ro so the path resolves inside the container. 3. telnet non-loopback banner: read only 256 bytes, capturing just the ASCII-art top and never the literal "Prosody" text. Bump to 1024 to match test_04_infra.test_telnet_banner, which passes with the larger read. Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
This commit is contained in:
@@ -98,8 +98,17 @@ services:
|
||||
PG_PASSWORD: prosody
|
||||
PG_DB: prosody
|
||||
MOCK_URL: http://mocks:8080 # for side-effect assertions
|
||||
# The tester reaches prosody directly by service name (http://prosody:5280),
|
||||
# so aiohttp sends Host: prosody — which Prosody rejects as an unknown
|
||||
# vhost (404 "Unknown host"). Send the real XMPP domain so HTTP routing
|
||||
# lands on the example.com VirtualHost that serves mod_http_rest /rest.
|
||||
REST_HOST_HEADER: example.com
|
||||
volumes:
|
||||
- ./tests:/tests
|
||||
# Surface the repo config/ dir so static tests (test_04_infra
|
||||
# healthcheck source checks) can resolve ../config/healthcheck.sh
|
||||
# from inside the container.
|
||||
- ./config:/config:ro
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
@@ -163,7 +163,7 @@ class TestAdminTelnetNonLoopback:
|
||||
reader, writer = await asyncio.wait_for(
|
||||
asyncio.open_connection(host, port), timeout=5
|
||||
)
|
||||
data = await asyncio.wait_for(reader.read(256), timeout=5)
|
||||
data = await asyncio.wait_for(reader.read(1024), timeout=5)
|
||||
writer.close()
|
||||
await writer.wait_closed()
|
||||
except (OSError, asyncio.TimeoutError) as e:
|
||||
|
||||
Reference in New Issue
Block a user