mock_cni

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

mock_cni is a mock of the `libcni.CNI` interface. It's a handwritten mock because there are only two functions to deal with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCNI

type MockCNI struct {
	mock.Mock
}

func (*MockCNI) AddNetwork

func (m *MockCNI) AddNetwork(
	ctx context.Context,
	net *libcni.NetworkConfig,
	rt *libcni.RuntimeConf,
) (types.Result, error)

func (*MockCNI) AddNetworkList

func (m *MockCNI) AddNetworkList(
	ctx context.Context,
	net *libcni.NetworkConfigList,
	rt *libcni.RuntimeConf,
) (types.Result, error)

func (*MockCNI) CheckNetwork

func (m *MockCNI) CheckNetwork(
	ctx context.Context,
	net *libcni.NetworkConfig,
	rt *libcni.RuntimeConf,
) error

func (*MockCNI) CheckNetworkList

func (m *MockCNI) CheckNetworkList(
	ctx context.Context,
	net *libcni.NetworkConfigList,
	rt *libcni.RuntimeConf,
) error

func (*MockCNI) DelNetwork

func (m *MockCNI) DelNetwork(
	ctx context.Context,
	net *libcni.NetworkConfig,
	rt *libcni.RuntimeConf,
) error

func (*MockCNI) DelNetworkList

func (m *MockCNI) DelNetworkList(
	ctx context.Context,
	net *libcni.NetworkConfigList,
	rt *libcni.RuntimeConf,
) error

func (*MockCNI) GetNetworkCachedConfig

func (m *MockCNI) GetNetworkCachedConfig(
	net *libcni.NetworkConfig,
	rt *libcni.RuntimeConf,
) ([]byte, *libcni.RuntimeConf, error)

func (*MockCNI) GetNetworkCachedResult

func (m *MockCNI) GetNetworkCachedResult(
	net *libcni.NetworkConfig,
	rt *libcni.RuntimeConf,
) (types.Result, error)

func (*MockCNI) GetNetworkListCachedConfig

func (m *MockCNI) GetNetworkListCachedConfig(
	net *libcni.NetworkConfigList,
	rt *libcni.RuntimeConf,
) ([]byte, *libcni.RuntimeConf, error)

func (*MockCNI) GetNetworkListCachedResult

func (m *MockCNI) GetNetworkListCachedResult(
	net *libcni.NetworkConfigList,
	rt *libcni.RuntimeConf,
) (types.Result, error)

func (*MockCNI) ValidateNetwork

func (m *MockCNI) ValidateNetwork(
	ctx context.Context,
	net *libcni.NetworkConfig,
) ([]string, error)

func (*MockCNI) ValidateNetworkList

func (m *MockCNI) ValidateNetworkList(
	ctx context.Context,
	net *libcni.NetworkConfigList,
) ([]string, error)

Jump to

Keyboard shortcuts

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