multiaddr icon indicating copy to clipboard operation
multiaddr copied to clipboard

Allow compliance testing of implementations

Open thomaseizinger opened this issue 2 years ago • 2 comments

It would be good if we can offer an easy way for people to integration test that their implementations are working correctly.

I'd propose to add a test suite and a GitHub action to this repository that allows implementations to easily verify whether they are compliant.

Concretely, I am thinking of specifying a simple stdin/stdout protocol where the implementations need to provide an application that reads from stdin (each line representing a test case), exiting with an appropriate exit code.

For example:

/path/to/implementation parse-valid-str
> /ip4/127.0.0.1/tcp/1234
< exit 0
/path/to/implementation parse-invalid-str
> /foobar/1234
< exit 0
/path/to/implementation parse-valid-hex
> 047f000001910204d2
> exit 0

By providing a GitHub action, we can make sure that changes to the table (as long as accompanied with a test) are run against new implementations (assuming they run their CI regularly).

Thoughts?

thomaseizinger avatar Nov 11 '22 01:11 thomaseizinger

What's the motivation behind this? More test coverage is always good, but I haven't seen a lot of problems in this part of the stack.

marten-seemann avatar Nov 11 '22 09:11 marten-seemann

What's the motivation behind this? More test coverage is always good, but I haven't seen a lot of problems in this part of the stack.

The idea was sparked by the possible breaking change of renaming the /quic codepoint.

I don't see it as a high priority item.

thomaseizinger avatar Nov 11 '22 20:11 thomaseizinger