<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jul 20, 2015 at 12:42 AM Tim Penhey <<a href="mailto:tim.penhey@canonical.com">tim.penhey@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Aside from all this work, it is becoming REALLY IMPORTANT that we stop<br>
writing terrible, wasteful, full integration type tests when what we<br>
really care about testing is some aspect of uniter internals. I know<br>
that it is just simpler to copy what is there and make more, but it is<br>
better to write smaller, targeted tests that just test what you are<br>
wanting to assert.<br></blockquote><div><br></div><div>+100</div><div><br></div><div>If you start writing tests and you reach for JujuConnSuite, stop. You should be able to get to 80% code coverage (and near 100% logic coverage) without using anything outside your package. Just provide some stub implementations of interfaces and assert that the logic run against those interfaces is correct. If you have too many dependencies on code outside your package, start writing interfaces and refactor your code to use them instead of explicitly relying on external types.</div></div></div>