mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-11-09 17:06:13 -06:00
fix(immutable-backups): fix test not waiting for immutability (#10606)
This commit is contained in:
committed by
GitHub
parent
b7af59b6ed
commit
05aeff101b
@@ -139,7 +139,13 @@ describe('protectRemotes/watchRemote', async () => {
|
||||
await fs.writeFile(path.join(vmDir, `${BACKUP_DATE}.json`), '{}')
|
||||
|
||||
// The whole directory (and its contents) must become immutable.
|
||||
// `chattr -R` flags the directory before recursing into its children, so
|
||||
// waiting on the directory alone races with the files inside it.
|
||||
await waitFor(() => Directory.isImmutable(vhdDir))
|
||||
await waitFor(() => Directory.isImmutable(blocks))
|
||||
await waitFor(() => File.isImmutable(bat))
|
||||
await waitFor(() => File.isImmutable(header))
|
||||
await waitFor(() => File.isImmutable(footer))
|
||||
|
||||
assert.strictEqual(await Directory.isImmutable(vhdDir), true, 'vhd dir should be immutable')
|
||||
assert.strictEqual(await File.isImmutable(bat), true, 'bat should be immutable')
|
||||
|
||||
Reference in New Issue
Block a user