unify events

This commit is contained in:
dignifiedquire
2020-08-10 10:32:48 +02:00
parent 4bdcdbb922
commit 1ae49c1fca
26 changed files with 294 additions and 287 deletions

View File

@@ -99,9 +99,14 @@ struct TestContext {
}
async fn create_test_context() -> TestContext {
use rand::Rng;
let dir = tempdir().unwrap();
let dbfile = dir.path().join("db.sqlite");
let ctx = Context::new("FakeOs".into(), dbfile.into()).await.unwrap();
let id = rand::thread_rng().gen();
let ctx = Context::new("FakeOs".into(), dbfile.into(), id)
.await
.unwrap();
TestContext { ctx, dir }
}