GetForSession now expects a *types.Session instead of a string
This commit is contained in:
@@ -32,6 +32,7 @@ func TestCheckSwarmPorts_RunWhenManager(t *testing.T) {
|
||||
IP: "10.0.0.1",
|
||||
Name: "aaaabbbb_node1",
|
||||
SessionId: "aaaabbbbcccc",
|
||||
Hostname: "node1",
|
||||
}
|
||||
info := dockerTypes.Info{
|
||||
Swarm: swarm.Info{
|
||||
@@ -43,7 +44,7 @@ func TestCheckSwarmPorts_RunWhenManager(t *testing.T) {
|
||||
f.On("GetForInstance", i).Return(d, nil)
|
||||
d.On("GetDaemonInfo").Return(info, nil)
|
||||
d.On("GetSwarmPorts").Return([]string{"node1", "node2"}, []uint16{8080, 9090}, nil)
|
||||
e.M.On("Emit", CheckSwarmPortsEvent, "aaaabbbbcccc", []interface{}{DockerSwarmPorts{Manager: i.Name, Instances: []string{i.Name, "aaaabbbb_node2"}, Ports: []int{8080, 9090}}}).Return()
|
||||
e.M.On("Emit", CheckSwarmPortsEvent, "aaaabbbbcccc", []interface{}{DockerSwarmPorts{Manager: i.Name, Instances: []string{i.Hostname, "node2"}, Ports: []int{8080, 9090}}}).Return()
|
||||
|
||||
task := NewCheckSwarmPorts(e, f)
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user