From c5a66caf93939fb23ec1ab7c0b364e233c673113 Mon Sep 17 00:00:00 2001 From: chchliang Date: Thu, 9 Feb 2017 11:26:20 +0800 Subject: [PATCH] add test case check connect.EndpointConfig not nil Signed-off-by: chchliang --- network_connect_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/network_connect_test.go b/network_connect_test.go index d472f4520c..91b1a76676 100644 --- a/network_connect_test.go +++ b/network_connect_test.go @@ -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) }