Repository navigation
Fixes #36326: Java ITs for API behaviour only Playwright tested - #36327
Conversation
A user denied a resource no longer finds that asset type in search, explore or the per-type counts, while a ViewBasic-allowed user does, across 11 asset types and table columns.
Replace the put_addEntityCustomAttributes placeholder: define each property type on the entity type, set, replace and clear a value via JSON Patch on /extension, then delete the definition. The same matrix runs on tableColumn through the columns API. CustomPropertyTestSupport.removeProperty called a DELETE endpoint that does not exist and swallowed the 404, so every caller leaked its property; it now removes by JSON Patch on the type.
The async-delete tests were empty placeholders and
delete_restore_entity_200 never restored. Now: async soft and hard
delete return 202 with the job and the job lands (soft-deleted, then
restorable; hard-deleted, gone with include=all), a missing id is 404,
a non-admin is 403, and every soft-deletable type restores to a live
entity. Async delete is enabled for the data-asset ITs whose resource
exposes /async/{id}.
Description, Ownership, Tier and Domain update tasks were only asserted end to end for tables. A parametrised IT now approves each applicable task type on 13 entity types and checks the entity carries the new value.
…terms A rename followed by an in-session tag, owner or description edit keeps the data product's assets on the renamed FQN; tags and glossary terms keep the new name and resolve by the new FQN, across three rename cycles for tags.
Users, then a team, then no owner on the collection: the endpoint's owners follow each change and are marked inherited.
After the parent term moves, exactly the original approval task is open at the new FQN, and none remains once it is approved or rejected; rejection drives the moved term to Rejected.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dd final Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ht-gaps # Conflicts: # openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TaskResourceIT.java
Code Review ✅ Approved 🟢 Low riskJava integration tests add coverage across API behaviors, while the helper fix improves test cleanup without changing production runtime behavior. Adds Java integration tests covering server behaviour currently checked only by Playwright, including search RBAC, custom properties across 16 types, async delete and restore, task resolution, renames, owner inheritance, ingestion bot domain access, and glossary approval after move. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #36326
This adds Java integration tests for server behaviour that today only Playwright E2E tests check, so those Playwright tests can be marked
@migrated-java-itin #36198 and retired. It's test code only; the one non-test fix is in a test-support helper.SearchRbacIT(11 asset types + Table column, Explore browse)Flow/SearchRBAC.spec.tstableColumnviaPUT /columns/name/{fqn}Pages/CustomPropertiesApiContract.spec.ts(17 "removed property value variants")BaseEntityIT:/async/{id}soft and hard (202, then the delete lands), 404, 403 for non-admin, soft-delete then restore; enabled on 18 data-asset ITsPages/Entity.spec.ts/Pages/ServiceEntity.spec.tsTaskEntityTypeResolutionIT: Description / Ownership / Tier / Domain tasks on 13 typesFeatures/Tasks/TaskAllEntities.spec.ts+ the Container / Pipeline / Topic task specsDataProductResourceIT#test_renameThen*,TagResourceIT,GlossaryTermResourceITFeatures/DataProductRenameConsolidation.spec.ts,Features/EntityRenameConsolidation.spec.tsAPICollectionResourceIT#test_ownerInheritedByEndpointsFlow/ApiCollection.spec.tsDomainIsolationIT#test_ingestionBot_readsDomainAssetsAndServicesFlow/IngestionBot.spec.tsGlossaryTermMoveApprovalIT: the single open task follows the moved term, plus rejectionFeatures/Glossary/GlossaryApprovalAfterMove.spec.tsBug fixed in test support:
CustomPropertyTestSupport.removePropertycalled a DELETE endpoint that doesn't exist and swallowed the 404. Its callers (users, teams, data contracts) therefore left custom properties behind on every run.Notes for reviewers
SearchRbacITdiffers from the Playwright test: Playwright's global setup removes the DataConsumer default role from the Organization team. With that role in place, every user can view everything. So the "table-only" user is modelled as a deny on dashboards rather than an allow on tables.extension, skip it.RestoreHierarchyIT#syncRestore_restoresFullHierarchy.Type of change:
High-level design:
Placement rule from the testing strategy: if an assertion is still meaningful without a browser, it belongs in a Java IT. The per-test mapping (Playwright test → IT, with evidence) is kept alongside the migration in #36198.
Tests:
Unit tests
Backend integration tests
I added integration tests in
openmetadata-integration-tests/.Run locally, MySQL + Elasticsearch, parallel lane:
Result: Tests run: 404, Failures: 0, Errors: 0, BUILD SUCCESS.
Not run locally:
BaseEntityITchanged and that makes it the whole IT suite;The merge queue runs both.
python3 .github/scripts/plan_local_java_tests.py --check-branch: the map is complete.mvn spotless:check: clean.Ingestion integration tests
Playwright (UI) tests
@migrated-java-itin Fixes #37220, #37221: Migrate entity, custom-property and advanced-search specs to browser tests; run only affected browser tests #36198, not deleted.UI screen recording:
Not applicable: backend test code only.
Checklist:
Fixes #<issue-number>above.🤖 Generated with Claude Code
The HTTP client cleanup requirement should be satisfied before merging.
Findings
Summary
Adds Java integration coverage for behavior previously checked mainly through Playwright.
Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile