server: add inspect unit test

The inspect endpoint is used mainly in the CRI-O cAdvisor handler.
Let's make sure we don't break it by adding some trivial unit tests.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-09-12 12:17:44 +02:00
parent 400713a58b
commit e26e48ec87
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9
6 changed files with 332 additions and 54 deletions

View file

@ -233,3 +233,10 @@ func (c *Container) SetMountPoint(mp string) {
func (c *Container) MountPoint() string {
return c.mountPoint
}
// SetState sets the conainer state
//
// XXX: DO NOT EVER USE THIS, THIS IS JUST USEFUL FOR MOCKING!!!
func (c *Container) SetState(state *ContainerState) {
c.state = state
}