Skip to content

Enable and correct spec files for lbmethods - #2551

Open
traylenator wants to merge 1 commit into
puppetlabs:mainfrom
traylenator:filename
Open

Enable and correct spec files for lbmethods#2551
traylenator wants to merge 1 commit into
puppetlabs:mainfrom
traylenator:filename

Conversation

@traylenator

@traylenator traylenator commented Jun 6, 2024

Copy link
Copy Markdown
Contributor

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

ekohl commented Jun 6, 2024

Copy link
Copy Markdown
Collaborator

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

@traylenator traylenator changed the title Correct filenames of spec files Enable and correct spec files for lbmethods Jun 6, 2024
@traylenator

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

A selection of spec file were missing the correct extension `_spec.rb`
and presumably never being executed.
@jst-cyr

jst-cyr commented Sep 1, 2026

Copy link
Copy Markdown
Member

@traylenator : Sorry it has been a while getting to this PR. I've rebased and re-run the CI and the spec tests are passing. I've also validated that the CI tests are indeed now running the tests that you've renamed here.

That said, something I noticed is that one of the renamed files (proxy_wstunnel_spec.rb) seems to be a stub? It doesn't seem to have any tests in it?

I'll kick off acceptance testing next.

@jst-cyr

jst-cyr commented Sep 1, 2026

Copy link
Copy Markdown
Member

Running CI tests for this PR here: #2648

@jst-cyr

jst-cyr commented Sep 1, 2026

Copy link
Copy Markdown
Member

Acceptance Test Results: https://github.com/puppetlabs/puppetlabs-apache/actions/runs/33517309532

Mostly green. SLES 12, SLES 15, and Debian 13 all failed with matching results to nightly failures against main. They do not seem to be introduced by this PR.

Next step requires an engineering review when they are available.

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.

4 participants