mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 00:33:20 +08:00
test: wait for update service shutdown before restart
This commit is contained in:
parent
7a16718922
commit
38096d1589
1 changed files with 2 additions and 0 deletions
|
|
@ -167,6 +167,7 @@ test('installation pins the confirmed version, verifies disk and waits for a man
|
||||||
assert.equal(finished.installedVersion, '3.0.8');
|
assert.equal(finished.installedVersion, '3.0.8');
|
||||||
assert.equal(finished.blockedReason, 'pending-restart');
|
assert.equal(finished.blockedReason, 'pending-restart');
|
||||||
assert.equal(finished.canInstall, false);
|
assert.equal(finished.canInstall, false);
|
||||||
|
await f.service.close();
|
||||||
const restarted = await f.restart().status();
|
const restarted = await f.restart().status();
|
||||||
assert.equal(restarted.job.state, 'completed');
|
assert.equal(restarted.job.state, 'completed');
|
||||||
assert.equal(restarted.runningVersion, '3.0.8');
|
assert.equal(restarted.runningVersion, '3.0.8');
|
||||||
|
|
@ -270,6 +271,7 @@ test('an external version change after installation is not reported as this job
|
||||||
const f = await fixture(t);
|
const f = await fixture(t);
|
||||||
await f.submit();
|
await f.submit();
|
||||||
await waitForJob(f.service, 'restart-required');
|
await waitForJob(f.service, 'restart-required');
|
||||||
|
await f.service.close();
|
||||||
f.environment.installedVersion = '3.0.9';
|
f.environment.installedVersion = '3.0.9';
|
||||||
const result = await f.restart('3.0.9').status();
|
const result = await f.restart('3.0.9').status();
|
||||||
assert.equal(result.job.state, 'interrupted');
|
assert.equal(result.job.state, 'interrupted');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue