Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Oct 23, 2024
1 parent 1c40c05 commit b3300a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: brew update && brew install macfuse samba
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
Expand Down
18 changes: 11 additions & 7 deletions remotefs-fuse/tests/fuse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ fn mount(p: &Path) -> (UmountLock, JoinHandle<()>) {
(umount, join)
}

fn umount(umount: UmountLock) {
umount
.lock()
.unwrap()
.as_mut()
.unwrap()
.umount()
.expect("Failed to unmount");
}

#[test]
fn test_should_mount_fs() {
let mnt = TempDir::new().expect("Failed to create tempdir");
Expand All @@ -70,13 +80,7 @@ fn test_should_mount_fs() {
assert!(mounted_file_path.exists());

// unmount
umounter
.lock()
.unwrap()
.as_mut()
.unwrap()
.umount()
.expect("Failed to unmount");
umount(umounter);

join.join().expect("Failed to join thread");
}

0 comments on commit b3300a7

Please sign in to comment.