Skip to content

fix(#59): local Docker integration test with snapshot comparison#70

Merged
longieirl merged 3 commits intomainfrom
fix/59-docker-integration-local
Mar 26, 2026
Merged

fix(#59): local Docker integration test with snapshot comparison#70
longieirl merged 3 commits intomainfrom
fix/59-docker-integration-local

Conversation

@longieirl
Copy link
Copy Markdown
Owner

Summary

Aligns Docker integration testing with the existing Python integration test — same snapshot file, same logic, local-only.

Changes

  • .gitignore: output_snapshot.json is now gitignored — personal to each developer's input PDFs, never committed. The copy on main is kept as a reference.
  • test_output_snapshot.py: docstring updated to reflect local-only intent (remove 'committed to source control' language).
  • docker_snapshot.py: new standalone script that builds the same snapshot structure as the Python test and either updates the baseline or diffs against it.
  • Makefile: docker-integration target rewired to call docker_snapshot.py. First run: make docker-integration UPDATE=1 to create baseline. Subsequent runs: make docker-integration to validate.

Usage

# Create your local baseline (first time, or after an intentional change):
make docker-integration UPDATE=1

# Validate Docker output matches your baseline:
make docker-integration

# Python equivalent (same snapshot file):
pytest -m integration --snapshot-update  # baseline
pytest -m integration                    # validate

Type

  • Bug fix

Testing

  • Tests pass (coverage ≥ 91%)
  • Manually tested
  • make docker-integration passed locally

Checklist

  • Code follows project style
  • Self-reviewed
  • No new warnings

Adds a local-only Docker integration test that builds the image and runs
the container against input/, asserting non-zero transaction output.
PR template updated to prompt contributors to run it when touching the
pipeline or Docker config.
… comparison

- Gitignore output_snapshot.json — personal to each dev, never committed
- test_output_snapshot.py docstring updated to reflect local-only intent
- make docker-integration now calls docker_snapshot.py for full snapshot
  comparison (same logic as pytest -m integration); UPDATE=1 to baseline
- docker_snapshot.py: standalone script mirroring _build_snapshot() logic
@github-actions github-actions bot added the bug Something isn't working label Mar 26, 2026
@longieirl longieirl self-assigned this Mar 26, 2026
@longieirl longieirl merged commit 2f8ad5f into main Mar 26, 2026
11 checks passed
@longieirl longieirl deleted the fix/59-docker-integration-local branch March 26, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants