Open rklaehn opened 2 years ago
@faassen I guess the work you did with the iroh api should simplify this... Can we close it already? Not sure how much the trycmd test already cover.
The trycmd tests exercise only the CLI and API, not the actual resolver interaction as that's mocked away.
The tempdir crate is useful if you need to set up some test data in a dir and guarantee it gets removed when it goes out of scope.
Since these operations read from the file system, you would have to create a temp directory, write some files, then call these ops with a dummy store and check that the data is correctly added.
It would test the actual directory traversal as well as the code that calls store.put with the blocks generated from the file or directory builder.
This would be a bit more like an integration test than an unit test.