|
|
|
@ -3,7 +3,6 @@
|
|
|
|
|
package config |
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
"net" |
|
|
|
|
"os" |
|
|
|
|
"testing" |
|
|
|
|
|
|
|
|
@ -23,9 +22,6 @@ func TestSegments(t *testing.T) {
|
|
|
|
|
json: []string{`{ "server": true, "segment": "a" }`}, |
|
|
|
|
hcl: []string{` server = true segment = "a" `}, |
|
|
|
|
err: `Network segments are not supported in this version of Consul`, |
|
|
|
|
privatev4: func() ([]*net.IPAddr, error) { |
|
|
|
|
return []*net.IPAddr{ipAddr("10.0.0.1")}, nil |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
desc: "segment port must be set", |
|
|
|
@ -44,9 +40,6 @@ func TestSegments(t *testing.T) {
|
|
|
|
|
json: []string{`{ "segments":[{ "name":"x", "port": 123 }] }`}, |
|
|
|
|
hcl: []string{`segments = [{ name = "x" port = 123 }]`}, |
|
|
|
|
err: `Network segments are not supported in this version of Consul`, |
|
|
|
|
privatev4: func() ([]*net.IPAddr, error) { |
|
|
|
|
return []*net.IPAddr{ipAddr("10.0.0.1")}, nil |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|