mirror of https://github.com/tikv/client-rust.git
use tempfile to replace tempdir
Signed-off-by: ekexium <ekexium@gmail.com>
This commit is contained in:
parent
684059a341
commit
c1bb955832
|
@ -45,7 +45,6 @@ clap = "2.32"
|
|||
fail = { version = "0.3", features = [ "failpoints" ] }
|
||||
proptest = "0.9"
|
||||
proptest-derive = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
serial_test = "0.5.0"
|
||||
simple_logger = "1.9.0"
|
||||
tokio = { version = "1.0", features = [ "sync", "rt-multi-thread", "macros" ] }
|
||||
|
|
|
@ -18,5 +18,5 @@ clap = "2.32"
|
|||
fail = { version = "0.3", features = [ "failpoints" ] }
|
||||
proptest = "0.9"
|
||||
proptest-derive = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
tokio = "1.0"
|
||||
|
|
|
@ -96,16 +96,14 @@ impl SecurityManager {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
extern crate tempdir;
|
||||
use super::*;
|
||||
|
||||
use std::{fs::File, io::Write, path::PathBuf};
|
||||
|
||||
use self::tempdir::TempDir;
|
||||
use tempfile;
|
||||
|
||||
#[test]
|
||||
fn test_security() {
|
||||
let temp = TempDir::new("test_cred").unwrap();
|
||||
let temp = tempfile::tempdir().unwrap();
|
||||
let example_ca = temp.path().join("ca");
|
||||
let example_cert = temp.path().join("cert");
|
||||
let example_pem = temp.path().join("key");
|
||||
|
|
|
@ -16,4 +16,3 @@ clap = "2.32"
|
|||
fail = { version = "0.3", features = [ "failpoints" ] }
|
||||
proptest = "0.9"
|
||||
proptest-derive = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
|
|
Loading…
Reference in New Issue