Secure actor-owned game API routes
This commit is contained in:
@@ -75,12 +75,15 @@ For profile alignment:
|
||||
- Wait for PM2 to report the processes as `online`.
|
||||
|
||||
5) **Verify API <-> daemon**
|
||||
- Call `turnDaemon.status` over tRPC and expect a non-null status.
|
||||
- Exchange a gateway session carrying `superuser`, `admin`, or
|
||||
`admin.profiles.manage[:<profile>]` for a game access token.
|
||||
- Call `turnDaemon.status` with that administrator token and expect a
|
||||
non-null status.
|
||||
- Send a mutation command that expects a result (e.g., `troop.join`) and
|
||||
verify `commandResult` is received.
|
||||
|
||||
6) **Verify realtime events**
|
||||
- Trigger a run via `turnDaemon.run`.
|
||||
- Trigger a run via `turnDaemon.run` with the administrator token.
|
||||
- Subscribe to `sammo:${profileName}:realtime:events` and wait for
|
||||
`turnCompleted`.
|
||||
|
||||
@@ -94,7 +97,9 @@ For profile alignment:
|
||||
Mandatory checks:
|
||||
|
||||
- PM2 reports both processes as online.
|
||||
- `turnDaemon.status` responds within the timeout.
|
||||
- Authenticated profile administration is required for every
|
||||
`turnDaemon.run/pause/resume/status` call.
|
||||
- `turnDaemon.status` responds within the timeout for the administrator token.
|
||||
- A command with `commandResult` returns a success response.
|
||||
- A `turnCompleted` realtime event is observed after a `run` command.
|
||||
|
||||
|
||||
@@ -69,5 +69,5 @@ These are loaded from `.env.ci` and can be overridden per run.
|
||||
- `auth.bootstrapLocal` only works when no users exist; the test resets the DB
|
||||
to satisfy this precondition.
|
||||
- `profiles.installNow` seeds the scenario and auto-creates the admin general.
|
||||
- The test runs turn processing via `turnDaemon.run` and validates founding
|
||||
rules at the third turn.
|
||||
- The test runs turn processing via administrator-authorized
|
||||
`turnDaemon.run` and validates founding rules at the third turn.
|
||||
|
||||
Reference in New Issue
Block a user