Skip to content

fix(restapi): Phase 1 blockers — platform/assets leaks, destructive m…#138

Closed
Lenajava1 wants to merge 1 commit into
devfrom
vcst-restapi-phase1-blockers
Closed

fix(restapi): Phase 1 blockers — platform/assets leaks, destructive m…#138
Lenajava1 wants to merge 1 commit into
devfrom
vcst-restapi-phase1-blockers

Conversation

@Lenajava1
Copy link
Copy Markdown
Collaborator

…arker, tautological tests

platform/test_assets.py:

  • wrap 6 tests in try/finally with folder cleanup (test_asset_upload_url/_image/_local, test_asset_file_access, test_asset_file_access_after_delete, test_asset_folder_create, test_asset_folder_delete, test_asset_folder_create_delete_bulk)
  • add module-level _GITHUB_SAMPLE_URL constants and _delete_folder_safe helper
  • replace verify=False with global_settings.verify_ssl on raw requests.get call

platform/test_misc.py + search/test_search.py:

  • add @pytest.mark.destructive to test_restart_platform and test_index_drop
  • register destructive marker in pyproject.toml
  • move import time to top of module (test_misc)

platform/test_dynamic_properties.py:

  • wrap verify/cleanup in try/finally across 3 parametrized test functions so properties are cleaned up even on assertion failure
  • test_dynamic_property_value_types now asserts valueType matches

catalog_personalisation/test_personalisation.py:

  • replace bare try: ... except Exception: pass with pytest.raises(HTTPError)pytest.skip on unsupported endpoint (4 tests: put_assign_product, put_assign_category, put_unassign_product, outlines_sync)
  • tighten tautological assert result is not None assertions to structural checks (isinstance dict/list, has totalCount/results)

.github/workflows/restapi-tests-docker.yml:

  • parallel stage: add and not destructive filter
  • serial stage: add and not destructive, drop --deselect hack for test_restart_platform (marker now handles it)

Results: 259 passed, 5 skipped, 2 destructive deselected.

…arker, tautological tests

platform/test_assets.py:
- wrap 6 tests in try/finally with folder cleanup (test_asset_upload_url/_image/_local, test_asset_file_access, test_asset_file_access_after_delete, test_asset_folder_create, test_asset_folder_delete, test_asset_folder_create_delete_bulk)
- add module-level _GITHUB_SAMPLE_URL constants and _delete_folder_safe helper
- replace verify=False with global_settings.verify_ssl on raw requests.get call

platform/test_misc.py + search/test_search.py:
- add @pytest.mark.destructive to test_restart_platform and test_index_drop
- register destructive marker in pyproject.toml
- move `import time` to top of module (test_misc)

platform/test_dynamic_properties.py:
- wrap verify/cleanup in try/finally across 3 parametrized test functions so properties are cleaned up even on assertion failure
- test_dynamic_property_value_types now asserts valueType matches

catalog_personalisation/test_personalisation.py:
- replace bare `try: ... except Exception: pass` with `pytest.raises(HTTPError)` → `pytest.skip` on unsupported endpoint (4 tests: put_assign_product, put_assign_category, put_unassign_product, outlines_sync)
- tighten tautological `assert result is not None` assertions to structural checks (isinstance dict/list, has totalCount/results)

.github/workflows/restapi-tests-docker.yml:
- parallel stage: add `and not destructive` filter
- serial stage: add `and not destructive`, drop --deselect hack for test_restart_platform (marker now handles it)

Results: 259 passed, 5 skipped, 2 destructive deselected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

REST API Test Results

265 tests   260 ✅  20s ⏱️
  3 suites    5 💤
  3 files      0 ❌

Results for commit 8da0b02.

@Lenajava1 Lenajava1 closed this Apr 17, 2026
@Lenajava1 Lenajava1 deleted the vcst-restapi-phase1-blockers branch April 17, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant