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

Function sanityCheck

integration/tests/api/docker_test.go:38–41  ·  view source on GitHub ↗

Sanity check the container by: - Checking that the specified alias is a valid one for this container. - Verifying that stats are not empty.

(alias string, containerInfo info.ContainerInfo, t *testing.T)

Source from the content-addressed store, hash-verified

36// - Checking that the specified alias is a valid one for this container.
37// - Verifying that stats are not empty.
38func sanityCheck(alias string, containerInfo info.ContainerInfo, t *testing.T) {
39 assert.Contains(t, containerInfo.Aliases, alias, "Alias %q should be in list of aliases %v", alias, containerInfo.Aliases)
40 assert.NotEmpty(t, containerInfo.Stats, "Expected container to have stats")
41}
42
43// Sanity check the container by:
44// - Checking that the specified alias is a valid one for this container.

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…