File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ mod test {
118
118
119
119
use super :: * ;
120
120
use adapter:: ethereum:: test_util:: { GANACHE_1 , GANACHE_1337 } ;
121
- use chrono:: Utc ;
121
+ use chrono:: { Datelike , Utc } ;
122
122
use primitives:: {
123
123
analytics:: {
124
124
query:: { AllowedKey , Time } ,
@@ -827,8 +827,16 @@ mod test {
827
827
828
828
let fetched_analytics = analytics_response. 0 . analytics ;
829
829
830
+ // because data is grouped by month, when it's the 1st day of the month
831
+ // and the CI runs, this causes a failing test.
832
+ let expected = if Utc :: today ( ) . day ( ) == 1 {
833
+ vec ! [ FetchedMetric :: Count ( 58 ) , FetchedMetric :: Count ( 42 ) ]
834
+ } else {
835
+ vec ! [ FetchedMetric :: Count ( 100 ) ]
836
+ } ;
837
+
830
838
assert_eq ! (
831
- vec! [ FetchedMetric :: Count ( 100 ) ] ,
839
+ expected ,
832
840
fetched_analytics
833
841
. iter( )
834
842
. map( |fetched| fetched. value)
You can’t perform that action at this time.
0 commit comments