Fix a problem where if a minion went missing, we still thought the pod was running.

Also convert some tests to table driven.
This commit is contained in:
Brendan Burns
2014-09-17 15:26:01 -07:00
parent ac8ee45f4f
commit 99586b4da4
4 changed files with 141 additions and 73 deletions

View File

@@ -37,6 +37,7 @@ type Fake struct {
Ctrl api.ReplicationController
ServiceList api.ServiceList
EndpointsList api.EndpointsList
Minions api.MinionList
Err error
Watch watch.Interface
}
@@ -144,5 +145,5 @@ func (c *Fake) ServerVersion() (*version.Info, error) {
func (c *Fake) ListMinions() (*api.MinionList, error) {
c.Actions = append(c.Actions, FakeAction{Action: "list-minions", Value: nil})
return &api.MinionList{}, nil
return &c.Minions, nil
}