<div dir="ltr"><div>We haven't had a unit test policy in Pulp 3, and the community and core committers would all like one. The general desire we've heard so far is to change course and encourage developers to add unit tests to their changes to Pulp 3.<br></div><div><br></div><div>The policy we're suggesting is to add a coveralls[0] check for Pull Requests against the pulpcore 3.0-dev branch that shows the overall coverage percentage, e.g. 12.89%. This check would pass if and only if coverage increases or remains the same with the PR. We think this will eventually get us on the path to 100% unit test coverage.</div><div><br></div><div>We propose the coveralls check be a soft check that allow for merging if it fails. We would document the policy and try to adhere to it even though it wouldn't formally block merging. At a future point when pulp3 (maybe the GA?) we could make this a hard check.</div><div><br></div><div>Benefits:</div><div>- It's easy, simple, and automatic</div><div>- It's pretty objective and there's little room to argue with a number.</div><div>- Helps us raise our unit test coverage gradually over time</div><div><br></div><div>Downsides:</div><div>- Could discourage community contributions</div><div>- It can be a bit strict and unforgiving at times (especially if there's a hard check)</div><div>- It only provides a guarantee around quantity of unit testing and not quality</div><div><br></div><div><br></div><div><b>Q: What about the existing functionality? Do we need to write unit tests for it?</b></div><div><br></div><div>We're not sure about this. We'd like community feedback. Is anyone interested in writing backfill unit tests? If so, then maybe we should.</div><div><br></div><div><b>Q: Will this also affect Pulp 2?</b></div><div><br></div><div>We're not planning on it but if we like this enough, we can look at adding it to Pulp 2.</div><div><br></div><div><b>Q: Will this affect plugins?</b></div><div><br></div><div>We want to start out with just pulpcore now and see how we like it. Then we'll look at adding it to pulp_file. In the future, we can also look at ways to make it easy for plugins to set this up.</div><div><br></div><div><b>Q: Do I no longer need to write pulp-smash test plan issues in Github for Pulp 3 features?</b></div><div><br></div><div>No, you should still do that.</div><div><br></div><div>[0] <a href="https://coveralls.io/">https://coveralls.io/</a></div></div>