# Throwaway sandbox for running the xivo-service bats suite.
#
# The suite executes the REAL bin/xivo-service. That script drives host-level
# tooling (systemctl, iptables, monit, docker-compose) and writes to system
# paths. It must never run on a real host. This image gives it a disposable
# root filesystem where every external command is a logging stub and every
# host path is faked, so the script's control flow can be asserted safely.
FROM debian:trixie-slim

RUN apt-get update \
    && apt-get install -y --no-install-recommends bats \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /work
COPY . /work

ENV BATS_RUN_IN_SANDBOX=1
CMD ["bats", "tests/"]
