mengw15 opened a new issue, #7160:
URL: https://github.com/apache/texera/issues/7160

   ### Task Summary
   
   `AdminExecutionResource` 
(`amber/src/main/scala/org/apache/texera/web/resource/dashboard/admin/execution/AdminExecutionResource.scala`,
 codecov ~0%) has no spec — every line is unhit. It is a jOOQ-backed admin 
resource; add a spec backed by embedded Postgres via `MockTexeraDB` (the 
established unit pattern — see #6714). `bun`-free ScalaTest.
   
   ### Behavior to add
   
   Spec shape: `class AdminExecutionResourceSpec extends AnyFlatSpec with 
BeforeAndAfterAll with BeforeAndAfterEach with MockTexeraDB`, `beforeAll { 
initializeDBAndReplaceDSLContext() }`, `beforeEach` builds the DAOs (`new 
UserDao(getDSLContext.configuration())`, workflow/execution DAOs) and `new 
AdminExecutionResource()`; seed rows via DAOs, call the endpoints, assert.
   
   - `mapToName` / `mapToStatus` — pure lookups from id → display name / status 
code; cover known ids and the absent/default case (no DB needed for these two).
   - `getTotalWorkflows` — returns the execution/workflow count; assert it 
reflects the seeded rows (empty → 0, N seeded → N).
   - `listWorkflows` — returns the admin execution listing; seed a couple of 
workflows + executions across users and assert the rows (name, owner, status 
via `mapToStatus`, counts) and ordering/pagination if any.
   
   ### 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]

Reply via email to