forked from TrueCloudLab/frostfs-sdk-go
[#223] object: Introduce ec_parent
search filter
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
d4e6f4e125
commit
09b79d13f3
2 changed files with 24 additions and 0 deletions
|
@ -160,6 +160,23 @@ func TestSearchFilters_AddSplitIDFilter(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestSearchFilters_AddECParentFilter(t *testing.T) {
|
||||
id := testOID()
|
||||
|
||||
fs := new(object.SearchFilters)
|
||||
fs.AddECParentFilter(object.MatchStringEqual, id)
|
||||
|
||||
t.Run("v2", func(t *testing.T) {
|
||||
fsV2 := fs.ToV2()
|
||||
|
||||
require.Len(t, fsV2, 1)
|
||||
|
||||
require.Equal(t, v2object.FilterHeaderECParent, fsV2[0].GetKey())
|
||||
require.Equal(t, id.String(), fsV2[0].GetValue())
|
||||
require.Equal(t, v2object.MatchStringEqual, fsV2[0].GetMatchType())
|
||||
})
|
||||
}
|
||||
|
||||
func TestSearchFilters_AddTypeFilter(t *testing.T) {
|
||||
typ := object.TypeTombstone
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue