func shutdownMachines(manager container.Manager) func(*gc.C) { return func(c *gc.C) { instances, err := manager.ListContainers() c.Assert(err, jc.ErrorIsNil) for _, instance := range instances { err := manager.DestroyContainer(instance.Id()) c.Check(err, jc.ErrorIsNil) } } }
func assertNumberOfContainers(c *gc.C, manager container.Manager, count int) { containers, err := manager.ListContainers() c.Assert(err, jc.ErrorIsNil) c.Assert(containers, gc.HasLen, count) }