enginetest

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRuntime

type MockRuntime struct {
	Created map[string]runtime.SandboxConfig
	Started map[string]bool
	Stopped map[string]bool
	Removed map[string]bool
	ExecFn  func(ctx context.Context, id string, opts runtime.ExecOpts) (*runtime.ExecResult, error)
}

MockRuntime implements runtime.Runtime for testing.

func NewMockRuntime

func NewMockRuntime() *MockRuntime

NewMockRuntime creates a new MockRuntime.

func (*MockRuntime) Create

func (m *MockRuntime) Create(ctx context.Context, id string, cfg runtime.SandboxConfig) error

func (*MockRuntime) Exec

func (*MockRuntime) ExecStream

func (m *MockRuntime) ExecStream(ctx context.Context, id string, opts runtime.ExecOpts) (runtime.ExecStream, error)

func (*MockRuntime) Info

func (m *MockRuntime) Info(ctx context.Context, id string) (*runtime.SandboxInfo, error)

func (*MockRuntime) List

func (m *MockRuntime) List(ctx context.Context) ([]runtime.SandboxInfo, error)

func (*MockRuntime) ListDir

func (m *MockRuntime) ListDir(ctx context.Context, id string, path string) ([]runtime.FileInfo, error)

func (*MockRuntime) ListSnapshots

func (m *MockRuntime) ListSnapshots(ctx context.Context, sandboxID string) ([]runtime.SnapshotInfo, error)

func (*MockRuntime) MkDir

func (m *MockRuntime) MkDir(ctx context.Context, id string, path string) error

func (*MockRuntime) Ping

func (m *MockRuntime) Ping(ctx context.Context) error

func (*MockRuntime) ReadFile

func (m *MockRuntime) ReadFile(ctx context.Context, id string, path string) ([]byte, error)

func (*MockRuntime) Remove

func (m *MockRuntime) Remove(ctx context.Context, id string) error

func (*MockRuntime) RemoveFile

func (m *MockRuntime) RemoveFile(ctx context.Context, id string, path string) error

func (*MockRuntime) RemoveSnapshot

func (m *MockRuntime) RemoveSnapshot(ctx context.Context, snapshotID string) error

func (*MockRuntime) Restore

func (m *MockRuntime) Restore(ctx context.Context, snapshotID string) (string, error)

func (*MockRuntime) Snapshot

func (m *MockRuntime) Snapshot(ctx context.Context, id string, name string) (*runtime.SnapshotInfo, error)

func (*MockRuntime) Start

func (m *MockRuntime) Start(ctx context.Context, id string) error

func (*MockRuntime) Stats

func (m *MockRuntime) Stats(ctx context.Context, id string) (*runtime.SandboxStats, error)

func (*MockRuntime) Stop

func (m *MockRuntime) Stop(ctx context.Context, id string, timeout time.Duration) error

func (*MockRuntime) WriteFile

func (m *MockRuntime) WriteFile(ctx context.Context, id string, path string, content []byte) error

Jump to

Keyboard shortcuts

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