mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-28 08:01:04 +00:00
Updated the existing unit tests to map to the new implemented abstraction. In the process of updating the tests, a few other worth mentioning changes are implemented: - when initializing a resource needed for the test, it is a best practice to keep any updates that change the test result in the same function. This was not followed as the requests vector was initialized in the test, and was cleared in a function that was asserting results. This is an unexpected behavior, and is now removed. The requests are always initialized in the test before using them (and clear is no longer used). - `assert_results` is deleted because it was hard to read which results where asserted. It is also not necessary to mock functions in that way because now we can mock only the parts we need from the device implementation. The tests are incomplete though because we also need to check the error returned. This should be implemented in a future commit to keep things separated. Signed-off-by: Andreea Florescu <fandree@amazon.com> |
||
|---|---|---|
| .cargo | ||
| .github | ||
| rust-vmm-ci@ae7db2d98a | ||
| src/i2c | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.toml | ||
| CODEOWNERS | ||
| coverage_config_x86_64.json | ||
| LICENSE-APACHE | ||
| README.md | ||