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

Enable and correct spec files for lbmethods #2551

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

traylenator
Copy link
Contributor

@traylenator traylenator commented Jun 6, 2024

Summary

A selection of spec file were missing the correct extension _spec.rb and presumably never being executed.
Subsequently most need updating since they were a copy and paste of one of them.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@ekohl
Copy link
Collaborator

ekohl commented Jun 6, 2024

IIRC there's a check in rubocop-rspec that finds these. Clearly there's a need for it.

A selection of spec file were missing the correct extension `_spec.rb`
and presumably never being executed.
@traylenator traylenator changed the title Correct filenames of spec files Enable and correct spec files for lbmethods Jun 6, 2024
@traylenator
Copy link
Contributor Author

IIRC there's a check in rubocop-rspec that finds these. Clearly there's a need for it.

https://www.rubydoc.info/gems/rubocop-rspec/1.0/RuboCop/Cop/RSpec/FileName

That seems a lot stricter.

rubocop/rubocop-rspec#412

context 'on a Debian OS' do
include_examples 'Debian 11'

context 'with Apache version >= 2.4' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't have any Apache < 2.4 anymore, so you can simply all files by dropping that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You start running into api change with this since apache::apache_version has to be set to apache::mod::lbmethod_heartbeat currently If you remove the necessity for that parameter and in fact the parameter completely then that's the api change.

While that's probably a good thing a separate patch I'd say.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like I missed that in cedd45b. We already dropped it from apache::balancer and everywhere else. Is it really breaking the API? The whole $apache::apache_version parameter doesn't exist anymore, which is probably why it's broken by default.

I've opened #2552 to resolve it in a compatible way. I'd prefer to base this PR on that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd prefer to base this PR on that.

Not the other way around.

  • Add tests to confirm current behaviours.
  • Change behaviour using tests to confirm that change of behaviour.

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

Successfully merging this pull request may close these issues.

3 participants