Are there any examples of using a mock-transport with the Test Machine with avro with a mocked schema registry?
It can definitely be done. Though I don't think there's a public example. Lemme find you something from our own codebase
You basically need to construct a topic config where the :key-serde
and :value-serde
are created using the mock registry client instead of the real one. The tricky part is making it so that in a "live" context, the topic definitions use the real client but in the test context, they use the mock client.
Hm, so there's a bunch of extra stuff dealing with all our idiosyncrasies making it difficult to extract a fully working example from our codebase. However I have tried to extract out the essential elements into an (untested) gist. https://gist.github.com/cddr/d2564689a9cd10367bd0d2a86e860016 Let me know how you get on with it
Thanks @cddr. This just what we needed 😁