To verify that docker stats
is supported and works as expected.
This test requires that a vSphere server is running and available
- Run a busybox container and create a busybox container
- Run Stats no-stream for running container
- Run Stats with no-stream all which will return stats for running and stopped containers
- Verify the API memory output against govc
- Verify the API CPU output
- Run Stats with no-stream for a non-existent container
- Run Stats with no-stream for a stopped container
- Verify basic API network and disk output
- Fails if two containers are not created
- Return stats for a running container and validate memory -- will fail if there is a variation of greater than 5%
- Return stats for all containers -- will fail if output is missing either container
- Compare API results vs. govc result for memory accuracy -- will fail if variation greater than 1000 bytes
- Verify that CPU fields are present - fails if missing
- Failure with error message
- Output should include the stopped container short id
- Fails if either the default network or disk are missing
Stats are created by the ESXi host every 20s -- if there are long pauses between calls in a single test the results could be incorrect and a failure could occur.