test

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateNetworks added in v0.0.3

func AllocateNetworks(t testing.TB, testStore *testStore, nws []*apiv2.NetworkServiceCreateRequest) map[string]*apiv2.Network

func CreateFilesystemLayouts added in v0.0.6

func CreateFilesystemLayouts(t testing.TB, testStore *testStore, fsls []*adminv2.FilesystemServiceCreateRequest) map[string]*apiv2.FilesystemLayout

func CreateIPs

func CreateIPs(t testing.TB, testStore *testStore, ips []*apiv2.IPServiceCreateRequest) map[string]*apiv2.IP

func CreateImages

func CreateImages(t testing.TB, testStore *testStore, images []*adminv2.ImageServiceCreateRequest) map[string]*apiv2.Image

func CreateMachines added in v0.0.6

func CreateMachines(t testing.TB, testStore *testStore, machines []*metal.Machine) map[string]*metal.Machine

func CreateMachinesWithAllocation added in v0.0.6

func CreateMachinesWithAllocation(t testing.TB, testStore *testStore, machines []*apiv2.MachineServiceCreateRequest) map[string]*apiv2.Machine

func CreateNetworks

func CreateNetworks(t testing.TB, testStore *testStore, nws []*adminv2.NetworkServiceCreateRequest) map[string]*apiv2.Network

func CreatePartitions

func CreatePartitions(t testing.TB, testStore *testStore, partitions []*adminv2.PartitionServiceCreateRequest) map[string]*apiv2.Partition

func CreateProjectInvites added in v0.0.6

func CreateProjectInvites(t testing.TB, testStore *testStore, invites []*apiv2.ProjectInvite)

func CreateProjectMemberships added in v0.0.6

func CreateProjectMemberships(t testing.TB, testStore *testStore, project string, memberships []*repository.ProjectMemberCreateRequest)

func CreateProjects

func CreateProjects(t testing.TB, testStore *testStore, projects []*apiv2.ProjectServiceCreateRequest) map[string]string

func CreateSizeImageConstraints added in v0.1.7

func CreateSizeImageConstraints(t testing.TB, testStore *testStore, sizeImageConstraints []*adminv2.SizeImageConstraintServiceCreateRequest) map[string]*apiv2.SizeImageConstraint

func CreateSizeReservations added in v0.1.3

func CreateSizeReservations(t testing.TB, testStore *testStore, sizeReservations []*adminv2.SizeReservationServiceCreateRequest) map[string]*apiv2.SizeReservation

func CreateSizes added in v0.0.5

func CreateSizes(t testing.TB, testStore *testStore, sizes []*adminv2.SizeServiceCreateRequest) map[string]*apiv2.Size

func CreateSwitchStatuses added in v0.1.0

func CreateSwitchStatuses(t testing.TB, testStore *testStore, statuses []*repository.SwitchStatus) map[string]*metal.SwitchStatus

func CreateSwitches added in v0.0.8

func CreateSwitches(t testing.TB, testStore *testStore, switches []*repository.SwitchServiceCreateRequest) map[string]*apiv2.Switch

func CreateTenantInvites added in v0.0.6

func CreateTenantInvites(t testing.TB, testStore *testStore, invites []*apiv2.TenantInvite)

func CreateTenantMemberships added in v0.0.6

func CreateTenantMemberships(t testing.TB, testStore *testStore, tenant string, memberships []*repository.TenantMemberCreateRequest)

func CreateTenants

func CreateTenants(t testing.TB, testStore *testStore, tenants []*apiv2.TenantServiceCreateRequest) []string

func DeleteIPs added in v0.0.6

func DeleteIPs(t testing.TB, testStore *testStore)

func DeleteMachines added in v0.0.6

func DeleteMachines(t testing.TB, testStore *testStore)

func DeleteNetworks added in v0.0.3

func DeleteNetworks(t testing.TB, testStore *testStore)

func DhcpMachines added in v0.1.5

func DhcpMachines(t testing.TB, testStore *testStore, bootRequests []*infrav2.BootServiceDhcpRequest)

func RegisterMachines added in v0.1.5

func RegisterMachines(t testing.TB, testStore *testStore, registerRequests []*infrav2.BootServiceRegisterRequest)

func StartAsynqServer added in v0.0.3

func StartAsynqServer(t testing.TB, log *slog.Logger, repository *repository.Store, redis *redis.Client) func()

func StartHeadscale added in v0.1.2

func StartHeadscale(t testing.TB) (headscalev1.HeadscaleServiceClient, string, string, func())

func StartIpam

func StartIpam(t testing.TB) (ipamv1connect.IpamServiceClient, func())

func StartMasterdataInMemory

func StartMasterdataInMemory(t testing.TB, log *slog.Logger) (mdc.Client, *grpc.ClientConn, func())

func StartMasterdataWithPostgres added in v0.1.1

func StartMasterdataWithPostgres(t testing.TB, log *slog.Logger) (mdc.Client, *grpc.ClientConn, func())

func StartRepositoryWithCleanup added in v0.0.3

func StartRepositoryWithCleanup(t testing.TB, log *slog.Logger, testOpts ...testOpt) (*testStore, func())

func StartRethink

func StartRethink(t testing.TB, log *slog.Logger) (generic.Datastore, r.ConnectOpts, func())

func StartValkey

func StartValkey(t testing.TB, testOpts ...testOpt) (*redis.Client, valkeygo.Client, func())

func Validate added in v0.0.8

func Validate(t *testing.T, msg proto.Message, options ...protovalidate.ValidationOption)

func WithContainers added in v0.1.6

func WithContainers(with bool) *testOptContainer

WithContainers if set to false, no database containers are started, defaults to true.

func WithMiniRedis added in v0.1.2

func WithMiniRedis(with bool) *testOptMiniRedis

func WithPostgres added in v0.1.1

func WithPostgres(with bool) *testOptPostgres

WithPostgres if set to true a postgres database container is started, defaults to false.

func WithRethink added in v0.1.6

func WithRethink(with bool) *testOptRethink

WithRethink if set to true a rethink database container is started, defaults to false.

func WithValkey added in v0.0.6

func WithValkey(with bool) *testOptValkey

WithValkey if set to true a valkey database container is started, defaults to false.

Types

type Datacenter added in v0.1.5

type Datacenter struct {
	Tenants    []string
	Projects   map[string]string
	Partitions map[string]*apiv2.Partition
	Sizes      map[string]*apiv2.Size
	Networks   map[string]*apiv2.Network
	IPs        map[string]*apiv2.IP
	Images     map[string]*apiv2.Image
	Switches   map[string]*apiv2.Switch
	Machines   map[string]*metal.Machine

	TestStore *testStore
	// contains filtered or unexported fields
}

func NewDatacenter added in v0.1.5

func NewDatacenter(t testing.TB, log *slog.Logger, testOpts ...testOpt) *Datacenter

func (*Datacenter) CleanUp added in v0.1.5

func (dc *Datacenter) CleanUp()

func (*Datacenter) Close added in v0.1.5

func (dc *Datacenter) Close()

func (*Datacenter) Create added in v0.1.5

func (dc *Datacenter) Create(spec *scenarios.DatacenterSpec)

func (*Datacenter) Dump added in v0.1.5

func (dc *Datacenter) Dump()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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