As part of the generator refactoring #310 we've mistakenly removed all the generator unit tests.
We need to revert that and add them back.
/cc @theishshah
On second thought this might not actually be an issue since we've combined all the previous generator functions into one.
https://github.com/operator-framework/operator-sdk/blob/master/pkg/generator/generator.go#L491
Taking a closer look at our previous unit tests.
We should add a code coverage indicator to prevent this kind of mistake in the future.
@theishshah As discussed offline you're right that we've reduced the generator functions down into the renderWriteFile() function and that code path can be covered by a single unit test like TestGenVersion(). Although that is only testing renderFile() and not renderWriteFile().
But the function is not the only thing that the original unit tests were meant to cover. We also need to test all of the templates themselves. So right now if someone accidentally changes any one of the templates there's nothing to test the expected output. So we need to add them back.
Most helpful comment
We should add a code coverage indicator to prevent this kind of mistake in the future.