mengw15 opened a new issue, #7225: URL: https://github.com/apache/texera/issues/7225
### Task Summary `HubResource` (`amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala`, codecov ~0%) has no spec — a jOOQ-backed hub (likes / views / clones / access counts). Add a spec on embedded Postgres via `MockTexeraDB` (see #6714). Only two call-sites touch `LakeFSStorageClient` — scope those out. ### Behavior to add `class HubResourceSpec … with MockTexeraDB`; seed users + a published workflow/dataset in `beforeEach`, `new HubResource()`, cover: - `postLike` / `postUnlike` / `isLiked` / `isLikedHelper` — like then unlike; assert the like row toggles and `isLiked` reflects it. - `postView` / `recordUserAction` / `recordLikeAction` / `recordCloneAction` — assert the action rows are recorded. - `getCount` / `getCounts` / `getTops` — the like/view counts and the top-N listing for seeded data. - `userAccess` — the access decision for a user against a hub entity. - `fetchDashboardWorkflowsByWids` / `fetchDashboardDatasetsByDids` — the batch fetch returns the seeded entities. Out of scope (LakeFS): the clone/dataset-file path that calls `LakeFSStorageClient`. ### 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]
