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 ¶
AssertReconcile asserts on received events and on the executed reconciliation.
func CreateIPController ¶
CreateIPController is an helper function to create an IP Controller.
func CreateNBHandler ¶
CreateNBHandler is an helper function to create a NB handler.
func CreateNetworkingClient ¶
CreateNetworkingClient is an helper function to create a new Networking Client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.