Reading time: 9 minutes Writing good tests is tricky when the system has a lot of moving parts. When using Go’s testing infrastructure, tests that involve multiple modules can cause dependency cycles which are not allowed by the compiler. In this post we will go over a technique we devised to break these dependency cycles. BackgroundThe CockroachDB Go code base is split up into various packages; s
![Outsmarting Go dependencies in testing code](https://cdn-ak-scissors.b.st-hatena.com/image/square/d06904aab39b718b9301d1dd3b5cd84504c1b515/height=288;version=1;width=512/https%3A%2F%2Fimages.ctfassets.net%2F00voh0j35590%2F7x4MLhgVn47iH5ph7Uo1M7%2F402bde4df3b077d0788bfa288c2ef9c5%2Fcrl-socialpost-default-2020-2.jpg)