The GitHub Actions job "Benchmarks" 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:
e970abb8eed36c8dc3a6f002ccb846a61287b47e / Meng Wang <[email protected]>
test(amber): extend ProjectAccessResource coverage to read/query and 
grant/revoke (#7222)

### What changes were proposed in this PR?

Extends the existing `MockTexeraDB`-backed `ProjectAccessResourceSpec`
to cover
the read/query and grant/revoke endpoints

(`amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/project/ProjectAccessResource.scala`).
The prior spec only exercised `getProjectAccessPrivilege` /
`userHasWriteAccess`
for the owner/READ/NONE cases. No production code was changed.

A third seeded user (a WRITE grantee) is added; +8 tests cover:

- `getProjectAccessPrivilege` / `userHasWriteAccess` — the WRITE-grantee
case
  (a non-owner with WRITE), which the existing tests didn't reach.
- `getOwner` — returns the owning user's email.
- `getAccessList` — empty when only the owner has access (the owner is
excluded),
and lists every grantee with their email, name and privilege (READ and
WRITE).
- `grantAccess` — a writer grants READ to another user (access row
created), and a
  user without write access is rejected with `ForbiddenException`.
- `revokeAccess` — a grantee's access is removed, and a user without
write access
  is rejected with `ForbiddenException`.

### Any related issues, documentation, discussions?

Closes #7178

### How was this PR tested?

Extended unit tests, run locally against embedded Postgres
(`MockTexeraDB`). All
pass, and the failure path was verified by breaking an assertion to
confirm the
suite goes red:

```
sbt "WorkflowExecutionService/testOnly *ProjectAccessResourceSpec"
# Tests: succeeded 11, failed 0
sbt "WorkflowExecutionService/Test/scalafmtCheck"       # clean
sbt "WorkflowExecutionService/Test/scalafix --check"    # clean
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])

Report URL: https://github.com/apache/texera/actions/runs/30689328664

With regards,
GitHub Actions via GitBox

Reply via email to