Documentation
¶
Index ¶
- func AllocateNetworks(t testing.TB, testStore *testStore, nws []*apiv2.NetworkServiceCreateRequest) map[string]*apiv2.Network
- func CreateFilesystemLayouts(t testing.TB, testStore *testStore, ...) map[string]*apiv2.FilesystemLayout
- func CreateIPs(t testing.TB, testStore *testStore, ips []*apiv2.IPServiceCreateRequest) map[string]*apiv2.IP
- func CreateImages(t testing.TB, testStore *testStore, ...) map[string]*apiv2.Image
- func CreateMachines(t testing.TB, testStore *testStore, machines []*metal.Machine) map[string]*metal.Machine
- func CreateMachinesWithAllocation(t testing.TB, testStore *testStore, ...) map[string]*apiv2.Machine
- func CreateNetworks(t testing.TB, testStore *testStore, nws []*adminv2.NetworkServiceCreateRequest) map[string]*apiv2.Network
- func CreatePartitions(t testing.TB, testStore *testStore, ...) map[string]*apiv2.Partition
- func CreateProjectInvites(t testing.TB, testStore *testStore, invites []*apiv2.ProjectInvite)
- func CreateProjectMemberships(t testing.TB, testStore *testStore, project string, ...)
- func CreateProjects(t testing.TB, testStore *testStore, ...) map[string]string
- func CreateSizeImageConstraints(t testing.TB, testStore *testStore, ...) map[string]*apiv2.SizeImageConstraint
- func CreateSizeReservations(t testing.TB, testStore *testStore, ...) map[string]*apiv2.SizeReservation
- func CreateSizes(t testing.TB, testStore *testStore, sizes []*adminv2.SizeServiceCreateRequest) map[string]*apiv2.Size
- func CreateSwitchStatuses(t testing.TB, testStore *testStore, statuses []*repository.SwitchStatus) map[string]*metal.SwitchStatus
- func CreateSwitches(t testing.TB, testStore *testStore, ...) map[string]*apiv2.Switch
- func CreateTenantInvites(t testing.TB, testStore *testStore, invites []*apiv2.TenantInvite)
- func CreateTenantMemberships(t testing.TB, testStore *testStore, tenant string, ...)
- func CreateTenants(t testing.TB, testStore *testStore, ...) []string
- func DeleteIPs(t testing.TB, testStore *testStore)
- func DeleteMachines(t testing.TB, testStore *testStore)
- func DeleteNetworks(t testing.TB, testStore *testStore)
- func DhcpMachines(t testing.TB, testStore *testStore, ...)
- func RegisterMachines(t testing.TB, testStore *testStore, ...)
- func StartAsynqServer(t testing.TB, log *slog.Logger, repository *repository.Store, ...) func()
- func StartHeadscale(t testing.TB) (headscalev1.HeadscaleServiceClient, string, string, func())
- func StartIpam(t testing.TB) (ipamv1connect.IpamServiceClient, func())
- func StartMasterdataInMemory(t testing.TB, log *slog.Logger) (mdc.Client, *grpc.ClientConn, func())
- func StartMasterdataWithPostgres(t testing.TB, log *slog.Logger) (mdc.Client, *grpc.ClientConn, func())
- func StartRepositoryWithCleanup(t testing.TB, log *slog.Logger, testOpts ...testOpt) (*testStore, func())
- func StartRethink(t testing.TB, log *slog.Logger) (generic.Datastore, r.ConnectOpts, func())
- func StartValkey(t testing.TB, testOpts ...testOpt) (*redis.Client, valkeygo.Client, func())
- func Validate(t *testing.T, msg proto.Message, options ...protovalidate.ValidationOption)
- func WithContainers(with bool) *testOptContainer
- func WithMiniRedis(with bool) *testOptMiniRedis
- func WithPostgres(with bool) *testOptPostgres
- func WithRethink(with bool) *testOptRethink
- func WithValkey(with bool) *testOptValkey
- type Datacenter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateNetworks ¶ added in v0.0.3
func CreateFilesystemLayouts ¶ added in v0.0.6
func CreateFilesystemLayouts(t testing.TB, testStore *testStore, fsls []*adminv2.FilesystemServiceCreateRequest) map[string]*apiv2.FilesystemLayout
func CreateImages ¶
func CreateMachines ¶ added in v0.0.6
func CreateMachinesWithAllocation ¶ added in v0.0.6
func CreateNetworks ¶
func CreatePartitions ¶
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 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 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 DeleteMachines ¶ added in v0.0.6
func DeleteNetworks ¶ added in v0.0.3
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 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 StartMasterdataWithPostgres ¶ added in v0.1.1
func StartRepositoryWithCleanup ¶ added in v0.0.3
func StartRethink ¶
func StartValkey ¶
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()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.