Files
virtual-kubelet/vendor/github.com/vmware/vic/tests/test-cases/Group1-Docker-Commands/1-39-Docker-Stats.md
Loc Nguyen 513cebe7b7 VMware vSphere Integrated Containers provider (#206)
* Add Virtual Kubelet provider for VIC

Initial virtual kubelet provider for VMware VIC.  This provider currently
handles creating and starting of a pod VM via the VIC portlayer and persona
server.  Image store handling via the VIC persona server.  This provider
currently requires the feature/wolfpack branch of VIC.

* Added pod stop and delete.  Also added node capacity.

Added the ability to stop and delete pod VMs via VIC.  Also retrieve
node capacity information from the VCH.

* Cleanup and readme file

Some file clean up and added a Readme.md markdown file for the VIC
provider.

* Cleaned up errors, added function comments, moved operation code

1. Cleaned up error handling.  Set standard for creating errors.
2. Added method prototype comments for all interface functions.
3. Moved PodCreator, PodStarter, PodStopper, and PodDeleter to a new folder.

* Add mocking code and unit tests for podcache, podcreator, and podstarter

Used the unit test framework used in VIC to handle assertions in the provider's
unit test.  Mocking code generated using OSS project mockery, which is compatible
with the testify assertion framework.

* Vendored packages for the VIC provider

Requires feature/wolfpack branch of VIC and a few specific commit sha of
projects used within VIC.

* Implementation of POD Stopper and Deleter unit tests (#4)

* Updated files for initial PR
2018-06-04 15:41:32 -07:00

1.4 KiB

Test 1-39 - Docker Stats

Purpose:

To verify that docker stats is supported and works as expected.

Environment:

This test requires that a vSphere server is running and available

Test Steps:

  1. Run a busybox container and create a busybox container
  2. Run Stats no-stream for running container
  3. Run Stats with no-stream all which will return stats for running and stopped containers
  4. Verify the API memory output against govc
  5. Verify the API CPU output
  6. Run Stats with no-stream for a non-existent container
  7. Run Stats with no-stream for a stopped container
  8. Verify basic API network and disk output

Expected Outcome:

  1. Fails if two containers are not created
  2. Return stats for a running container and validate memory -- will fail if there is a variation of greater than 5%
  3. Return stats for all containers -- will fail if output is missing either container
  4. Compare API results vs. govc result for memory accuracy -- will fail if variation greater than 1000 bytes
  5. Verify that CPU fields are present - fails if missing
  6. Failure with error message
  7. Output should include the stopped container short id
  8. Fails if either the default network or disk are missing

Possible Problems:

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.