Files
node-26/drb-edge-node/Dockerfile
T
Logan Cusano 085fcdf1a1
CI / lint (push) Failing after 5s
CI / test (push) Successful in 19s
Fix test suite: pad expectations, container pytest config, asyncio markers
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>
2026-08-05 00:14:05 -04:00

23 lines
593 B
Docker

FROM python:3.14-slim
RUN apt-get update && apt-get install -y \
ffmpeg \
libopus0 \
libopus-dev \
libpulse0 \
pulseaudio-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
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"]