forked from TrueCloudLab/xk6-frostfs
[#42] registry: Do not create selectors without status filters
Should allow to catch bugs in scenarios earlier. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
b66b5a2f37
commit
e71ac35c36
1 changed files with 3 additions and 0 deletions
|
@ -31,6 +31,9 @@ func NewObjSelector(registry *ObjRegistry, selectionSize int, filter *ObjFilter)
|
||||||
if selectionSize <= 0 {
|
if selectionSize <= 0 {
|
||||||
selectionSize = objectSelectCache
|
selectionSize = objectSelectCache
|
||||||
}
|
}
|
||||||
|
if filter == nil || filter.Status == "" {
|
||||||
|
panic("filtering without status is not supported")
|
||||||
|
}
|
||||||
objSelector := &ObjSelector{
|
objSelector := &ObjSelector{
|
||||||
ctx: registry.ctx,
|
ctx: registry.ctx,
|
||||||
boltDB: registry.boltDB,
|
boltDB: registry.boltDB,
|
||||||
|
|
Loading…
Reference in a new issue