Remove container data return value from Join

Now that Endpoint interface has the Info method there is no
need to return container data as a return value in the Join
method. Removed the return value and fixed all the callers.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
Jana Radhakrishnan
2015-05-29 20:11:02 +00:00
parent a2f46f9996
commit 39cf9597d0
7 changed files with 43 additions and 55 deletions
+3 -11
View File
@@ -46,14 +46,6 @@ func i2e(i interface{}) *endpointResource {
return s
}
func i2c(i interface{}) *libnetwork.ContainerData {
s, ok := i.(*libnetwork.ContainerData)
if !ok {
panic(fmt.Sprintf("Failed i2c for %v", i))
}
return s
}
func i2eL(i interface{}) []*endpointResource {
s, ok := i.([]*endpointResource)
if !ok {
@@ -803,13 +795,13 @@ func TestJoinLeave(t *testing.T) {
}
vars[urlEpName] = "endpoint"
cdi, errRsp := procJoinEndpoint(c, vars, jlb)
key, errRsp := procJoinEndpoint(c, vars, jlb)
if errRsp != &successResponse {
t.Fatalf("Expected failure, got: %v", errRsp)
}
cd := i2c(cdi)
if cd.SandboxKey == "" {
keyStr := i2s(key)
if keyStr == "" {
t.Fatalf("Empty sandbox key")
}
_, errRsp = procDeleteEndpoint(c, vars, nil)