Skip to content

Commit

Permalink
Fix tests after merge
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hagemeier <[email protected]>
  • Loading branch information
c-hagem committed Nov 18, 2024
1 parent 99d7537 commit 4e2e2b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mountpoint-s3/tests/fuse_tests/statfs_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use test_case::test_case;
/// Tests that non-zero empty space is reported
fn statfs_test_available_nonzero(creator_fn: impl TestSessionCreator, prefix: &str) {
let test_session = creator_fn(prefix, Default::default());
let mount_dir = test_session.mount_dir;
let stats = nix::sys::statvfs::statvfs(&mount_dir.into_path()).unwrap();
let mount_dir = test_session.mount_path();
let stats = nix::sys::statvfs::statvfs(mount_dir.into()).unwrap();

Check failure on line 8 in mountpoint-s3/tests/fuse_tests/statfs_test.rs

View workflow job for this annotation

GitHub Actions / Clippy

useless conversion to the same type: `&std::path::Path`
assert_ne!(stats.blocks_free(), 0);
assert_ne!(stats.blocks_available(), 0);
assert_ne!(stats.blocks(), 0);
Expand All @@ -14,8 +14,8 @@ fn statfs_test_available_nonzero(creator_fn: impl TestSessionCreator, prefix: &s
/// Tests that default values from FUSER are reported for mpst fields
fn statfs_test_fuser_defaults(creator_fn: impl TestSessionCreator, prefix: &str) {
let test_session = creator_fn(prefix, Default::default());
let mount_dir = test_session.mount_dir;
let stats = nix::sys::statvfs::statvfs(&mount_dir.into_path()).unwrap();
let mount_dir = test_session.mount_path();
let stats = nix::sys::statvfs::statvfs(mount_dir.into()).unwrap();

Check failure on line 18 in mountpoint-s3/tests/fuse_tests/statfs_test.rs

View workflow job for this annotation

GitHub Actions / Clippy

useless conversion to the same type: `&std::path::Path`
//assert_eq!(stats.name_max(), 255);
// These five aren't default values but set by us, so maybe drop
assert_eq!(stats.blocks(), u64::MAX / 1024);
Expand All @@ -37,8 +37,8 @@ fn statfs_test_fuser_defaults(creator_fn: impl TestSessionCreator, prefix: &str)
/// as some tools rely on calculations with these values to determine percentage of blocks available
fn statfs_test_block_arithmetic(creator_fn: impl TestSessionCreator, prefix: &str) {
let test_session = creator_fn(prefix, Default::default());
let mount_dir = test_session.mount_dir;
let stats = nix::sys::statvfs::statvfs(&mount_dir.into_path()).unwrap();
let mount_dir = test_session.mount_path();
let stats = nix::sys::statvfs::statvfs(mount_dir.into()).unwrap();

Check failure on line 41 in mountpoint-s3/tests/fuse_tests/statfs_test.rs

View workflow job for this annotation

GitHub Actions / Clippy

useless conversion to the same type: `&std::path::Path`
assert!(stats.blocks() >= stats.blocks_available());
}

Expand Down

0 comments on commit 4e2e2b4

Please sign in to comment.