|
|
|
@ -18,10 +18,10 @@ func TestSegments(t *testing.T) {
|
|
|
|
|
args: []string{ |
|
|
|
|
`-data-dir=` + dataDir, |
|
|
|
|
}, |
|
|
|
|
json: []string{`{ "server": true, "segment": "a" }`}, |
|
|
|
|
hcl: []string{` server = true segment = "a" `}, |
|
|
|
|
err: `Network segments are not supported in this version of Consul`, |
|
|
|
|
warns: []string{ |
|
|
|
|
json: []string{`{ "server": true, "segment": "a" }`}, |
|
|
|
|
hcl: []string{` server = true segment = "a" `}, |
|
|
|
|
expectedErr: `Network segments are not supported in this version of Consul`, |
|
|
|
|
expectedWarnings: []string{ |
|
|
|
|
enterpriseConfigKeyError{key: "segment"}.Error(), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
@ -30,10 +30,10 @@ func TestSegments(t *testing.T) {
|
|
|
|
|
args: []string{ |
|
|
|
|
`-data-dir=` + dataDir, |
|
|
|
|
}, |
|
|
|
|
json: []string{`{ "segments":[{ "name":"x" }] }`}, |
|
|
|
|
hcl: []string{`segments = [{ name = "x" }]`}, |
|
|
|
|
err: `Port for segment "x" cannot be <= 0`, |
|
|
|
|
warns: []string{ |
|
|
|
|
json: []string{`{ "segments":[{ "name":"x" }] }`}, |
|
|
|
|
hcl: []string{`segments = [{ name = "x" }]`}, |
|
|
|
|
expectedErr: `Port for segment "x" cannot be <= 0`, |
|
|
|
|
expectedWarnings: []string{ |
|
|
|
|
enterpriseConfigKeyError{key: "segments"}.Error(), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
@ -42,10 +42,10 @@ func TestSegments(t *testing.T) {
|
|
|
|
|
args: []string{ |
|
|
|
|
`-data-dir=` + dataDir, |
|
|
|
|
}, |
|
|
|
|
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`, |
|
|
|
|
warns: []string{ |
|
|
|
|
json: []string{`{ "segments":[{ "name":"x", "port": 123 }] }`}, |
|
|
|
|
hcl: []string{`segments = [{ name = "x" port = 123 }]`}, |
|
|
|
|
expectedErr: `Network segments are not supported in this version of Consul`, |
|
|
|
|
expectedWarnings: []string{ |
|
|
|
|
enterpriseConfigKeyError{key: "segments"}.Error(), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|