fix(restapi): combined review follow-ups (A+B+C)#141
Merged
Conversation
A — blockers from overall review:
- CI: add new 'Run drop-search-index (destructive)' stage before restart-platform so test_index_drop actually runs (was orphaned by the destructive marker filter)
- CI: register new restapi-index-drop-junit.xml in all summary collection steps
- orders/test_orders.py: fix **overrides: dict -> **overrides: Any type-hint bug
- orders/test_orders.py: replace silent 'unknown-user' fallback with pytest.skip when dataset has no users
B — pattern / assertion tightening:
- orders/test_orders.py: tighten test_order_search (dict+results/totalCount) and test_order_indexed_search_enabled (dict with result boolean)
- orders/test_orders.py + contacts/test_contact.py: remove permissive .get('id') fallback in get_not_found tests; now strictly require 404 or empty body
- platform/test_changelog.py: tighten lastmodifieddate (dict with lastModifiedDate), changelog/search (list), and rewrite test_changelog_verify_log_after_entity_change as a meaningful filter test (ApplicationUser is always tracked; Catalog isn't)
- platform/test_dynamic_properties.py: isinstance dict with results/totalCount
- search/test_search.py + content/test_content.py: replace assert result is not None with structural isinstance checks matching the actual backend response shapes (list vs dict)
- catalog_personalisation/test_personalisation.py: remove duplicate test_tag_settings_get (identical to test_tag_get)
C — coverage:
- platform/test_roles.py: add test_role_assign_to_user — creates user + role, verifies initial login, assigns role via user update, verifies role ID on reload, revokes role, verifies removal
Results: 265 passed, 5 skipped, 2 destructive deselected. Same count as before (-1 dup, +1 new, net 0).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
REST API Test Results272 tests 272 ✅ 24s ⏱️ Results for commit b6bd839. ♻️ This comment has been updated with latest results. |
Root causes uncovered via direct endpoint probes: 1. Personalisation PUT /api/personalization/taggeditem returned 500 because required 'label' field was missing from payload (DB column is NOT NULL). 2. PUT of a second tag assignment for the same entity returned 500 'already exists' because the create-vs-update branching needs the existing row id. 3. /api/seoinfos/batchresolve no longer accepts POST (405) on this backend version; /api/seoinfos/duplicates (GET) is the stable read. 4. /api/platform/security/externalsigninproviders genuinely absent on this platform version (404 on every variant tried); replace with /api/platform/security/currentuser which is functionally more valuable (verifies admin identity + auth round-trip). Fixes: catalog_personalisation/test_personalisation.py: - add _find_tagged_item + _put_tagged_item helpers; the PUT is idempotent — looks up existing row id for the entity and includes it so the same test can run repeatedly - test_tag_put_assign_product/category now real: PUT + search + assert label appears on the row - test_tag_put_unassign_product now real: assign, unassign via tags=[], assert tags==[] - mark all three as serial (they mutate shared personalisation rows for seeded entities) core/test_core.py::test_seo_info_get: - switch from POST /api/seoinfos/batchresolve to GET /api/seoinfos/duplicates?objectType=Catalog&objectId=... - use seed_catalog_id fixture so test works against any seeded catalog - drop HTTPError import (no longer needed) platform/test_authorization.py::test_auth_external_sign_in_providers -> test_auth_current_user: - rename and retarget to GET /api/platform/security/currentuser - assert userName=admin and isAdministrator=true (verifies auth round-trip) Results: 270 passed, 0 skipped, 2 destructive deselected. Up from 265 pass + 5 skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… tests Add pytest-xdist dependency and use -n auto in the CI parallel-safe phase so isolated factory-based tests run across multiple workers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lel-safe tests" This reverts commit 94e66eb.
easyrateco-design
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A — blockers from overall review:
B — pattern / assertion tightening:
C — coverage:
Results: 265 passed, 5 skipped, 2 destructive deselected. Same count as before (-1 dup, +1 new, net 0).