tests

package
v0.0.0-...-999e6e9 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MPL-2.0 Imports: 49 Imported by: 0

Documentation

Overview

Package tests provides the Sidero tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cluster talos.Cluster, capiManager *capi.Manager, options Options) (ok bool)

Run all the tests.

Types

type Options

type Options struct {
	KernelURL, InitrdURL string

	RegistryMirrors []string

	RunTestPattern string

	TalosRelease      string
	KubernetesVersion string
}

Options for the test.

type ScaleCallBack

type ScaleCallBack func(runtime.Object) error

type TestFunc

type TestFunc func(t *testing.T)

TestFunc is a testing function prototype.

func TestEnvironmentCreate

func TestEnvironmentCreate(ctx context.Context, metalClient client.Client, cluster talos.Cluster, kernelURL, initrdURL string) TestFunc

TestEnvironmentCreate verifies environment creation.

func TestEnvironmentDefault

func TestEnvironmentDefault(ctx context.Context, metalClient client.Client, cluster talos.Cluster, kernelURL, initrdURL string) TestFunc

TestEnvironmentDefault verifies environment "default".

func TestMachineDeploymentReconcile

func TestMachineDeploymentReconcile(ctx context.Context, metalClient client.Client) TestFunc

TestMachineDeploymentReconcile verifies that machine deployment can reconcile delete machines.

func TestManagementCluster

func TestManagementCluster(ctx context.Context, metalClient client.Client, cluster talos.Cluster, capiManager *capi.Manager, talosRelease, kubernetesVersion string) TestFunc

TestManagementCluster deploys the management cluster via CAPI.

func TestMatchServersMetalMachines

func TestMatchServersMetalMachines(ctx context.Context, metalClient client.Client) TestFunc

TestMatchServersMetalMachines verifies that number of metal machines and servers match.

func TestMetalMachineServerRefReconcile

func TestMetalMachineServerRefReconcile(ctx context.Context, metalClient client.Client) TestFunc

TestMetalMachineServerRefReconcile verifies that metal machine controller can reconcile missing MetalMachine.Spec.ServerRef.

This simulates failure in two-step process of metal machine server allocation: serverbinding got created, but metalmachine's server ref wasn't set.

func TestScaleControlPlaneDown

func TestScaleControlPlaneDown(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestScaleControlPlaneDown verifies that the control plane can scale down.

func TestScaleControlPlaneUp

func TestScaleControlPlaneUp(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestScaleControlPlaneUp verifies that the control plane can scale up.

func TestScaleWorkersDown

func TestScaleWorkersDown(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestScaleWorkersDown verifies that the workers can scale down.

func TestScaleWorkersUp

func TestScaleWorkersUp(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestScaleWorkersUp verifies that the workers can scale up.

func TestServerAcceptance

func TestServerAcceptance(ctx context.Context, metalClient client.Client) TestFunc

TestServerAcceptance makes sure the accepted bool works.

func TestServerClassAny

func TestServerClassAny(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestServerClassAny verifies server class "any".

func TestServerClassCreate

func TestServerClassCreate(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestServerClassCreate verifies server class creation.

func TestServerClassPatch

func TestServerClassPatch(ctx context.Context, metalClient client.Client, cluster talos.Cluster, capiManager *capi.Manager) TestFunc

TestServerClassPatch verifies config patches work at the server level.

func TestServerCordoned

func TestServerCordoned(ctx context.Context, metalClient client.Client) TestFunc

TestServerCordoned makes sure the cordoned bool works.

func TestServerMgmtAPI

func TestServerMgmtAPI(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestServerMgmtAPI patches all the servers for the management API.

func TestServerPXEBoot

func TestServerPXEBoot(ctx context.Context, metalClient client.Client, cluster talos.Cluster, capiManager *capi.Manager, talosRelease, kubernetesVersion string) TestFunc

TestServerPXEBoot verifies that PXE boot is retried when the server gets incorrect configuration.

func TestServerPatch

func TestServerPatch(ctx context.Context, metalClient client.Client, registryMirrors []string) TestFunc

TestServerPatch patches all the servers for the config.

func TestServerRegistration

func TestServerRegistration(ctx context.Context, metalClient client.Client, capiCluster talos.Cluster) TestFunc

TestServerRegistration verifies that all the servers got registered.

func TestServerReset

func TestServerReset(ctx context.Context, metalClient client.Client) TestFunc

TestServerReset verifies that all the servers got reset.

func TestServerResetOnAcceptance

func TestServerResetOnAcceptance(ctx context.Context, metalClient client.Client) TestFunc

TestServerResetOnAcceptance tests that servers are reset when accepted.

func TestServerValidation

func TestServerValidation(ctx context.Context, metalClient client.Client) TestFunc

TestServerValidation checks that server validation webhook works.

func TestServersDiscoveredIPs

func TestServersDiscoveredIPs(ctx context.Context, metalClient client.Client) TestFunc

TestServersDiscoveredIPs waits for all the servers to have an IP address.

func TestServersReady

func TestServersReady(ctx context.Context, metalClient client.Client) TestFunc

TestServersReady waits for all the servers to be 'Ready'.

func TestWorkloadCluster

func TestWorkloadCluster(ctx context.Context, metalClient client.Client, cluster talos.Cluster, capiManager *capi.Manager, talosRelease, kubernetesVersion string) TestFunc

TestWorkloadCluster deploys and destroys the workload cluster via CAPI.

Jump to

Keyboard shortcuts

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