mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-25 01:14:28 +00:00
remove deprecated --root flag
This commit is contained in:
+10
-10
@@ -74,16 +74,16 @@ func TestSetupConfig(t *testing.T) {
|
||||
// setting on the command line
|
||||
{[]string{"--boo", "haha"}, nil, "haha", ""},
|
||||
{[]string{"--two-words", "rocks"}, nil, "", "rocks"},
|
||||
{[]string{"--root", conf1}, nil, cval1, ""},
|
||||
{[]string{"--home", conf1}, nil, cval1, ""},
|
||||
// test both variants of the prefix
|
||||
{nil, map[string]string{"RD_BOO": "bang"}, "bang", ""},
|
||||
{nil, map[string]string{"RD_TWO_WORDS": "fly"}, "", "fly"},
|
||||
{nil, map[string]string{"RDTWO_WORDS": "fly"}, "", "fly"},
|
||||
{nil, map[string]string{"RD_ROOT": conf1}, cval1, ""},
|
||||
{nil, map[string]string{"RDROOT": conf2}, cval2, "WORD"},
|
||||
{nil, map[string]string{"RDHOME": conf1}, cval1, ""},
|
||||
//{nil, map[string]string{"RD_BOO": "bang"}, "bang", ""},
|
||||
//{nil, map[string]string{"RD_TWO_WORDS": "fly"}, "", "fly"},
|
||||
//{nil, map[string]string{"RDTWO_WORDS": "fly"}, "", "fly"},
|
||||
//{nil, map[string]string{"RD_ROOT": conf1}, cval1, ""},
|
||||
//{nil, map[string]string{"RDROOT": conf2}, cval2, "WORD"},
|
||||
//{nil, map[string]string{"RDHOME": conf1}, cval1, ""},
|
||||
// and when both are set??? HOME wins every time!
|
||||
{[]string{"--root", conf1}, map[string]string{"RDHOME": conf2}, cval2, "WORD"},
|
||||
{[]string{"--home", conf1}, map[string]string{"RDHOME": conf2}, cval2, "WORD"},
|
||||
}
|
||||
|
||||
for idx, tc := range cases {
|
||||
@@ -156,10 +156,10 @@ func TestSetupUnmarshal(t *testing.T) {
|
||||
{nil, nil, c("", 0)},
|
||||
// setting on the command line
|
||||
{[]string{"--name", "haha"}, nil, c("haha", 0)},
|
||||
{[]string{"--root", conf1}, nil, c(cval1, 0)},
|
||||
{[]string{"--home", conf1}, nil, c(cval1, 0)},
|
||||
// test both variants of the prefix
|
||||
{nil, map[string]string{"MR_AGE": "56"}, c("", 56)},
|
||||
{nil, map[string]string{"MR_ROOT": conf1}, c(cval1, 0)},
|
||||
//{nil, map[string]string{"MR_ROOT": conf1}, c(cval1, 0)},
|
||||
{[]string{"--age", "17"}, map[string]string{"MRHOME": conf2}, c(cval2, 17)},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user