mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-21 22:49:50 +02:00
A finished session says why it ended; bash <(curl …) -u updates a host (#413)
- **Sessions (#412):** `end_reason` and `time_claimed`, with migration `0026_session_end_reason` (two nullable columns, readable by the release it replaces). `POST /session/:id/state` takes an optional `endReason`, and a run stopped before it went live can now go from `starting` to `ended`. - **Installer (#411):** - `bash <(curl -fsSL https://api.nestri.io/install.sh) -u` updates a host; `-h` prints help; a plain token installs. - When the script is not root, it asks sudo itself. - The installed host agent version is unchanged (0.2.18). **Ships before host agent 0.2.19**, which sends `endReason` and the new transition. Cut from prod with dev's files, so squash histories cannot conflict; the tree is identical to dev.
This commit is contained in:
@@ -146,7 +146,11 @@ describe('the line for a full host', () => {
|
||||
await Session.setState({ id: playing.run.id, state: 'ended' });
|
||||
expect((await h.jobs()).map((j) => j.sessionId)).toEqual([here.run.id]);
|
||||
const left = await Session.fromID(gone.run.id);
|
||||
expect(left).toMatchObject({ state: 'ended', errorMessage: 'Left the queue' });
|
||||
expect(left).toMatchObject({
|
||||
state: 'ended',
|
||||
errorMessage: 'Left the queue',
|
||||
endReason: 'left_queue'
|
||||
});
|
||||
});
|
||||
|
||||
test('a run with a slot is not in line', async () => {
|
||||
|
||||
Reference in New Issue
Block a user