FROM rust:1
WORKDIR /workspace
COPY Cargo.toml ./
COPY src ./src
COPY tests ./tests
RUN cargo test --test headscale --no-run
ENV TAILSCALE_SOCKET=/var/run/tailscale/tailscaled.sock
CMD ["cargo", "test", "--test", "headscale", "--", "--ignored", "--nocapture"]