File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ mod test {
105
105
dummy_auth_tokens : AUTH . clone ( ) ,
106
106
} ;
107
107
let config = configuration ( "development" , None ) . expect ( "Dev config should be available" ) ;
108
- let redis = redis_connection ( ) . await . expect ( "Couldn't connect to Redis" ) ;
108
+ let mut redis = redis_connection ( ) . await . expect ( "Couldn't connect to Redis" ) ;
109
+ // run `FLUSHALL` to clean any leftovers of other tests
110
+ let _ = redis:: cmd ( "FLUSHALL" ) . query_async :: < _ , String > ( & mut redis) . await ;
109
111
( DummyAdapter :: init ( adapter_options, & config) , redis)
110
112
}
111
113
@@ -132,7 +134,7 @@ mod test {
132
134
Err ( ResponseError :: BadRequest ( error) ) => {
133
135
assert ! ( error. to_string( ) . contains( "no session token for this auth: wrong-token" ) , "Wrong error received" ) ;
134
136
} ,
135
- Ok ( _ ) | Err ( _ ) => panic ! ( "We shouldn't get a success response nor a different Error than BadRequest for this call" ) ,
137
+ _ => panic ! ( "We shouldn't get a success response nor a different Error than BadRequest for this call" ) ,
136
138
} ;
137
139
}
138
140
}
You can’t perform that action at this time.
0 commit comments