add test case check connect.EndpointConfig not nil
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn> Upstream-commit: fd74940304c86e43d8e8d44d0d8315086d5596c4 Component: engine
This commit is contained in:
@@ -87,6 +87,10 @@ func TestNetworkConnect(t *testing.T) {
|
||||
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" {
|
||||
return nil, fmt.Errorf("expected 'NetworkID', got %s", connect.EndpointConfig.NetworkID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user