mengw15 opened a new pull request, #7231: URL: https://github.com/apache/texera/pull/7231
### What changes were proposed in this PR? Extends the existing `MockTexeraDB`-backed `WorkflowExecutionsResourceSpec` to cover the previously-untested access-controlled execution-metadata endpoints. The result/log-URI and replay paths (`DocumentFactory` / `ReplayLogRecord`) are out of scope per the issue — these tests cover the jOOQ-metadata portion of each endpoint only. 12 added tests (each seeds only what it needs, so they stay order-independent): - `retrieveExecutionsOfWorkflow` — empty list when the user lacks read access; the workflow's executions for an authorized user; a `BadRequestException` for an invalid `status` filter. - `retrieveLatestExecutionEntry` — `ForbiddenException` when the workflow has no executions; the most-recent entry otherwise. - `retrieveInteractionHistory` — empty list when the user lacks read access (the replay branch is out of scope). - `setExecutionAreBookmarked` — `WebApplicationException` for a user without access; the bookmark flag toggles both directions. - `updateWorkflowExecutionsName` — renames the execution. - `groupDeleteExecutionsOfWorkflow` — removes the execution rows (seeded with no URIs so `removeAllExecutionFiles` touches no storage). - `retrieveWorkflowRuntimeStatistics` — `NoSuchElementException` when the execution has no runtime-stats URI (the `DocumentFactory` read is out of scope). Read access is granted by seeding a `WORKFLOW_USER_ACCESS(READ)` row; that row is cleaned up in `cleanupTestData` before the `WORKFLOW` row (FK / leak safety). No production code was changed. ### Any related issues, documentation, discussions? Closes #7226 ### How was this PR tested? Extended unit tests, run locally against embedded Postgres: ``` sbt "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.user.workflow.WorkflowExecutionsResourceSpec" # Tests: succeeded 42, failed 0 (30 existing + 12 new; re-ran for stability) sbt "WorkflowExecutionService/Test/scalafmtCheck" "WorkflowExecutionService/Test/scalafix --check" # clean ``` The failure path was verified by deliberately breaking a new assertion and confirming the suite goes red (41 succeeded, 1 failed), then restored. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8 [1M context]) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
