Skip to content

Commit

Permalink
update tempdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Selph committed Aug 22, 2023
1 parent d3bc0e9 commit 94d4502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions plrust-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ trusted = []

[dependencies]
pgrx = "=0.9.7"
tempdir = "0.3.7"
tempdir = "0.3.8"
once_cell = "1.18.0"

[dev-dependencies]
pgrx-tests = "=0.9.7"
tempdir = "0.3.7"
tempdir = "0.3.8"
once_cell = "1.18.0"
8 changes: 3 additions & 5 deletions plrust-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,17 @@ mod tests {
#[cfg(any(test, feature = "pg_test"))]
pub mod pg_test {
use once_cell::sync::Lazy;
use tempdir::TempDir;

use tempfile::{tempdir, TempDir};
static WORK_DIR: Lazy<String> = Lazy::new(|| {
let work_dir = TempDir::new("plrust-tests").expect("Couldn't create tempdir");
let work_dir = tempdir().expect("Couldn't create tempdir");
format!("plrust.work_dir='{}'", work_dir.path().display())
});
static LOG_LEVEL: &str = "plrust.tracing_level=trace";

static PLRUST_ALLOWED_DEPENDENCIES_FILE_NAME: &str = "allowed_deps.toml";
static PLRUST_ALLOWED_DEPENDENCIES_FILE_DIRECTORY: Lazy<TempDir> = Lazy::new(|| {
use std::io::Write;
let temp_allowed_deps_dir =
TempDir::new("plrust-allowed-deps").expect("Couldnt create tempdir");
tempdir().expect("Couldnt create tempdir");

let file_path = temp_allowed_deps_dir
.path()
Expand Down

0 comments on commit 94d4502

Please sign in to comment.