voxpupuli / puppet-firewalld

Puppet module for managing firewalld
Apache License 2.0
40 stars 77 forks source link

modulesync 7.0.0 and modernization #347

Closed jcpunk closed 1 year ago

jcpunk commented 1 year ago

Pull Request (PR) description

Attempt at module sync to 7.0.0

This Pull Request (PR) fixes the following issues

jcpunk commented 1 year ago

@trevor-vaughan any guesses what I need to do to make simp-beaker-helpers happy? The ruby here is far out of my depth...

trevor-vaughan commented 1 year ago

@jcpunk That's a underlying library dependency conflict unfortunately. Going to have to raise the upper bound in beaker-helpers itself and make sure it doesn't break anything.

jcpunk commented 1 year ago

I'm guessing https://github.com/simp/rubygem-simp-beaker-helpers/pull/212 will fix me?

silug commented 1 year ago

I'm guessing simp/rubygem-simp-beaker-helpers#212 will fix me?

That's my hope. simp-beaker-helpers 1.32.0 should be available in a few minutes.

jcpunk commented 1 year ago

I think we're close, but I don't understand the remaining rspec errors....

silug commented 1 year ago

I think we're close, but I don't understand the remaining rspec errors....

You can fix the firewalld_version test with this:

diff --git a/spec/unit/facter/firewalld_version_spec.rb b/spec/unit/facter/firewalld_version_spec.rb
index bb943e1..4deea93 100644
--- a/spec/unit/facter/firewalld_version_spec.rb
+++ b/spec/unit/facter/firewalld_version_spec.rb
@@ -9,7 +9,7 @@ describe 'firewalld_version' do
     Process.stubs(:uid).returns(0)
     Facter::Core::Execution.stubs(:exec).with('uname -s').returns('Linux')
     Facter::Util::Resolution.stubs(:which).with('firewall-offline-cmd').returns('/usr/bin/firewall-offline-cmd')
-    Facter::Core::Execution.stubs(:execute).with('/usr/bin/firewall-offline-cmd --version', on_fail: :failed).returns(firewalld_version)
+    Facter::Core::Execution.stubs(:execute).with('/usr/bin/firewall-offline-cmd --version', on_fail: :failed).returns(firewalld_version.dup)
   end

   let(:python_args) do
jcpunk commented 1 year ago

That seems to have gotten us further! Thanks!

Any idea why it isn't running the icmp-block bits in the test? I'd swear the test is configured to say it is not enabled and for puppet to enable it...

silug commented 1 year ago

That seems to have gotten us further! Thanks!

Any idea why it isn't running the icmp-block bits in the test? I'd swear the test is configured to say it is not enabled and for puppet to enable it...

I'm having no luck figuring that one out so far.

jcpunk commented 1 year ago

For the acceptance tests, I'm thinking it might make sense to switch to the default vox ones, but my attempt to do that was unsuccessful...

jcpunk commented 1 year ago

I fought with this some more today, I feel like we're close but I'm very puzzled by the current errors...