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"
url = "2"
oxiri = "0.1"
[dev-dependencies]
tempfile = "3"

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

Loading…
Cancel
Save