Skip to content

Commit

Permalink
Fix hardlink test.
Browse files Browse the repository at this point in the history
  • Loading branch information
darnuria committed Jul 10, 2023
1 parent 346ea36 commit 129ba1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions heed/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,8 @@ mod tests {
#[test]
fn open_env_with_named_path_hardlink_and_no_subdir() {
let dir = tempfile::tempdir().unwrap();
let dir_symlink = tempfile::tempdir().unwrap();
let env_name = dir.path().join("babar.mdb");
let hardlink_name = dir_symlink.path().join("babar.mdb.link");
let hardlink_name = dir.path().join("babar.mdb.link");

let mut envbuilder = EnvOpenOptions::new();
unsafe { envbuilder.flag(crate::Flag::NoSubDir) };
Expand All @@ -844,7 +843,7 @@ mod tests {
.open(&env_name)
.unwrap();

std::os::unix::fs::symlink(&dir.path(), &hardlink_name).unwrap();
std::fs::hard_link(&env_name, &hardlink_name).unwrap();
let _env = envbuilder
.map_size(10 * 1024 * 1024) // 10MB
.open(&hardlink_name)
Expand Down

0 comments on commit 129ba1d

Please sign in to comment.