config: rename testCase fields

So that their name better reflects their purpose
This commit is contained in:
Daniel Nephin 2020-12-21 19:10:01 -05:00
parent e6badb3129
commit 005702e098
2 changed files with 337 additions and 337 deletions

File diff suppressed because it is too large Load Diff

View File

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