Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beaker acceptance test : add idempotency check #225

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Dan33l
Copy link
Member

@Dan33l Dan33l commented Sep 20, 2024

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
@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
Copy link
Member

@jhoblitt jhoblitt left a comment

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
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
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
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
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
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
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
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
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.

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.

3 participants