mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
[TEST] Storage: check MergeQuerier with nil primary
This test fails on current code. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
677cdcdcec
commit
0ae881739b
|
@ -1504,6 +1504,25 @@ func TestMergeQuerierWithSecondaries_ErrorHandling(t *testing.T) {
|
||||||
},
|
},
|
||||||
expectedErrs: [4]error{errStorage, errStorage, errStorage, errStorage},
|
expectedErrs: [4]error{errStorage, errStorage, errStorage, errStorage},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "nil primary querier with failed secondary",
|
||||||
|
primaries: nil,
|
||||||
|
secondaries: []Querier{
|
||||||
|
&mockQuerier{resp: []string{"b"}, warnings: nil, err: errStorage},
|
||||||
|
},
|
||||||
|
expectedLabels: []string{},
|
||||||
|
expectedWarnings: annotations.New().Add(errStorage),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "nil primary querier with two failed secondaries",
|
||||||
|
primaries: nil,
|
||||||
|
secondaries: []Querier{
|
||||||
|
&mockQuerier{resp: []string{"b"}, warnings: nil, err: errStorage},
|
||||||
|
&mockQuerier{resp: []string{"c"}, warnings: nil, err: errStorage},
|
||||||
|
},
|
||||||
|
expectedLabels: []string{},
|
||||||
|
expectedWarnings: annotations.New().Add(errStorage),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "one successful primary querier with failed secondaries",
|
name: "one successful primary querier with failed secondaries",
|
||||||
primaries: []Querier{
|
primaries: []Querier{
|
||||||
|
|
Loading…
Reference in a new issue