-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
traylenator
wants to merge
1
commit into
puppetlabs:main
Choose a base branch
from
traylenator:filename
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+148
−96
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'apache::mod::lbmethod_bybusyness', type: :class do | ||
context 'on a Debian OS' do | ||
include_examples 'Debian 11' | ||
|
||
context 'with Apache version >= 2.4' do | ||
let :params do | ||
{ | ||
apache_version: '2.4' | ||
} | ||
end | ||
|
||
it { is_expected.to contain_class('apache::mod::proxy_balancer') } | ||
it { is_expected.to contain_apache__mod('lbmethod_bybusyness') } | ||
it { | ||
is_expected.to contain_file('lbmethod_bybusyness.load').with( | ||
{ | ||
path: '/etc/apache2/mods-available/lbmethod_bybusyness.load', | ||
content: "LoadModule lbmethod_bybusyness_module /usr/lib/apache2/modules/mod_lbmethod_bybusyness.so\n", | ||
}, | ||
) | ||
} | ||
it { | ||
is_expected.to contain_file('lbmethod_bybusyness.load symlink').with( | ||
{ | ||
ensure: 'link', | ||
path: '/etc/apache2/mods-enabled/lbmethod_bybusyness.load', | ||
target: '/etc/apache2/mods-available/lbmethod_bybusyness.load', | ||
}, | ||
) | ||
} | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'apache::mod::lbmethod_byrequests', type: :class do | ||
context 'on a Debian OS' do | ||
include_examples 'Debian 11' | ||
|
||
context 'with Apache version >= 2.4' do | ||
let :params do | ||
{ | ||
apache_version: '2.4' | ||
} | ||
end | ||
|
||
it { is_expected.to contain_class('apache::mod::proxy_balancer') } | ||
it { is_expected.to contain_apache__mod('lbmethod_byrequests') } | ||
it { | ||
is_expected.to contain_file('lbmethod_byrequests.load').with( | ||
{ | ||
path: '/etc/apache2/mods-available/lbmethod_byrequests.load', | ||
content: "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n", | ||
}, | ||
) | ||
} | ||
it { | ||
is_expected.to contain_file('lbmethod_byrequests.load symlink').with( | ||
{ | ||
ensure: 'link', | ||
path: '/etc/apache2/mods-enabled/lbmethod_byrequests.load', | ||
target: '/etc/apache2/mods-available/lbmethod_byrequests.load', | ||
}, | ||
) | ||
} | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'apache::mod::lbmethod_bytraffic', type: :class do | ||
context 'on a Debian OS' do | ||
include_examples 'Debian 11' | ||
|
||
context 'with Apache version >= 2.4' do | ||
let :params do | ||
{ | ||
apache_version: '2.4' | ||
} | ||
end | ||
|
||
it { is_expected.to contain_class('apache::mod::proxy_balancer') } | ||
it { is_expected.to contain_apache__mod('lbmethod_bytraffic') } | ||
it { | ||
is_expected.to contain_file('lbmethod_bytraffic.load').with( | ||
{ | ||
path: '/etc/apache2/mods-available/lbmethod_bytraffic.load', | ||
content: "LoadModule lbmethod_bytraffic_module /usr/lib/apache2/modules/mod_lbmethod_bytraffic.so\n", | ||
}, | ||
) | ||
} | ||
it { | ||
is_expected.to contain_file('lbmethod_bytraffic.load symlink').with( | ||
{ | ||
ensure: 'link', | ||
path: '/etc/apache2/mods-enabled/lbmethod_bytraffic.load', | ||
target: '/etc/apache2/mods-available/lbmethod_bytraffic.load', | ||
}, | ||
) | ||
} | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'apache::mod::lbmethod_heartbeat', type: :class do | ||
context 'on a Debian OS' do | ||
include_examples 'Debian 11' | ||
|
||
context 'with Apache version >= 2.4' do | ||
let :params do | ||
{ | ||
apache_version: '2.4' | ||
} | ||
end | ||
|
||
it { is_expected.to contain_class('apache::mod::proxy_balancer') } | ||
it { is_expected.to contain_apache__mod('lbmethod_heartbeat') } | ||
it { | ||
is_expected.to contain_file('lbmethod_heartbeat.load').with( | ||
{ | ||
path: '/etc/apache2/mods-available/lbmethod_heartbeat.load', | ||
content: "LoadModule lbmethod_heartbeat_module /usr/lib/apache2/modules/mod_lbmethod_heartbeat.so\n", | ||
}, | ||
) | ||
} | ||
it { | ||
is_expected.to contain_file('lbmethod_heartbeat.load symlink').with( | ||
{ | ||
ensure: 'link', | ||
path: '/etc/apache2/mods-enabled/lbmethod_heartbeat.load', | ||
target: '/etc/apache2/mods-available/lbmethod_heartbeat.load', | ||
}, | ||
) | ||
} | ||
end | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 toapache::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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the other way around.