Tweak test

This commit is contained in:
Hocuri
2021-06-12 15:06:16 +02:00
committed by bjoern
parent d12d9d94d6
commit b16785bb62
2 changed files with 10 additions and 21 deletions

View File

@@ -806,8 +806,7 @@ mod test {
#[async_std::test]
async fn test_migration_flags() -> Result<()> {
let t = TestContext::new().await;
let events = t.new_evtracker().await;
events.get_info_contains("Opened database").await;
t.evtracker.get_info_contains("Opened database").await;
// as migrations::run() was already executed on context creation,
// another call should not result in any action needed.
@@ -822,7 +821,7 @@ mod test {
info!(&t, "test_migration_flags: XXX");
loop {
if let EventType::Info(info) = events.recv().await.unwrap() {
if let EventType::Info(info) = t.evtracker.recv().await.unwrap() {
assert!(
!info.contains("[migration]"),
"Migrations were run twice, you probably forgot to update the db version"