fix(xo-vmk-to-vhd): failing tests (#6518)

Sometimes `buffer.allocUnsafe` was generating an buffer containing only zeroes, that buffer was filtered in packages/xo-vmdk-to-vhd/src/vmdk-generate.js line 140, thus the generated vmdk was variable
This commit is contained in:
Florent BEAUCHAMP 2022-11-07 13:28:43 +01:00 committed by GitHub
parent a4c5792f9e
commit 90ea2284c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,8 +94,8 @@ test('Can generate an empty VMDK file', async () => {
test('Can generate a small VMDK file', async () => {
const defaultVhdToVmdkRatio = 16
const blockSize = 1024 * 1024
const b1 = Buffer.allocUnsafe(blockSize)
const b2 = Buffer.allocUnsafe(blockSize)
const b1 = Buffer.alloc(blockSize, 255)
const b2 = Buffer.alloc(blockSize, 255)
const blockGenerator = [
{ lba: 0, block: b1 },
{ lba: blockSize, block: b2 },