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"
|
2018-03-13 15:28:34 -04:00
|
|
|
"github.com/gotestyourself/gotestyourself/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
|
|
|
}
|