espflash
espflash copied to clipboard
Include more unit/integration tests where possible
Certain modules can likely be tested quite thoroughly, so we should add more tests.
It would be nice to include more unit tests especially, though this may require refactoring. Some sort of end-to-end testing of the CLI subcommands would be interesting as well, though that is unexplored territory for me.
Resources:
- https://rust-cli.github.io/book/tutorial/testing.html
- https://rust-cli.github.io/book/resources/index.html
- Since being split out, esp-idf-part now has quite reasonable test coverage; in turn, our partition table handling does as well.
- The image format tests have been updated for the
IdfBootloaderandEsp8266image formats; there is still no test for theDirectBootformat.
I'm going to call this "good enough" for the 2.0.x release, though I'll leave the issue open as we should still investigate improving the current situation.
I'm not sure there's much more testing we can do without some major refactoring, and we have #439 open for some HIL-like testing, so gonna go ahead and close this.