+ simple secret deletion
This commit is contained in:
parent
a94a496b62
commit
67bbb70d80
1 changed files with 10 additions and 0 deletions
|
|
@ -21,6 +21,11 @@ mod tests {
|
||||||
let db: sled::Db = sled::open("sled_db").unwrap();
|
let db: sled::Db = sled::open("sled_db").unwrap();
|
||||||
get_secret(&db, "foo");
|
get_secret(&db, "foo");
|
||||||
}
|
}
|
||||||
|
#[test]
|
||||||
|
fn test_delete_secret(){
|
||||||
|
let db: sled::Db = sled::open("sled_db").unwrap();
|
||||||
|
delete_secret(&db, "foo");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use sled::Db;
|
use sled::Db;
|
||||||
|
|
@ -90,3 +95,8 @@ fn get_secret(db: &Db, path: &str) -> Option<TempSecret>{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// delete secret at path
|
||||||
|
fn delete_secret(db: &Db, path: &str) {
|
||||||
|
let rem = db.remove(path);
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue