package testing
import "github.com/containerd/containerd/pkg/cri/server/testing"
Index ¶
- type FakeCNIPlugin
- func NewFakeCNIPlugin() *FakeCNIPlugin
- func (f *FakeCNIPlugin) Check(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) error
- func (f *FakeCNIPlugin) GetConfig() *cni.ConfigResult
- func (f *FakeCNIPlugin) Load(opts ...cni.Opt) error
- func (f *FakeCNIPlugin) Remove(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) error
- func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error)
- func (f *FakeCNIPlugin) SetupSerially(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error)
- func (f *FakeCNIPlugin) Status() error
Types ¶
type FakeCNIPlugin ¶
FakeCNIPlugin is a fake plugin used for test.
func NewFakeCNIPlugin ¶
func NewFakeCNIPlugin() *FakeCNIPlugin
NewFakeCNIPlugin create a FakeCNIPlugin.
func (*FakeCNIPlugin) Check ¶
func (f *FakeCNIPlugin) Check(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) error
Check the network of PodSandbox.
func (*FakeCNIPlugin) GetConfig ¶
func (f *FakeCNIPlugin) GetConfig() *cni.ConfigResult
GetConfig returns a copy of the CNI plugin configurations as parsed by CNI
func (*FakeCNIPlugin) Load ¶
func (f *FakeCNIPlugin) Load(opts ...cni.Opt) error
Load loads the network config.
func (*FakeCNIPlugin) Remove ¶
func (f *FakeCNIPlugin) Remove(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) error
Remove teardown the network of PodSandbox.
func (*FakeCNIPlugin) Setup ¶
func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error)
Setup setups the network of PodSandbox.
func (*FakeCNIPlugin) SetupSerially ¶
func (f *FakeCNIPlugin) SetupSerially(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error)
SetupSerially sets up the network of PodSandbox without doing the interfaces in parallel.
func (*FakeCNIPlugin) Status ¶
func (f *FakeCNIPlugin) Status() error
Status get the status of the plugin.
Source Files ¶
- Version
- v1.7.0-rc.2
- Published
- Mar 7, 2023
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 10 minutes ago –
Tools for package owners.