fix test case per refactoring

Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
This commit is contained in:
Chanwit Kaewkasi 2015-04-10 01:23:34 +07:00
parent 1fd19c41ef
commit 8bac536980
1 changed files with 15 additions and 17 deletions

View File

@ -278,24 +278,24 @@ func TestPortFilterRandomAssignment(t *testing.T) {
func TestPortFilterForHostMode(t *testing.T) { func TestPortFilterForHostMode(t *testing.T) {
var ( var (
p = PortFilter{} p = PortFilter{}
nodes = []cluster.Node{ nodes = []*node.Node{
&FakeNode{ {
id: "node-1-id", ID: "node-1-id",
name: "node-1-name", Name: "node-1-name",
addr: "node-1", Addr: "node-1",
}, },
&FakeNode{ {
id: "node-2-id", ID: "node-2-id",
name: "node-2-name", Name: "node-2-name",
addr: "node-2", Addr: "node-2",
}, },
&FakeNode{ {
id: "node-3-id", ID: "node-3-id",
name: "node-3-name", Name: "node-3-name",
addr: "node-3", Addr: "node-3",
}, },
} }
result []cluster.Node result []*node.Node
err error err error
) )
@ -312,9 +312,7 @@ func TestPortFilterForHostMode(t *testing.T) {
}, },
} }
if n, ok := nodes[0].(*FakeNode); ok { assert.NoError(t, nodes[0].AddContainer(container))
assert.NoError(t, n.AddContainer(container))
}
// Request port 80 in the host mode // Request port 80 in the host mode
config := &dockerclient.ContainerConfig{ config := &dockerclient.ContainerConfig{