Documentation
¶
Index ¶
- func BuildContainerFromDir(t *testing.T, rootDir, imageName string) error
- func CheckToolExists(t *testing.T, tool string)
- func CleanupMounts(t *testing.T, mountPoint string)
- func CreateMockContainer(t *testing.T, imageName string) error
- func RequireRoot(t *testing.T)
- func RequireTools(t *testing.T, tools ...string)
- func WaitForDevice(device string) error
- type TestDisk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildContainerFromDir ¶
BuildContainerFromDir builds a container image from a directory
func CheckToolExists ¶
CheckToolExists checks if a required tool is available
func CleanupMounts ¶
CleanupMounts unmounts any mounts under a directory
func CreateMockContainer ¶
CreateMockContainer creates a minimal container image for testing
func RequireTools ¶
RequireTools checks for required tools and skips if any are missing
func WaitForDevice ¶
WaitForDevice waits for a device to appear (useful after partitioning)
Types ¶
type TestDisk ¶
type TestDisk struct {
ImagePath string
LoopDevice string
Size int64 // Size in bytes
Mounted bool
// contains filtered or unexported fields
}
TestDisk represents a test disk image with loop device
func CreateTestDisk ¶
CreateTestDisk creates a disk image file and attaches it to a loop device
Click to show internal directories.
Click to hide internal directories.