Documentation ¶
Index ¶
Constants ¶
View Source
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" // InvalidRuntimeClass is an invalid RuntimeClass pre-populated in the populated dynamic client. InvalidRuntimeClass = "foo" )
Variables ¶
This section is empty.
Functions ¶
func NewPopulatedDynamicClient ¶
NewPopulatedDynamicClient creates a dynamic client for use with the runtimeclass.Manager, and populates it with a few test RuntimeClass objects.
func NewUnstructuredRuntimeClass ¶
func NewUnstructuredRuntimeClass(name, handler string) *unstructured.Unstructured
NewUnstructuredRuntimeClass is a helper to generate an unstructured RuntimeClass resource with the given name & handler.
func StartManagerSync ¶
func StartManagerSync(t *testing.T, m *runtimeclass.Manager) func()
StartManagerSync runs the manager, and waits for startup by polling for the expected "native" RuntimeClass to be populated. Returns a function to stop the manager, which should be called with a defer:
defer StartManagerSync(t, m)()
Any errors are considered fatal to the test.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.