doc: explain how to write ooni nettests #505
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Location of the issue tracker: https://github.com/ooni/probe
Description
This is a preliminary commit and requires more work. I am going
to push this commit so others soon can start to review it.
This draft supersedes #505
This diff also contains a library of building blocks that is
instrumental to complete websteps. In fact, the tutorial I have
written here will eventually guide people to write their own
implementation of websteps.
I have not written any test for the new code so far. It is
also a stretch to call this new code. It is existing code that
has been written by me or @kelmenhorst that I have adapted
for the purpose of writing the tutorial.
The nice exercise of writing a tutorial is that you are more
easily frustrated if the code is difficult to use XD.
How to review the tutorials
Navigate to
internal/tutorial/measure
and follow the linksinside the
README.md
file. Or go to https://github.com/ooni/probe-cli/tree/WORK/internal/tutorial/measureand read starting from there, which is equivalent.
Editing is quite tricky. Most text comes from comments in
Go files. You need to edit the comments and then you need
to regenerate all the files. The
README.md
of theinternal/tutorial/measure
tutorial contains instructionson how to do that.
What remains to be done before merging
Mainly adding tests and making sure I didn't lose
anything when adapting existing code. I like the interface
of the new code more, but existing code written last
August may have a better implementation of corner cases.