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

@@ -27,9 +27,14 @@ impl TestContext {
///
/// [Context]: crate::context::Context
pub async fn new() -> Self {
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();
Self { ctx, dir }
}