Let agents idle for updates required by creation cancellation
This commit is contained in:
@@ -142,6 +142,12 @@ describe('native instance provisioning', () => {
|
||||
expect(pendingHostOperations(hostId).filter(op => op.kind.startsWith('instance.'))).toEqual([]);
|
||||
await advance();
|
||||
expect((await detail(cleanup)).stage).toContain('Update the host agent');
|
||||
expect((await detail(cleanup)).stage).toContain('Automatic updates are not enabled');
|
||||
heartbeat(hostId, { ...inventory(), capabilities: ['agent.update'],
|
||||
agentUpdate: { enabled: true, state: 'deferred', currentVersion: '1.2.2', targetVersion: '1.3.0' } });
|
||||
await advance();
|
||||
expect((await detail(cleanup)).stage).toContain('New command delivery is paused');
|
||||
expect((await detail(cleanup)).stage).toContain('automatic updater can run');
|
||||
db().prepare('UPDATE ec_hosts SET last_heartbeat=? WHERE id=?').run('2000-01-01T00:00:00.000Z', hostId);
|
||||
await advance();
|
||||
expect((await detail(cleanup)).stage).toContain('unavailable');
|
||||
|
||||
Reference in New Issue
Block a user