2018-02-05 16:05:59 -05:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2018-01-20 19:30:26 -05:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/docker/docker/api/types/network"
|
|
|
|
"github.com/docker/docker/errdefs"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Test case for 35752
|
|
|
|
func TestVerifyNetworkingConfig(t *testing.T) {
|
|
|
|
name := "mynet"
|
|
|
|
endpoints := make(map[string]*network.EndpointSettings, 1)
|
|
|
|
endpoints[name] = nil
|
|
|
|
nwConfig := &network.NetworkingConfig{
|
|
|
|
EndpointsConfig: endpoints,
|
|
|
|
}
|
|
|
|
err := verifyNetworkingConfig(nwConfig)
|
|
|
|
assert.True(t, errdefs.IsInvalidParameter(err))
|
|
|
|
}
|