env

package
v0.0.0-...-249f2f6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client client.Client // You'll be using this client in your tests.

)

Functions

func BeCreated

func BeCreated() gomegatypes.GomegaMatcher

func BeReady

func BeReady() gomegatypes.GomegaMatcher

func BeRestarted

func BeRestarted(oldUID types.UID) gomegatypes.GomegaMatcher

func CheckLiveMigrationSucceeded

func CheckLiveMigrationSucceeded(vmNamespace, vmName string)

func ComposeAlpineWithMultusVMI

func ComposeAlpineWithMultusVMI(namespace, interfaceName, networkName string) *kubevirtv1.VirtualMachineInstance

func ComposeLayer2WithSubnetNAD

func ComposeLayer2WithSubnetNAD(namespace string) *nadv1.NetworkAttachmentDefinition

func ContainConditionVMIReady

func ContainConditionVMIReady() gomegatypes.GomegaMatcher

func GenerateLayer2WithSubnetNAD

func GenerateLayer2WithSubnetNAD(nadName, namespace, role string) *nadv1.NetworkAttachmentDefinition

func GetIPsFromVMIStatus

func GetIPsFromVMIStatus(vmi *kubevirtv1.VirtualMachineInstance, networkInterfaceName string) []string

func IPAMClaimsFromNamespace

func IPAMClaimsFromNamespace(namespace string) func() ([]ipamclaimsv1alpha1.IPAMClaim, error)

IPAMClaimsFromNamespace fetches the IPAMClaims related to namespace

func LiveMigrateVirtualMachine

func LiveMigrateVirtualMachine(vmNamespace, vmName string)

func MatchIPsAtInterfaceByName

func MatchIPsAtInterfaceByName(interfaceName string, ipsMatcher gomegatypes.GomegaMatcher) gomegatypes.GomegaMatcher

func NewVirtualMachineInstance

func NewVirtualMachineInstance(namespace string, opts ...VMIOption) *kubevirtv1.VirtualMachineInstance

func RandomName

func RandomName(prefix string, n int) string

RandomName generates a random name of n length with the provided prefix. If prefix is omitted, the then entire name is random char.

func RandomNamespace

func RandomNamespace() string

func Start

func Start()

func ThisVMI

ThisVMI fetches the latest state of the VirtualMachineInstance. If the object does not exist, nil is returned.

func ThisVMReadiness

func ThisVMReadiness(vm *kubevirtv1.VirtualMachine) func() (bool, error)

Types

type TestData

type TestData struct {
	Namespace string
	Client    client.Client
}

func GenerateTestData

func GenerateTestData() TestData

func (*TestData) SetUp

func (td *TestData) SetUp()

func (*TestData) TearDown

func (td *TestData) TearDown()

type VMIOption

type VMIOption func(vmi *kubevirtv1.VirtualMachineInstance)

func WithCloudInitNoCloudVolume

func WithCloudInitNoCloudVolume(cloudInitNetworkData string) VMIOption

func WithInterface

func WithInterface(iface kubevirtv1.Interface) VMIOption

func WithMemory

func WithMemory(memory string) VMIOption

func WithNetwork

func WithNetwork(network kubevirtv1.Network) VMIOption

type VMOption

type VMOption func(vm *kubevirtv1.VirtualMachine)

func WithRunning

func WithRunning() VMOption

Jump to

Keyboard shortcuts

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