Skip to content

Conversation

@alaunay
Copy link
Contributor

@alaunay alaunay commented Dec 5, 2025

Pull Request (PR) description

add support for Debian 13

This Pull Request (PR) fixes the following issues

# in this case
case facts[:os]['release']['major']
when '11', '12'
when '11', '12', '13'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole case statement can go away now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can. After simplification, this stays:

        describe 'manage_snmpdtrapd => false Debian' do
           let(:params) { { manage_snmptrapd: false } }
        end

I've no idea what it means, I don't speak ruby :/ So I'm unsure if this could disappear too.

Copy link

@Joris29 Joris29 Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means you try a test with with parameter manage_snmptrapd: false on Debian, this can stay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like removing the case breaks things. I don't understand why :(

when '11', '12', '13'
it { is_expected.to contain_file('snmpd.sysconfig').without_content(%r{TRAPDRUN|TRAPDOPTS}) }
end
end
Copy link

@Joris29 Joris29 Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't really make a lot of sense to me as you don't test something specific for the parameter you set.
So either remove this whole describe block or actually test what the expected behavior would be.

In the describe block under let parameters you can add the following:
it { is_expected.not_to contain_systemd__dropin_file('snmptrapd.conf') }
it { is_expected.not_to contain_file('snmptrapd.sysconfig') }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bastelfreak What are your thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants