- Introduce new unit test targets for Workspace and Sandbox V2 integration in the Makefile, ensuring comprehensive testing of the new features. - Update CI workflows to support MongoDB service for Sandbox V2 tests and improve Docker image handling. - Implement Workspace as a first-class entity, allowing for persistent storage decoupled from container lifecycles. - Enhance the Box struct to manage workspace IDs and update related methods for improved functionality. - Refactor tests to accommodate new Workspace features, ensuring robust testing of the integration. These changes significantly improve the testing framework and functionality of the Sandbox V2, enhancing the overall architecture and user experience.
28 lines
698 B
Docker
28 lines
698 B
Docker
# Sandbox V2 test image — adds test services + VNC desktop on top of v2-base
|
|
FROM yaoapp/sandbox-v2-base:latest
|
|
|
|
USER root
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
nginx \
|
|
python3 \
|
|
python3-pip \
|
|
xvfb \
|
|
x11vnc \
|
|
fluxbox \
|
|
xterm \
|
|
&& pip3 install --break-system-packages websockets websockify \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Test service scripts
|
|
COPY ws-echo.py /opt/test/ws-echo.py
|
|
COPY sse-server.py /opt/test/sse-server.py
|
|
COPY entrypoint.sh /test-entrypoint.sh
|
|
RUN chmod +x /test-entrypoint.sh
|
|
|
|
ENV DISPLAY=:99
|
|
|
|
USER sandbox
|
|
EXPOSE 5900 6080
|
|
ENTRYPOINT ["/usr/bin/tini", "--", "/test-entrypoint.sh"]
|
|
CMD ["sleep", "infinity"]
|