MCPcopy Create free account
hub / github.com/Mirantis/cri-dockerd / makeContainerConfig

Function makeContainerConfig

core/container_test.go:42–57  ·  view source on GitHub ↗

A helper to create a basic config.

(
	sConfig *runtimeapi.PodSandboxConfig,
	name, image string,
	attempt uint32,
	labels, annotations map[string]string,
)

Source from the content-addressed store, hash-verified

40
41// A helper to create a basic config.
42func makeContainerConfig(
43 sConfig *runtimeapi.PodSandboxConfig,
44 name, image string,
45 attempt uint32,
46 labels, annotations map[string]string,
47) *runtimeapi.ContainerConfig {
48 return &runtimeapi.ContainerConfig{
49 Metadata: &runtimeapi.ContainerMetadata{
50 Name: name,
51 Attempt: attempt,
52 },
53 Image: &runtimeapi.ImageSpec{Image: image},
54 Labels: labels,
55 Annotations: annotations,
56 }
57}
58
59func getTestCTX() context.Context {
60 return context.Background()

Callers 5

TestListContainersFunction · 0.85
TestContainerStatusFunction · 0.85
TestContainerLogPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…