Sanity check the container by: - Checking that the specified ID is a valid alias for this container. - Verifying that stats are not empty.
(containerID string, containerInfo info.ContainerInfo, t *testing.T)
| 70 | // - Checking that the specified ID is a valid alias for this container. |
| 71 | // - Verifying that stats are not empty. |
| 72 | func sanityCheckContainerd(containerID string, containerInfo info.ContainerInfo, t *testing.T) { |
| 73 | assert.Contains(t, containerInfo.Aliases, containerID, "Alias %q should be in list of aliases %v", containerID, containerInfo.Aliases) |
| 74 | assert.NotEmpty(t, containerInfo.Stats, "Expected container to have stats") |
| 75 | } |
| 76 | |
| 77 | // findContainerdContainer finds a container by ID in the list of containers. |
| 78 | func findContainerdContainer(containerID string, containers []info.ContainerInfo) *info.ContainerInfo { |
no outgoing calls
no test coverage detected
searching dependent graphs…