Avoids using tempfile in tests

Not useful
pull/171/head
Tpt 3 years ago
parent cb146efd7c
commit 5973de3a73
  1. 3
      server/Cargo.toml
  2. 10
      server/src/main.rs

@ -18,6 +18,3 @@ oxigraph = { version = "0.3.0-dev", path = "../lib", features = ["http_client"]
rand = "0.8" rand = "0.8"
url = "2" url = "2"
oxiri = "0.1" oxiri = "0.1"
[dev-dependencies]
tempfile = "3"

@ -929,7 +929,6 @@ impl Write for ReadForWriteWriter {
mod tests { mod tests {
use super::*; use super::*;
use oxhttp::model::Method; use oxhttp::model::Method;
use tempfile::{tempdir, TempDir};
#[test] #[test]
fn get_ui() { fn get_ui() {
@ -1432,14 +1431,13 @@ mod tests {
struct ServerTest { struct ServerTest {
store: Store, store: Store,
_path: TempDir,
} }
impl ServerTest { impl ServerTest {
fn new() -> ServerTest { fn new() -> Self {
let path = tempdir().unwrap(); Self {
let store = Store::open(path.path()).unwrap(); store: Store::new().unwrap(),
ServerTest { _path: path, store } }
} }
fn exec(&self, mut request: Request) -> Response { fn exec(&self, mut request: Request) -> Response {

Loading…
Cancel
Save