package testing
import "k8s.io/kubernetes/pkg/kubelet/runtimeclass/testing"
Index ¶
- Constants
- func NewPopulatedClient() clientset.Interface
- func NewRuntimeClass(name, handler string) *nodev1.RuntimeClass
- func StartManagerSync(m *runtimeclass.Manager) func()
Constants ¶
const ( // SandboxRuntimeClass is a valid RuntimeClass pre-populated in the populated dynamic client. SandboxRuntimeClass = "sandbox" // SandboxRuntimeHandler is the handler associated with the SandboxRuntimeClass. SandboxRuntimeHandler = "kata-containers" // EmptyRuntimeClass is a valid RuntimeClass without a handler pre-populated in the populated dynamic client. EmptyRuntimeClass = "native" )
Functions ¶
func NewPopulatedClient ¶
NewPopulatedClient creates a fake client for use with the runtimeclass.Manager, and populates it with a few test RuntimeClass objects.
func NewRuntimeClass ¶
func NewRuntimeClass(name, handler string) *nodev1.RuntimeClass
NewRuntimeClass is a helper to generate a RuntimeClass resource with the given name & handler.
func StartManagerSync ¶
func StartManagerSync(m *runtimeclass.Manager) func()
StartManagerSync starts the manager, and waits for the informer cache to sync. Returns a function to stop the manager, which should be called with a defer:
defer StartManagerSync(t, m)()
Source Files ¶
fake_manager.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 3 hours ago –
Tools for package owners.