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