At the London Puppet User Group Meetup in May 2016, Mike Mead spoke about how we use catalog testing to quickly check for correctness in our Puppet manifests.
OS" do let(:facts) {{ :osfamily => 'Debian' }} it { should compile.with_all_deps } end context "on a RedHat OS" do let(:facts) {{ :osfamily => 'RedHat' }} it { should compile.with_all_deps } end end
[FAILED] centos_webserver (compile time: 0.08667039 seconds) ---------------------------------------- Compiled 2 catalogs in 0.1462 seconds (avg: 0.0731 seconds) 2 test cases failed. [F] centos_webserver: Could not find class nginx for webserver-a on node webserver-a [F] ubuntu_webserver: Could not find class nginx for webserver-b on node webserver-b 2 / 2 FAILED