Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MasterLabel is node label of master MasterLabel = "master" // MasterID is node ID of master MasterID = uint32(1) // WorkerLabel is node label of worker WorkerLabel = "worker" // WorkerID is node ID of worker WorkerID = uint32(2) // Namespace1 is first testing namespace Namespace1 = "default" // Namespace2 is second testing namespace Namespace2 = "another-ns" // MainVrfID is id of main vrf table MainVrfID = 1 // PodVrfID is id of pod vrf table PodVrfID = 2 )
Variables ¶
View Source
var ( // Pod1 is first testing pod Pod1 = podmodel.ID{Name: "pod1", Namespace: Namespace1} // Pod2 is second testing pod Pod2 = podmodel.ID{Name: "pod2", Namespace: Namespace1} // Pod3 is third testing pod Pod3 = podmodel.ID{Name: "pod3", Namespace: Namespace2} // Pod1If is name of interface leading to pod 1 Pod1If = "master-tap1" // Pod2If is name of interface leading to pod 2 Pod2If = "master-tap2" )
Functions ¶
Types ¶
type Fixture ¶
type Fixture struct { Logger logging.Logger Datasync *MockDataSync ServiceLabel *MockServiceLabel NodeSync *MockNodeSync ContivConf *contivconf.ContivConf IPAM *ipam.IPAM PodManager *MockPodManager IPNet *MockIPNet SVCProcessor *svc_processor.ServiceProcessor Txn *Txn }
Fixture contain everything what is needed (plugins/configs/etc...) to test any kind of k8s service renderer (it doesn't contain the renderer plugin itself and plugins depending on it)
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
Txn is mock of ongoing transaction
func (*Txn) ResyncFactory ¶
func (t *Txn) ResyncFactory(txnTracker *localclient.TxnTracker) func() controller.ResyncOperations
ResyncFactory creates factory for mock transaction resync operations
func (*Txn) UpdateFactory ¶
func (t *Txn) UpdateFactory(txnTracker *localclient.TxnTracker) func(change string) controller.UpdateOperations
UpdateFactory creates factory for mock transaction update operations
Click to show internal directories.
Click to hide internal directories.