File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/tool/subcommands/api_cmd Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ mod tests {
188188 use crate :: utils:: net:: { DownloadFileOption , download_file_with_cache} ;
189189 use crate :: utils:: proofs_api:: ensure_proof_params_downloaded;
190190 use ahash:: HashSet ;
191+ use chrono:: Utc ;
191192 use directories:: ProjectDirs ;
192193 use futures:: { StreamExt , stream:: FuturesUnordered } ;
193194 use itertools:: Itertools as _;
@@ -210,14 +211,13 @@ mod tests {
210211 . trim ( )
211212 . split ( "\n " )
212213 . filter_map ( |n| {
213- Url :: parse (
214- format ! (
215- "https://forest-snapshots.fra1.cdn.digitaloceanspaces.com/rpc_test/{n}"
216- )
217- . as_str ( ) ,
218- )
219- . ok ( )
220- . map ( |url| ( n, url) )
214+ let base_url = format ! (
215+ "https://forest-snapshots.fra1.cdn.digitaloceanspaces.com/rpc_test/{n}"
216+ ) ;
217+ let mut url = Url :: parse ( & base_url) . ok ( ) ?;
218+ url. query_pairs_mut ( )
219+ . append_pair ( "cachebust" , & Utc :: now ( ) . timestamp ( ) . to_string ( ) ) ;
220+ Some ( ( n, url) )
221221 } )
222222 . collect_vec ( ) ;
223223 let project_dir = ProjectDirs :: from ( "com" , "ChainSafe" , "Forest" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments