voxpupuli / puppet-nftables

Puppet Module to manage nftables firewall rules.
Apache License 2.0
12 stars 33 forks source link

Drop (useless?) `is_expected.to compile` examples #210

Closed jay7x closed 1 year ago

jay7x commented 1 year ago

Those is_expected.to compile looks useless from my perspective because there are other examples checking for other things in the catalog. So we can see the catalog compilation is failed anyway.

The benefit here is to reduce the unit test suite execution time.

jay7x commented 1 year ago

Below are some unit test benchmarks on my m1-based macbook

Before the change: 9442 examples, 0 failures, 14 pending

After the change: 8182 examples, 0 failures, 14 pending

duritong commented 1 year ago

Afair compile does validate relationships, I don't think other tests do that.

duritong commented 1 year ago

At least in the past compile catched issues that were not visible in other tests.

duritong commented 1 year ago

Yeah this is essentially what we are interested in and what compile gives us: https://rspec-puppet.com/documentation/classes/#test-that-the-catalogue-compiles

It will test that the manifest can be compiled into a catalogue, and that the catalogue has no dependency cycles between resources.

The second part is what the other tests don't give you afair.

jay7x commented 1 year ago

Ah! Right, I didn't thought about relationship.. let's close the PR then