Add api helpers to internal/test/daemon.Daemon

Porting helpers from `integration-cli/daemon.Daemon` to this struct
and use the API instead of the cli.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-04-11 15:52:13 +02:00
parent 648ae4979e
commit 9722214c8a
7 changed files with 45 additions and 37 deletions

View File

@@ -556,7 +556,7 @@ func (s *DockerSwarmSuite) TestAPISwarmServicesStateReporting(c *check.C) {
getContainers := func() map[string]*daemon.Daemon {
m := make(map[string]*daemon.Daemon)
for _, d := range []*daemon.Daemon{d1, d2, d3} {
for _, id := range d.ActiveContainers() {
for _, id := range d.ActiveContainers(c) {
m[id] = d
}
}