nicholasbishop / ext4-view-rs

Rust library for reading ext2/ext4 filesystems
https://crates.io/crates/ext4-view
Apache License 2.0
8 stars 2 forks source link

Add integration tests #90

Closed nicholasbishop closed 3 months ago

nicholasbishop commented 4 months ago

Add a new place for tests: tests/integration. Note that "integration" here is not about the functionality of the tests, just distinguishes from "unit tests" that are written inline in the source tree. The integration tests can only test the public API, they don't have visiblity into private items. It's good to test things this way when possible to make sure that all the stuff we think is part of the public API actually is.

Move all of the existing Path tests to tests/integration/path.rs. A few tests were lightly modified to work with just the public API.

For more details of why this layout is a good pattern, see https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html.