2018-02-05 21:05:59 +00:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2018-01-21 00:30:26 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/docker/docker/api/types/network"
|
|
|
|
"github.com/docker/docker/errdefs"
|
2020-02-07 13:39:24 +00:00
|
|
|
"gotest.tools/v3/assert"
|
2018-01-21 00:30:26 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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)
|
2018-03-13 19:28:34 +00:00
|
|
|
assert.Check(t, errdefs.IsInvalidParameter(err))
|
2018-01-21 00:30:26 +00:00
|
|
|
}
|