fix(restapi): Phase 1 blockers — platform/assets leaks, destructive m…#138
Closed
Lenajava1 wants to merge 1 commit into
Closed
fix(restapi): Phase 1 blockers — platform/assets leaks, destructive m…#138Lenajava1 wants to merge 1 commit into
Lenajava1 wants to merge 1 commit into
Conversation
…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>
REST API Test Results265 tests 260 ✅ 20s ⏱️ Results for commit 8da0b02. |
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.
…arker, tautological tests
platform/test_assets.py:
platform/test_misc.py + search/test_search.py:
import timeto top of module (test_misc)platform/test_dynamic_properties.py:
catalog_personalisation/test_personalisation.py:
try: ... except Exception: passwithpytest.raises(HTTPError)→pytest.skipon unsupported endpoint (4 tests: put_assign_product, put_assign_category, put_unassign_product, outlines_sync)assert result is not Noneassertions to structural checks (isinstance dict/list, has totalCount/results).github/workflows/restapi-tests-docker.yml:
and not destructivefilterand not destructive, drop --deselect hack for test_restart_platform (marker now handles it)Results: 259 passed, 5 skipped, 2 destructive deselected.