← Back to team overview

cloud-init team mailing list archive

Test Directories Cleanup

 

Hi All,

Currently cloud-init has unit tests in a variety of places. Many of them
reside in the dedicated cloud-init/tests/unittests/ directory, but some are
also in /tests/ subdirectories mixed in with the code. Both strategies have
pros and cons, but both strategies simultaneously (current state) it is
confusing and messy. I'd like to propose a cleanup to a single unified
strategy.

holmanb ~/cloud-init> find cloudinit -name 'test_*py'  | wc -l
47
holmanb ~/cloud-init> find tests -name 'test_*py'  | wc -l
154

I prefer a single dedicated directory for tests. This lends itself to easy
grepping the codebase without having to filter out test source from
application source. For this to work, unit test file locations have to have
a clear and obvious directory in cloud-init/unittests/. I assume that there
is probably some cleanup required on that front as part of this.

Before I start this effort I'm looking for buy-in on the approach.

Cheers,
Brett Holman