- Add new test cases for VNC URL generation and connection in `box_attach_test.go`, ensuring proper functionality of VNC features. - Update the Docker test image to include VNC desktop components, enhancing the testing environment for graphical applications. - Modify the entrypoint script to start a virtual framebuffer and VNC server, allowing for remote desktop access during tests. - Increase the test timeout in the Makefile to accommodate longer-running VNC tests. These changes improve the testing framework for Sandbox V2 by integrating VNC capabilities, facilitating better testing of graphical applications.
28 lines
675 B
Docker
28 lines
675 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 ["/test-entrypoint.sh"]
|
|
CMD ["sleep", "infinity"]
|