Documentation ¶
Overview ¶
netplantest provides a fake implementation of the netplan dbus API for testing. Unlike the real netplan-dbus it uses the session bus but that is good enough for the testing. See configcore/netplan_test.go for example usage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetplanServer ¶
type NetplanServer struct { MockNetplanConfigYaml string ConfigErr *dbus.Error ConfigApiGetCalls int ConfigApiGetErr *dbus.Error ConfigApiSetCalls []string ConfigApiSetRet bool ConfigApiSetErr *dbus.Error ConfigApiApplyCalls int ConfigApiApplyRet bool ConfigApiApplyErr *dbus.Error ConfigApiTryCalls int ConfigApiTryRet bool ConfigApiTryErr *dbus.Error ConfigApiCancelCalls int ConfigApiCancelRet bool ConfigApiCancelErr *dbus.Error // contains filtered or unexported fields }
func NewNetplanServer ¶
func NewNetplanServer(mockNetplanConfigYaml string) (*NetplanServer, error)
func (*NetplanServer) ExportApiV1 ¶
func (server *NetplanServer) ExportApiV1()
func (*NetplanServer) ExportApiV2 ¶
func (server *NetplanServer) ExportApiV2()
func (*NetplanServer) Stop ¶
func (server *NetplanServer) Stop() error
Click to show internal directories.
Click to hide internal directories.