Update test_cleanup for testing a different expiry value

This commit is contained in:
orhun 2021-06-10 03:27:53 +03:00
parent 83e54b176c
commit 94a43a880d
No known key found for this signature in database
GPG key ID: F83424824B3E4B90

View file

@ -14,7 +14,10 @@ pub mod common;
#[tokio::test]
async fn test_cleanup() -> Result<()> {
pretty_env_logger::try_init().ok();
let filter = server(ServerData::default());
let filter = server(ServerData {
expiry_days: 2,
..ServerData::default()
});
expect_text(&filter, "old", "").await;
@ -39,7 +42,7 @@ async fn test_cleanup() -> Result<()> {
let hour = Duration::from_secs(3600);
time::pause();
time::advance(23 * hour).await;
time::advance(46 * hour).await;
expect_text(&filter, "old", "hello").await;
time::advance(3 * hour).await;