mengw15 opened a new issue, #7161: URL: https://github.com/apache/texera/issues/7161
### Task Summary `WorkflowVersionResource` (`amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowVersionResource.scala`, codecov ~26%) already has a `WorkflowVersionResourceSpec` wired on `MockTexeraDB` (embedded Postgres), but most endpoints are untested. Extend that spec to cover the remaining methods. ### Behavior to add In the existing `MockTexeraDB`-backed spec (`initializeDBAndReplaceDSLContext()`, DAOs in `beforeEach`), seed a workflow + a couple of versions and cover: - Pure version-diff logic: `applyPatch` (apply a stored delta to a base content) and `isSnapshotInRangeUnimportant` — assert the reconstructed content / the range decision for representative inputs (no DB needed for these). - `insertVersion` / `insertNewVersion` — persist a version and assert it is retrievable; cover the "content unchanged → no new version" branch. - `retrieveVersionsOfWorkflow` / `retrieveWorkflowVersion` / `getLatestVersion` — assert the list, a single version, and the latest for the seeded workflow. - `fetchSubsequentVersions` — assert the versions after a given one. - `cloneVersion` — assert a clone is created from an existing version. ### Task Type - [ ] Refactor / Cleanup - [ ] DevOps / Deployment / CI - [x] Testing / QA - [ ] Documentation - [ ] Performance - [ ] Other -- 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]
