integration-cli/daemon_swarm_hack_test.go
e5ec575b
 package main
 
48de91a3
 import (
59e55dcd
 	"testing"
 
48de91a3
 	"github.com/docker/docker/integration-cli/daemon"
 )
e5ec575b
 
1d92789b
 func (s *DockerSwarmSuite) getDaemon(c *testing.T, nodeID string) *daemon.Daemon {
e5ec575b
 	s.daemonsLock.Lock()
 	defer s.daemonsLock.Unlock()
 	for _, d := range s.daemons {
83d18cf4
 		if d.NodeID() == nodeID {
e5ec575b
 			return d
 		}
 	}
 	c.Fatalf("could not find node with id: %s", nodeID)
 	return nil
 }
 
 // nodeCmd executes a command on a given node via the normal docker socket
1d92789b
 func (s *DockerSwarmSuite) nodeCmd(c *testing.T, id string, args ...string) (string, error) {
c0d2f7b3
 	return s.getDaemon(c, id).Cmd(args...)
e5ec575b
 }