Commit Graph
5 Commits
Author SHA1 Message Date
maziggy 07ea69c3f0 test(docker): include gcode_viewer/ in the test image so the packaging assertion actually runs
Dockerfile.test only COPYed backend/ and pyproject.toml, so the
  integration test at tests/integration/test_gcode_viewer.py:63
  silently pytest.skip'd in every Docker run with "gcode_viewer/
  index.html not present at /app/gcode_viewer/index.html".

  That was deliberate fallback behaviour for unit-test environments
  where the assets are intentionally absent, but in CI it meant the
  #1218 packaging regression (3D Preview returning {"detail":"Not
  Found"} because the embedded PrettyGCode viewer wasn't bundled into
  the prod image) had no test guarding against a recurrence — the
  test that was supposed to catch it was the one being skipped.

  Add COPY gcode_viewer/ ./gcode_viewer/ to the backend-test stage,
  matching the path the production Dockerfile uses (static_dir.parent
  / "gcode_viewer" = /app/gcode_viewer/) so the assertion runs against
  the same layout the app sees at runtime. Path-anchored comment in
  the Dockerfile so a future maintainer doesn't strip the COPY as
  unused.
2026-05-24 11:26:14 +02:00
maziggy c3e4506275 Updated Dockerfile.test 2026-04-23 17:01:33 +02:00
maziggy 964be0eb26 Improved Docker tests 2026-02-05 10:28:06 +01:00
maziggy 88bd020dc9 Improved Docker support; Added Docker test suite 2025-12-14 10:16:33 +01:00
maziggy 58c98b1075 Added docker test suite
Test Summary:
  - Build tests: 3 passed (image build, backend imports, static files)
  - Backend unit tests: 378 passed (9 docker tests excluded)
  - Frontend unit tests: 137 passed
  - Integration tests: 9 passed (health, API endpoints, persistence, WebSocket)

  Changes made to fix the Docker test suite:
  1. Added curl to the production Dockerfile for integration tests
  2. Removed deprecated version attribute from docker-compose.test.yml
  3. Added --pull flag to all build commands to ensure fresh images
  4. Added explicit build step before starting integration container
  5. Fixed WebSocket test to accept 200 as a valid response
  6. Excluded docker-marked tests from backend unit test runs (-m "not docker")
2025-12-14 09:15:49 +01:00