Replace tempdir crate with tempfile
This commit is contained in:
parent
f8604e88ef
commit
fd6f71d287
15 changed files with 78 additions and 119 deletions
|
@ -32,4 +32,4 @@ smol.workspace = true
|
|||
[dev-dependencies]
|
||||
gpui = { path = "../gpui", features = ["test-support"] }
|
||||
env_logger.workspace = true
|
||||
tempdir.workspace = true
|
||||
tempfile.workspace = true
|
||||
|
|
|
@ -196,7 +196,6 @@ mod tests {
|
|||
|
||||
use sqlez::domain::Domain;
|
||||
use sqlez_macros::sql;
|
||||
use tempdir::TempDir;
|
||||
|
||||
use crate::open_db;
|
||||
|
||||
|
@ -220,7 +219,10 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
let tempdir = TempDir::new("DbTests").unwrap();
|
||||
let tempdir = tempfile::Builder::new()
|
||||
.prefix("DbTests")
|
||||
.tempdir()
|
||||
.unwrap();
|
||||
let _bad_db = open_db::<BadDB>(tempdir.path(), &util::channel::ReleaseChannel::Dev).await;
|
||||
}
|
||||
|
||||
|
@ -253,7 +255,10 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
let tempdir = TempDir::new("DbTests").unwrap();
|
||||
let tempdir = tempfile::Builder::new()
|
||||
.prefix("DbTests")
|
||||
.tempdir()
|
||||
.unwrap();
|
||||
{
|
||||
let corrupt_db =
|
||||
open_db::<CorruptedDB>(tempdir.path(), &util::channel::ReleaseChannel::Dev).await;
|
||||
|
@ -297,7 +302,10 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
let tempdir = TempDir::new("DbTests").unwrap();
|
||||
let tempdir = tempfile::Builder::new()
|
||||
.prefix("DbTests")
|
||||
.tempdir()
|
||||
.unwrap();
|
||||
{
|
||||
// Setup the bad database
|
||||
let corrupt_db =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue