On this topic, I wrote some scripts to help automa...
# puppet
a
On this topic, I wrote some scripts to help automate writing basic unit and host tests, because I inherited a gigantic codebase with no tests. I'm wondering if releasing it would be worthwile, or if there's a better way to do it. Mainly what it does is • Use the lexer to identify all classes and defined types in your module • Create the tests using the pre conditions and other stuff we need by rendering an erb template • Query PDB for nodes that have these resources in their catalogs ◦ Create host tests to cover said resources, prioritizing nodes that contain the highest number of resources, until they're all covered