Documenation regarding restic command integration machinery

restic version: all
commands: all

I am in the process of writing enhancements to existing commands and I have been asked to add integration tests for these enhancements. This is all great and fine, if you know your way round.

If you are however a newbie as I am, I struggled. Is the somewhere a set of documents which describe the integration test machinery?

If yes, where will I find it?
If not, I would give it a go and start writing something up and explain how to setup the environment, run a test backup and then run a set of integration tests by running the restic commands with specific options and check for wanted and unwanted results.

Thanks, Winfried

There’s some minimal documentation in CONTRIBUTING.md on how to run the tests. But there’s no documentation on the test helpers. The usual approach is probably to look for a similar test and start from there. The integration tests are all in cmd/restic/cmd_*_integration_test.go, but I think you already know that.

Hi Michael, thanks for the reply. Would you like me to write something while I trundle along?

Sure, feel free to add some docs the integration test machinery. Do you have a specific type of documentation in mind (e.g., a basic overview + a basic example / information how to setup the environment / a reference where to find what / …)? Just try to keep it compact such that it remains maintainable, otherwise they will quickly become outdated.

A short chapter in doc/090_participating.rst, after the paragraph “Contributing” about a basic testing overview + a basic example / information how to setup the environment / a reference where to find what / … would be my idea.