Documentation ¶
Index ¶
- func ConsistOfIgnoringUUIDs(expected ...TestData) gomegatypes.GomegaMatcher
- func CreateTransitSwitchPortBindings(sbClient libovsdbclient.Client, datapath string, names ...string) error
- func HaveData(expected ...TestData) gomegatypes.GomegaMatcher
- func HaveDataExact(expected ...TestData) gomegatypes.GomegaMatcher
- func HaveDataIgnoringUUIDs(expected ...TestData) gomegatypes.GomegaMatcher
- func HaveEmptyData() gomegatypes.GomegaMatcher
- type Context
- func NewNBSBTestHarness(setup TestSetup) (libovsdbclient.Client, libovsdbclient.Client, *Context, error)
- func NewNBTestHarness(setup TestSetup, testCtx *Context) (libovsdbclient.Client, *Context, error)
- func NewOVSTestHarness(setup TestSetup) (libovsdbclient.Client, *Context, error)
- func NewSBTestHarness(setup TestSetup, testCtx *Context) (libovsdbclient.Client, *Context, error)
- type TestData
- type TestOvsdbServer
- type TestSetup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsistOfIgnoringUUIDs ¶
func ConsistOfIgnoringUUIDs(expected ...TestData) gomegatypes.GomegaMatcher
func CreateTransitSwitchPortBindings ¶
func CreateTransitSwitchPortBindings(sbClient libovsdbclient.Client, datapath string, names ...string) error
func HaveData ¶
func HaveData(expected ...TestData) gomegatypes.GomegaMatcher
HaveData matches expected libovsdb models with named UUIDs
func HaveDataExact ¶
func HaveDataExact(expected ...TestData) gomegatypes.GomegaMatcher
HaveDataExact matches expected libovsdb models exactly
func HaveDataIgnoringUUIDs ¶
func HaveDataIgnoringUUIDs(expected ...TestData) gomegatypes.GomegaMatcher
HaveDataIgnoringUUIDs matches expected libovsdb models ignoring UUIDs
func HaveEmptyData ¶
func HaveEmptyData() gomegatypes.GomegaMatcher
Types ¶
type Context ¶
type Context struct { SBServer *TestOvsdbServer NBServer *TestOvsdbServer OVSServer *TestOvsdbServer // contains filtered or unexported fields }
func NewNBSBTestHarness ¶
func NewNBSBTestHarness(setup TestSetup) (libovsdbclient.Client, libovsdbclient.Client, *Context, error)
NewNBSBTestHarness runs NB & SB OVSDB servers and returns corresponding clients
func NewNBTestHarness ¶
NewNBTestHarness runs NB server and returns corresponding client
func NewOVSTestHarness ¶
func NewOVSTestHarness(setup TestSetup) (libovsdbclient.Client, *Context, error)
NewOVSTestHarness runs OVSDB server and returns corresponding client
func NewSBTestHarness ¶
NewSBTestHarness runs SB server and returns corresponding client
type TestOvsdbServer ¶
type TestOvsdbServer struct { *server.OvsdbServer // contains filtered or unexported fields }
func (*TestOvsdbServer) CreateTestData ¶
func (t *TestOvsdbServer) CreateTestData(data []TestData) error
CreateTestData inserts test data into the database after the server is started. We must use the server's Transact() method to ensure updates are sent to clients that may have already been created.