Fix SQLite UUID and server_default incompatibilities in test fixtures #41
Closed
Barcode Betty
wants to merge 1 commits from
betty/fix-sqlite-uuid-server-default into dev
pull from: betty/fix-sqlite-uuid-server-default
merge into: cartsnitch:dev
cartsnitch:main
cartsnitch:dev
cartsnitch:uat
cartsnitch:betty/car-1362-cache-remove-uat
cartsnitch:betty/car-1362-push-unknown-fix
cartsnitch:betty/car-1362-remove-gha-cache-dev
cartsnitch:betty/car-1330-buildpush-registry-token-dev
cartsnitch:betty/car-1330-buildpush-registry-token-uat
cartsnitch:betty/car-1330-dev-ci-fix
cartsnitch:betty/car-1340-uat-ci-fix
cartsnitch:barcode-betty/fix-car-1135-dispose-engine
cartsnitch:betty/car-1132-comprehensive-fix
cartsnitch:promote/car1077-dev-uat
cartsnitch:betty/fix-postgres-pool
cartsnitch:betty/fix-ci-test-failures-v2
cartsnitch:remove-deploy-dev-uat-jobs
cartsnitch:betty/fix-ci-test-failures
cartsnitch:barcode-betty/fix-lint-f402
cartsnitch:betty/fix-email-inbound-token-tests
cartsnitch:barcode-betty/car-1004-fix-ruff-lint
cartsnitch:betty/fix-lint-errors
cartsnitch:fix/cart-995-gitea-registry-migration
cartsnitch:fix-gitea-registry-migration
cartsnitch:betty/car-995-gitea-registry
cartsnitch:betty/car-932-dispose-import-v3
cartsnitch:barcode-betty/car-995-gitea-registry
cartsnitch:betty/car-932-fix-dispose-engine
cartsnitch:betty/car-964-gitea-registry-v2
cartsnitch:barcode-betty/gitea-registry
cartsnitch:barcode-betty/fix-dispose-engine-import
cartsnitch:savannah/fix-ci-uat-trigger
cartsnitch:barcode-betty/fix-ci-uat-trigger
cartsnitch:betty/car-869-gitea-actions-api
cartsnitch:betty/car-723-final-review
cartsnitch:betty/car-723-ci-workflow
cartsnitch:feat/car-723-migrate-api-to-new-repo
Labels
Clear labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
This will not be worked on
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
ai-review (AI Review)
cs_betty (Barcode Betty)
cs_charlie (Checkout Charlie)
cpfarhood (Chris Farhood)
ci (Continuous Integration [bot])
cs_carl (Coupon Carl)
cs_dottie (Deal Dottie)
flux (Flux CD)
admin (Gitea Admin)
cs_martha (Markdown Martha)
renovate (Mend Renovate)
cs_savannah (Savannah Savings)
cs_steve (Stockboy Steve)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cartsnitch/api#41
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "betty/fix-sqlite-uuid-server-default"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes SQLite/PostgreSQL UUID and server_default incompatibilities in test fixtures for CAR-1111.
Changes
tests/conftest.py
tests/test_encrypted_json.py
pyproject.toml
Test Results
tests/test_models.py tests/test_encrypted_json.py: 20 passed
cc @cpfarhood
QA FAIL — 73 failed, 48 passed, 50 errors (pytest --tb=short -q). Acceptance criteria of 0 failures/0 errors not met. Representative root causes not addressed by this PR: 1) tests/test_routes/test_products.py::test_list_products — 404. main.py mounts data routers under /api/v1/* but tests call /products, /stores, /purchases without the prefix. 2) tests/test_routes/test_purchases.py::test_list_purchases — sqlalchemy.exc.IntegrityError: NOT NULL constraint failed: users.id. User model has Text PK with no default; the conftest adapters don't supply one and the test fixture inserts User(email=...) without an id. 3) tests/test_auth/test_auth_endpoints.py — 'str' object has no attribute 'tzinfo' on /auth/me. Session expiry parsing on the auth path. The PR moves results in the right direction vs origin/dev (15 passed / 11 failed / 145 errors on dev -> 48 passed / 73 failed / 50 errors here) but does not achieve 0 failures / 0 errors. Reassigning to engineer for the next iteration. Full breakdown on the linked Paperclip issue.
Closing: superseded by PR #42 (betty/car-1132-comprehensive-fix) which addresses the same SQLite UUID and server_default issues with a more complete implementation for CAR-1132.
Pull request closed