feat(updater): support updates after verified SeaweedFS migration
This commit is contained in:
@@ -82,6 +82,19 @@ test('recovery, up-to-date, unmanaged compose and other active jobs prevent appl
|
||||
}
|
||||
})
|
||||
|
||||
test('a completed storage migration stays blocked until the host handover is complete', async t => {
|
||||
let state = { ...overview(check, { status: 'failed', recoveryRequired: true }),
|
||||
storage: { provider: 'seaweedfs', migrationPending: true } }
|
||||
const f = await setup(t, async path => path.endsWith('/status') ? state : state.request)
|
||||
assert.equal(f.ui.overview.value.storage.migrationPending, true)
|
||||
assert.equal(f.ui.canApply.value, false)
|
||||
state = { ...overview({ ...check, plan: { ...check.plan, storageProvider: 'seaweedfs', storageImageRetained: true } }),
|
||||
storage: { provider: 'seaweedfs', migrationPending: false } }
|
||||
await f.ui.refresh()
|
||||
assert.equal(f.ui.canApply.value, true)
|
||||
assert.equal(f.ui.job.value.plan.storageProvider, 'seaweedfs')
|
||||
})
|
||||
|
||||
test('an older polling response cannot erase a new submission whose response was lost', async t => {
|
||||
let hold = false, release
|
||||
const f = await setup(t, async (path, options) => {
|
||||
|
||||
Reference in New Issue
Block a user