testutils

package
v1.22.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package testutils provides testing utilities for the networking manager.

Index

Constants

View Source
const (
	// Tenant1 is the first test tenant identifier.
	Tenant1 = "11111111-1111-1111-1111-111111111111"
	// Tenant2 is the second test tenant identifier.
	Tenant2 = "22222222-2222-2222-2222-222222222222"
)

Variables

View Source
var (
	// Zlog is the logger instance for testing.
	Zlog = logging.GetLogger(loggerName)
	// NetClient is the network inventory client for testing.
	NetClient *clients.NetInventoryClient
	// IPController is the IP controller for testing.
	IPController *rec_v2.Controller[reconcilers.ReconcilerID]
	// NBHandler is the northbound handler for testing.
	NBHandler *handlers.NBHandler
)

Functions

func AssertIPAddress

func AssertIPAddress(
	tb testing.TB,
	tenantID string,
	resID string,
	expectedDesiredState network_v1.IPAddressState,
	expectedCurrentState network_v1.IPAddressState,
	expectedStatus network_v1.IPAddressStatus,
)

AssertIPAddress asserts on IPAddress state and status.

func AssertReconcile

func AssertReconcile(tb testing.TB, events int)

AssertReconcile asserts on received events and on the executed reconciliation.

func CreateIPController

func CreateIPController(tb testing.TB)

CreateIPController is an helper function to create an IP Controller.

func CreateNBHandler

func CreateNBHandler(tb testing.TB)

CreateNBHandler is an helper function to create a NB handler.

func CreateNetworkingClient

func CreateNetworkingClient(tb testing.TB)

CreateNetworkingClient is an helper function to create a new Networking Client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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