func destroyAllContainers(client client.Client) { containers, err := client.Containers(nil) Ω(err).ShouldNot(HaveOccurred(), "Error while listing containers") for _, container := range containers { err = client.Destroy(container.Handle()) Ω(err).ShouldNot(HaveOccurred(), fmt.Sprintf("Error while destroying container %+v", container.Handle())) } }