Skip to content

Beaker acceptance test : add idempotency check - #225

Open
Dan33l wants to merge 2 commits into
voxpupuli:masterfrom
Dan33l:acceptance
Open

Beaker acceptance test : add idempotency check#225
Dan33l wants to merge 2 commits into
voxpupuli:masterfrom
Dan33l:acceptance

Conversation

@Dan33l

@Dan33l Dan33l commented Sep 20, 2024

Copy link
Copy Markdown
Member

This PR also:

  • add some rework because fail2ban::config and fail2ban::service are privates
  • drop unused files
  • rename spec file accordingly with tested class

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@Dan33l Dan33l changed the title Beaker acceptance test : add idempotency check WIP : Beaker acceptance test : add idempotency check Sep 20, 2024
Comment thread spec/acceptance/fail2ban_spec.rb Outdated
@Dan33l
Dan33l force-pushed the acceptance branch 3 times, most recently from b4f61bf to 34172f7 Compare September 23, 2024 13:12
* add idempotency check
* rework because fail2ban::config and fail2ban::service are privates
* renaming accordingly with name of tested class
@Dan33l Dan33l changed the title WIP : Beaker acceptance test : add idempotency check Beaker acceptance test : add idempotency check Sep 23, 2024

@jhoblitt jhoblitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm OK with in-lining the manifest instead of using an example file although I do generally prefer using examples. The outdenting is kind of odd and should be fixed.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
class { 'fail2ban': }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be indented instead of outdented. I'm surprised that rubocop didn't warn on this...

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
class { 'fail2ban':

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
$_config_file_template = $facts['os']['family'] ? {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
$_config_file_template = $facts['os']['family'] ? {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
$_config_file_template = $facts['os']['family'] ? {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
$_config_file_template = $facts['os']['family'] ? {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
class { 'fail2ban':

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-EOS
class { 'fail2ban':

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same issue with outdenting. This would also be better as an example/*.pp so that it is linted.

@traylenator traylenator added the needs-work not ready to merge just yet label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-work not ready to merge just yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants