The GitHub Actions job "Required Checks" on texera.git/main has succeeded. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: 6db4a642d0c9eabbc56c2c9a10a61b72da9af064 / Xinyuan Lin <[email protected]> test(file-service): share dataset and model access cases (#9391) ### What changes were proposed in this PR? `DatasetAccessResourceSpec` and `ModelAccessResourceSpec` repeated the same 36 cases line for line; only the resource noun, the helper names, the access table and the seed rows differed. A new abstract suite, `AccessResourceBehaviors`, registers the cases once. Each spec now seeds its own resource and binds the cases to its own helpers (`isDatasetPublic`, `getModelUserAccessPrivilege`, ...) and endpoints, so both APIs stay covered case by case. Explicit grants are seeded, read and cleared through the existing `ResourceTables` descriptors. | Surface | Pinned | | --- | --- | | privilege helpers | public flag, ownership, explicit privilege, read and write access, owner lookup, nonexistent ids | | `grantAccess` | grant, placeholder and unknown-email rejection, re-grant, sharing by a WRITE grantee, owner protection, forbidden callers | | `getAccessList` | empty list, owner row hidden, several grantees, read guard | | `revokeAccess` | revoke, revoking by a WRITE grantee, no-op, owner protection, forbidden callers | | owner email endpoint | owner, READ grantee, private, public and nonexistent resources | The unknown-email case, which only the model spec had, is now shared, since both resources grant through `ResourceAccess.grant`. Each spec runs the same 37 cases, and every existing case keeps its name, order and outcome. ### Any related issues, documentation, discussions? Closes #9390. ### How was this PR tested? - `sbt "FileService/testOnly org.apache.texera.service.resource.DatasetAccessResourceSpec org.apache.texera.service.resource.ModelAccessResourceSpec"`: the 73 existing tests pass on main and on this branch, with the same names in the same order, compared case by case from the JUnit XML reports; the dataset spec's new unknown-email case passes too, for 74 in total. - Mutation check: binding the dataset spec's write-access helper to the read helper fails two of its cases, and granting to an existing email in the shared unknown-email case fails that case in both specs; every other case passes. - `sbt "FileService/Test/scalafmtCheck" "FileService/Test/scalafix --check"` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) Report URL: https://github.com/apache/texera/actions/runs/42929699130 With regards, GitHub Actions via GitBox
