fix mocks

This commit is contained in:
Megan Marsh 2019-03-28 16:55:35 -07:00
parent 70150ffa0f
commit 0860edeed8
1 changed files with 10 additions and 0 deletions

View File

@ -28,6 +28,10 @@ type MockDriver struct {
IPAddressResult string IPAddressResult string
IPAddressErr error IPAddressErr error
KillCalled bool
KillID string
KillError error
LoginCalled bool LoginCalled bool
LoginUsername string LoginUsername string
LoginPassword string LoginPassword string
@ -160,6 +164,12 @@ func (d *MockDriver) StartContainer(config *ContainerConfig) (string, error) {
return d.StartID, d.StartError return d.StartID, d.StartError
} }
func (d *MockDriver) KillContainer(id string) error {
d.KillCalled = true
d.KillID = id
return d.KillError
}
func (d *MockDriver) StopContainer(id string) error { func (d *MockDriver) StopContainer(id string) error {
d.StopCalled = true d.StopCalled = true
d.StopID = id d.StopID = id