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"
|
2020-02-07 08:39:24 -05:00
|
|
|
"gotest.tools/v3/assert"
|
2018-01-20 19:30:26 -05: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 15:28:34 -04:00
|
|
|
assert.Check(t, errdefs.IsInvalidParameter(err))
|
2018-01-20 19:30:26 -05:00
|
|
|
}
|