mirror of https://github.com/docker/cli.git
Merge pull request #30851 from chchliang/networktest
add testcase check connect.EndpointConfig not nil
This commit is contained in:
commit
d0602ae8d8
|
@ -87,6 +87,10 @@ func TestNetworkConnect(t *testing.T) {
|
||||||
return nil, fmt.Errorf("expected 'container_id', got %s", connect.Container)
|
return nil, fmt.Errorf("expected 'container_id', got %s", connect.Container)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if connect.EndpointConfig == nil {
|
||||||
|
return nil, fmt.Errorf("expected connect.EndpointConfig to be not nil, got %v", connect.EndpointConfig)
|
||||||
|
}
|
||||||
|
|
||||||
if connect.EndpointConfig.NetworkID != "NetworkID" {
|
if connect.EndpointConfig.NetworkID != "NetworkID" {
|
||||||
return nil, fmt.Errorf("expected 'NetworkID', got %s", connect.EndpointConfig.NetworkID)
|
return nil, fmt.Errorf("expected 'NetworkID', got %s", connect.EndpointConfig.NetworkID)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue