moby/opts/address_pools_test.go
Alessandro Boch 173b3c364e Allow user to control the default address pools
- Via daemon flag --default-address-pools base=<CIDR>,size=<int>

Signed-off-by: Elango Siva  <elango@docker.com>
2018-04-30 11:14:08 -04:00

20 lines
434 B
Go

package opts // import "github.com/docker/docker/opts"
import (
"testing"
)
func TestAddressPoolOpt(t *testing.T) {
poolopt := &PoolsOpt{}
var addresspool = "base=175.30.0.0/16,size=16"
var invalidAddresspoolString = "base=175.30.0.0/16,size=16, base=175.33.0.0/16,size=24"
if err := poolopt.Set(addresspool); err != nil {
t.Fatal(err)
}
if err := poolopt.Set(invalidAddresspoolString); err == nil {
t.Fatal(err)
}
}