Fix test suite: pad expectations, container pytest config, asyncio markers
CI / lint (push) Failing after 5s
CI / test (push) Successful in 19s

Three unrelated failures from `make test` on the node:

test_metadata_watcher: two tests asserted the old zero-pad tgid_change
contract. Both were off by exactly call_tail_pad_seconds, i.e. the code
was doing what f1de157 intended and the tests encoded the behaviour we
deliberately changed. Updated to expect the pad.

test_pulse: four async tests errored with "async def functions are not
natively supported". Root cause is not the tests - pytest.ini sets
asyncio_mode = auto but the Dockerfile only copies app/ and tests/, so
the container had no pytest config at all and fell back to strict mode.
That is also why these passed in a local venv and failed on the node.
Copy pytest.ini into the image, and add explicit @pytest.mark.asyncio so
the tests hold up regardless of how pytest is configured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Logan Cusano
2026-08-05 00:14:05 -04:00
parent f1de157d69
commit 085fcdf1a1
3 changed files with 16 additions and 4 deletions
+3
View File
@@ -15,5 +15,8 @@ RUN pip install uv && uv pip install --system --no-cache-dir -r requirements.txt
COPY app/ ./app/
COPY tests/ ./tests/
# Without this the container runs pytest with asyncio_mode defaulting to strict,
# so unmarked async tests error out even though they pass locally.
COPY pytest.ini .
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]