testutils

package
v0.0.0-...-08b32bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequiresCgroupV2

func RequiresCgroupV2(tb testing.TB)

RequiresCgroupV2 skips if there is no cgroupv2 mount point.

func RequiresCommands

func RequiresCommands(cmds ...string)

RequiresCommands exits if required command is not found.

func RequiresRoot

func RequiresRoot()

RequiresRoot exits if the user is not root.

Types

type FlakeyDevice

type FlakeyDevice interface {
	// RootFS returns root filesystem.
	RootFS() string

	// PowerFailure simulates power failure with drop all the writes.
	PowerFailure(mntOpt string) error

	dmflakey.Flakey
}

FlakeyDevice extends dmflakey.Flakey interface.

func InitFlakeyDevice

func InitFlakeyDevice(t *testing.T, name string, fsType dmflakey.FSType, mntOpt string) FlakeyDevice

InitFlakeyDevice returns FlakeyDevice instance with a given filesystem.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL