@@ -1342,7 +1342,8 @@ func TestGetRules(t *testing.T) {
13421342
13431343 // Sync Rules
13441344 forEachRuler (func (_ string , r * Ruler ) {
1345- r .syncRules (context .Background (), rulerSyncReasonInitial )
1345+ err := r .syncRules (context .Background (), rulerSyncReasonInitial )
1346+ require .NoError (t , err )
13461347 })
13471348
13481349 if tc .sharding {
@@ -1572,7 +1573,8 @@ func TestGetRulesFromBackup(t *testing.T) {
15721573
15731574 // Sync Rules
15741575 forEachRuler (func (_ string , r * Ruler ) {
1575- r .syncRules (context .Background (), rulerSyncReasonInitial )
1576+ err := r .syncRules (context .Background (), rulerSyncReasonInitial )
1577+ require .NoError (t , err )
15761578 })
15771579
15781580 // update the State of the rulers in the ring based on tc.rulerStateMap
@@ -1788,7 +1790,8 @@ func getRulesHATest(replicationFactor int) func(t *testing.T) {
17881790
17891791 // Sync Rules
17901792 forEachRuler (func (_ string , r * Ruler ) {
1791- r .syncRules (context .Background (), rulerSyncReasonInitial )
1793+ err := r .syncRules (context .Background (), rulerSyncReasonInitial )
1794+ require .NoError (t , err )
17921795 })
17931796
17941797 // update the State of the rulers in the ring based on tc.rulerStateMap
@@ -1811,8 +1814,10 @@ func getRulesHATest(replicationFactor int) func(t *testing.T) {
18111814 t .Errorf ("ruler %s was not terminated with error %s" , "ruler1" , err .Error ())
18121815 }
18131816
1814- rulerAddrMap ["ruler2" ].syncRules (context .Background (), rulerSyncReasonPeriodic )
1815- rulerAddrMap ["ruler3" ].syncRules (context .Background (), rulerSyncReasonPeriodic )
1817+ err = rulerAddrMap ["ruler2" ].syncRules (context .Background (), rulerSyncReasonPeriodic )
1818+ require .NoError (t , err )
1819+ err = rulerAddrMap ["ruler3" ].syncRules (context .Background (), rulerSyncReasonPeriodic )
1820+ require .NoError (t , err )
18161821
18171822 requireGroupStateEqual := func (a * GroupStateDesc , b * GroupStateDesc ) {
18181823 require .Equal (t , a .Group .Interval , b .Group .Interval )
@@ -2800,7 +2805,8 @@ func TestRecoverAlertsPostOutage(t *testing.T) {
28002805 evalFunc := func (ctx context.Context , g * promRules.Group , evalTimestamp time.Time ) {}
28012806
28022807 r , _ := buildRulerWithIterFunc (t , rulerCfg , & querier.TestConfig {Cfg : querierConfig , Distributor : d , Stores : queryables }, store , nil , evalFunc )
2803- r .syncRules (context .Background (), rulerSyncReasonInitial )
2808+ err := r .syncRules (context .Background (), rulerSyncReasonInitial )
2809+ require .NoError (t , err )
28042810
28052811 // assert initial state of rule group
28062812 ruleGroup := r .manager .GetRules ("user1" )[0 ]
@@ -3265,7 +3271,8 @@ func TestGetShardSizeForUser(t *testing.T) {
32653271
32663272 // Sync Rules
32673273 forEachRuler (func (_ string , r * Ruler ) {
3268- r .syncRules (context .Background (), rulerSyncReasonInitial )
3274+ err := r .syncRules (context .Background (), rulerSyncReasonInitial )
3275+ require .NoError (t , err )
32693276 })
32703277
32713278 result := testRuler .getShardSizeForUser (tc .userID )
0 commit comments