Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinodeNodeClass ¶
func LinodeNodeClass(overrides ...v1.LinodeNodeClass) *v1.LinodeNodeClass
func LinodeNodeClassWithoutLKE ¶
func LinodeNodeClassWithoutLKE(overrides ...v1.LinodeNodeClass) *v1.LinodeNodeClass
LinodeNodeClassWithoutLKE creates a LinodeNodeClass configured for direct Linode instance tests. The mode (LKE vs instance) is controlled by the startup flag, not this nodeclass. This helper sets up appropriate defaults for instance mode testing (e.g., Image field).
func Options ¶
func Options(overrides ...OptionsFields) *options.Options
Types ¶
type Environment ¶
type Environment struct {
// Mock
Clock *clock.FakeClock
EventRecorder *coretest.EventRecorder
InstanceTypeStore *nodeoverlay.InstanceTypeStore
// API
LinodeAPI *fake.LinodeClient
// Cache
LinodeCache *cache.Cache
InstanceTypeCache *cache.Cache
InstanceCache *cache.Cache
OfferingCache *cache.Cache
NodePoolCache *cache.Cache
ValidationCache *cache.Cache
// Providers
InstanceTypesProvider *instancetype.DefaultProvider
InstanceProvider *instance.DefaultProvider
InstanceTypesResolver *instancetype.DefaultResolver
LKENodeProvider *lke.DefaultProvider
}
func NewEnvironment ¶
func NewEnvironment(ctx context.Context) *Environment
func (*Environment) NodeProvider ¶
func (env *Environment) NodeProvider(ctx context.Context) instance.Provider
NodeProvider returns the appropriate provider based on the mode in context. For tests that need a specific provider, use InstanceProvider or LKENodeProvider directly.
func (*Environment) Reset ¶
func (env *Environment) Reset()
type OptionsFields ¶
type TestNodeClass ¶
type TestNodeClass struct {
v1.LinodeNodeClass
}
Click to show internal directories.
Click to hide internal directories.