moby/opts/address_pools_test.go
Sebastiaan van Stijn 091991606a
opts: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:49 +02:00

19 lines
427 B
Go

package opts // import "github.com/docker/docker/opts"
import (
"testing"
)
func TestAddressPoolOpt(t *testing.T) {
poolopt := &PoolsOpt{}
addresspool := "base=175.30.0.0/16,size=16"
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)
}
}