@@ -17,7 +17,8 @@ func TestRuleBasedSegmentsStorage(t *testing.T) {
1717 changeNumber , _ := storage .ChangeNumber ()
1818 assert .Equal (t , int64 (- 1 ), changeNumber )
1919 assert .Empty (t , storage .All ())
20- assert .Empty (t , storage .RuleBasedSegmentNames ())
20+ names , _ := storage .RuleBasedSegmentNames ()
21+ assert .Empty (t , names )
2122
2223 // Create test data
2324 ruleBased1 := dtos.RuleBasedSegmentDTO {
@@ -84,7 +85,7 @@ func TestRuleBasedSegmentsStorage(t *testing.T) {
8485 assert .Len (t , storage .All (), 2 )
8586
8687 // Test RuleBasedSegmentNames
87- names : = storage .RuleBasedSegmentNames ()
88+ names , _ = storage .RuleBasedSegmentNames ()
8889 assert .Contains (t , names , "rule1" )
8990 assert .Contains (t , names , "rule2" )
9091
@@ -107,7 +108,8 @@ func TestRuleBasedSegmentsStorage(t *testing.T) {
107108 changeNumber , _ = storage .ChangeNumber ()
108109 assert .Equal (t , int64 (124 ), changeNumber )
109110 assert .Len (t , storage .All (), 1 )
110- assert .Contains (t , storage .RuleBasedSegmentNames (), "rule2" )
111+ names , _ = storage .RuleBasedSegmentNames ()
112+ assert .Contains (t , names , "rule2" )
111113}
112114
113115func TestRuleBasedSegmentsStorageReplaceAll (t * testing.T ) {
@@ -311,7 +313,7 @@ func TestRuleBasedSegmentsStorageConcurrent(t *testing.T) {
311313 go func () {
312314 defer wg .Done ()
313315 _ = storage .All ()
314- _ = storage .RuleBasedSegmentNames ()
316+ _ , _ = storage .RuleBasedSegmentNames ()
315317 _ = storage .Segments ()
316318 _ = storage .Contains ([]string {"segment1" })
317319 }()
0 commit comments