mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
lib/storage: verify that the tsidsFound contain the needed tsids in tests added at f4dead529f
This commit is contained in:
parent
5aaaa686a4
commit
6d6cf1b6e0
1 changed files with 6 additions and 0 deletions
|
@ -932,6 +932,9 @@ func testIndexDBCheckTSIDByName(db *indexDB, mns []MetricName, tsids []TSID, isC
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot search with a filter matching empty tag: %w", err)
|
return fmt.Errorf("cannot search with a filter matching empty tag: %w", err)
|
||||||
}
|
}
|
||||||
|
if !testHasTSID(tsidsFound, tsid) {
|
||||||
|
return fmt.Errorf("tsids is missing when matching a filter with empty tag tsidsFound\ntsid=%+v\ntsidsFound=%+v\ntfs=%s\nmn=%s", tsid, tsidsFound, tfs, mn)
|
||||||
|
}
|
||||||
|
|
||||||
// Search with filters matching empty tags (multiple filters)
|
// Search with filters matching empty tags (multiple filters)
|
||||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1601
|
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1601
|
||||||
|
@ -949,6 +952,9 @@ func testIndexDBCheckTSIDByName(db *indexDB, mns []MetricName, tsids []TSID, isC
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot search with multipel filters matching empty tags: %w", err)
|
return fmt.Errorf("cannot search with multipel filters matching empty tags: %w", err)
|
||||||
}
|
}
|
||||||
|
if !testHasTSID(tsidsFound, tsid) {
|
||||||
|
return fmt.Errorf("tsids is missing when matching multiple filters with empty tags tsidsFound\ntsid=%+v\ntsidsFound=%+v\ntfs=%s\nmn=%s", tsid, tsidsFound, tfs, mn)
|
||||||
|
}
|
||||||
|
|
||||||
// Search with regexps.
|
// Search with regexps.
|
||||||
tfs.Reset(mn.AccountID, mn.ProjectID)
|
tfs.Reset(mn.AccountID, mn.ProjectID)
|
||||||
|
|
Loading…
Reference in a new issue