validation

package
v0.0.0-...-ffcb421 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunFirewallValidation

func RunFirewallValidation(t *testing.T, config ProviderConfig, opts FirewallValidationOpts)

func RunInstanceLifecycleValidation

func RunInstanceLifecycleValidation(t *testing.T, config ProviderConfig)

func RunKubernetesValidation

func RunKubernetesValidation(t *testing.T, config ProviderConfig, opts KubernetesValidationOpts)

func RunNetworkValidation

func RunNetworkValidation(t *testing.T, config ProviderConfig, opts NetworkValidationOpts)

func RunValidationSuite

func RunValidationSuite(t *testing.T, config ProviderConfig)

func WaitForResourcePredicate

func WaitForResourcePredicate[T any](ctx context.Context, opts WaitForResourcePredicateOpts[T]) error

Types

type FirewallValidationOpts

type FirewallValidationOpts struct {
	// TestPort is the port to test firewall blocking on (should NOT be in allowed ingress)
	TestPort int
}

type KubernetesValidationNetworkOpts

type KubernetesValidationNetworkOpts struct {
	Name      string
	RefID     string
	CidrBlock string
	Subnets   []KubernetesValidationSubnetOpts
}

type KubernetesValidationNodeGroupOpts

type KubernetesValidationNodeGroupOpts struct {
	Name         string
	RefID        string
	MinNodeCount int
	MaxNodeCount int
	InstanceType string
	DiskSize     v1.Bytes
}

type KubernetesValidationOpts

type KubernetesValidationOpts struct {
	Name              string
	RefID             string
	KubernetesVersion string
	Subnets           []KubernetesValidationSubnetOpts
	NodeGroupOpts     *KubernetesValidationNodeGroupOpts
	NetworkOpts       *KubernetesValidationNetworkOpts
	UserOpts          *KubernetesValidationUserOpts
	Tags              map[string]string
}

type KubernetesValidationSubnetOpts

type KubernetesValidationSubnetOpts struct {
	Name       string
	RefID      string
	CidrBlock  string
	SubnetType v1.SubnetType
}

type KubernetesValidationUserOpts

type KubernetesValidationUserOpts struct {
	Username     string
	Role         string
	RSAPEMBase64 string
}

type NetworkValidationOpts

type NetworkValidationOpts struct {
	Name                  string
	RefID                 string
	CidrBlock             string
	PublicSubnetCidrBlock string
	Tags                  map[string]string
}

type ProviderConfig

type ProviderConfig struct {
	Location   string
	StableIDs  []v1.InstanceTypeID
	Credential v1.CloudCredential
}

type ValidationLogger

type ValidationLogger struct{}

implementation of the "v1.Logger" interface

func (*ValidationLogger) Debug

func (l *ValidationLogger) Debug(_ context.Context, msg string, fields ...v1.Field)

func (*ValidationLogger) Error

func (l *ValidationLogger) Error(_ context.Context, err error, fields ...v1.Field)

func (*ValidationLogger) Info

func (l *ValidationLogger) Info(_ context.Context, msg string, fields ...v1.Field)

func (*ValidationLogger) Warn

func (l *ValidationLogger) Warn(_ context.Context, msg string, fields ...v1.Field)

type WaitForResourcePredicateOpts

type WaitForResourcePredicateOpts[T any] struct {
	GetResource func() (T, error)
	Predicate   func(resource T) bool
	Timeout     time.Duration
	Interval    time.Duration
}

WaitForKubernetesClusterPredicate waits for the Kubernetes cluster to satisfy the predicate function. If the predicate returns true, the loop breaks.

Jump to

Keyboard shortcuts

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