Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a Virtual Disk Object for using in DSC Unit Tests.
# Create the Mock Objects that will be used for running tests
$TestVirtualDisk = [PSObject]@{
Path = Join-Path -Path $ENV:Temp -ChildPath 'TestiSCSIVirtualDisk.vhdx'
Ensure = 'Present'
DiskType = 'Differencing'
SizeBytes = 100MB
Description = 'Unit Test iSCSI Virtual Disk'
BlockSizeBytes = 2MB
PhysicalSectorSizeBytes = 4096
LogicalSectorSizeBytes = 512
ParentPath = 'c:\Parent.vhdx'
}
$MockVirtualDisk = [PSObject]@{
Path = $TestVirtualDisk.Path
DiskType = $TestVirtualDisk.DiskType
Size = $TestVirtualDisk.SizeBytes
Description = $TestVirtualDisk.Description
ParentPath = $TestVirtualDisk.ParentPath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment