MCPcopy
hub / github.com/google/cadvisor / TestDockerContainerById

Function TestDockerContainerById

integration/tests/api/docker_test.go:70–86  ·  view source on GitHub ↗

A Docker container in /docker/

(t *testing.T)

Source from the content-addressed store, hash-verified

68
69// A Docker container in /docker/<ID>
70func TestDockerContainerById(t *testing.T) {
71 fm := framework.New(t)
72 defer fm.Cleanup()
73
74 containerID := fm.Docker().RunPause()
75
76 // Wait for the container to show up.
77 waitForContainer(containerID, fm)
78
79 request := &info.ContainerInfoRequest{
80 NumStats: 1,
81 }
82 containerInfo, err := fm.Cadvisor().Client().DockerContainer(containerID, request)
83 require.NoError(t, err)
84
85 sanityCheck(containerID, containerInfo, t)
86}
87
88// A Docker container in /docker/<name>
89func TestDockerContainerByName(t *testing.T) {

Callers

nothing calls this directly

Calls 9

NewFunction · 0.92
waitForContainerFunction · 0.85
sanityCheckFunction · 0.70
CleanupMethod · 0.65
RunPauseMethod · 0.65
DockerMethod · 0.65
DockerContainerMethod · 0.65
ClientMethod · 0.65
CadvisorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…