Fork me on GitHub
#jackdaw
<
2019-10-04
>
callumcodes15:10:05

Are there any examples of using a mock-transport with the Test Machine with avro with a mocked schema registry?

cddr15:10:33

It can definitely be done. Though I don't think there's a public example. Lemme find you something from our own codebase

😃 4
cddr15:10:16

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.

cddr16:10:37

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

callumcodes12:10:25

Thanks @U065JNAN8. This just what we needed 😁