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

Stop using apache::apache_version #2552

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions manifests/mod/lbmethod_bybusyness.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
# Installs `lbmethod_bybusyness`.
#
# @param apache_version
# Version of Apache to install module on.
# Ignored, here for compatibility.
#
# @see https://httpd.apache.org/docs/2.4/mod/mod_lbmethod_bybusyness.html for additional documentation.
#
class apache::mod::lbmethod_bybusyness (
Optional[String] $apache_version = $apache::apache_version,
Optional[String] $apache_version = undef,
) {
require apache::mod::proxy_balancer

if versioncmp($apache_version, '2.3') >= 0 {
apache::mod { 'lbmethod_bybusyness': }
} else {
fail('Unsuported version for mod lbmethod_bybusyness')
}
apache::mod { 'lbmethod_bybusyness': }
}
10 changes: 3 additions & 7 deletions manifests/mod/lbmethod_byrequests.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
# Installs `lbmethod_byrequests`.
#
# @param apache_version
# Version of Apache to install module on.
# Ignored, here for compatibility.
#
# @see https://httpd.apache.org/docs/2.4/mod/mod_lbmethod_byrequests.html for additional documentation.
#
class apache::mod::lbmethod_byrequests (
Optional[String] $apache_version = $apache::apache_version,
Optional[String] $apache_version = undef,
) {
require apache::mod::proxy_balancer

if versioncmp($apache_version, '2.3') >= 0 {
apache::mod { 'lbmethod_byrequests': }
} else {
fail('Unsuported version for mod lbmethod_byrequests')
}
apache::mod { 'lbmethod_byrequests': }
}
10 changes: 3 additions & 7 deletions manifests/mod/lbmethod_bytraffic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
# Installs `lbmethod_bytraffic`.
#
# @param apache_version
# Version of Apache to install module on.
# Ignored, here for compatibility.
#
# @see https://httpd.apache.org/docs/2.4/mod/mod_lbmethod_bytraffic.html for additional documentation.
#
class apache::mod::lbmethod_bytraffic (
Optional[String] $apache_version = $apache::apache_version,
Optional[String] $apache_version = undef,
) {
require apache::mod::proxy_balancer

if versioncmp($apache_version, '2.3') >= 0 {
apache::mod { 'lbmethod_bytraffic': }
} else {
fail('Unsuported version for mod lbmethod_bytraffic')
}
apache::mod { 'lbmethod_bytraffic': }
}
10 changes: 3 additions & 7 deletions manifests/mod/lbmethod_heartbeat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
# Installs `lbmethod_heartbeat`.
#
# @param apache_version
# Version of Apache to install module on.
# Ignored, here for compatibility.
#
# @see https://httpd.apache.org/docs/2.4/mod/mod_lbmethod_heartbeat.html for additional documentation.
#
class apache::mod::lbmethod_heartbeat (
Optional[String] $apache_version = $apache::apache_version,
Optional[String] $apache_version = undef,
) {
require apache::mod::proxy_balancer

if versioncmp($apache_version, '2.3') >= 0 {
apache::mod { 'lbmethod_heartbeat': }
} else {
fail('Unsuported version for mod lbmethod_heartbeat')
}
apache::mod { 'lbmethod_heartbeat': }
}
24 changes: 0 additions & 24 deletions spec/classes/mod/lbmethod_bybusyness.rb

This file was deleted.

16 changes: 16 additions & 0 deletions spec/classes/mod/lbmethod_bybusyness_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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'

it {

Check failure on line 9 in spec/classes/mod/lbmethod_bybusyness_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]

Check failure on line 9 in spec/classes/mod/lbmethod_bybusyness_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
end
24 changes: 0 additions & 24 deletions spec/classes/mod/lbmethod_byrequests.rb

This file was deleted.

16 changes: 16 additions & 0 deletions spec/classes/mod/lbmethod_byrequests_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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'

it {

Check failure on line 9 in spec/classes/mod/lbmethod_byrequests_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]

Check failure on line 9 in spec/classes/mod/lbmethod_byrequests_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
end
24 changes: 0 additions & 24 deletions spec/classes/mod/lbmethod_bytraffic.rb

This file was deleted.

16 changes: 16 additions & 0 deletions spec/classes/mod/lbmethod_bytraffic_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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'

it {

Check failure on line 9 in spec/classes/mod/lbmethod_bytraffic_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]

Check failure on line 9 in spec/classes/mod/lbmethod_bytraffic_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
end
24 changes: 0 additions & 24 deletions spec/classes/mod/lbmethod_heartbeat.rb

This file was deleted.

16 changes: 16 additions & 0 deletions spec/classes/mod/lbmethod_heartbeat_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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'

it {

Check failure on line 9 in spec/classes/mod/lbmethod_heartbeat_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]

Check failure on line 9 in spec/classes/mod/lbmethod_heartbeat_spec.rb

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

apache::mod::lbmethod_byrequests on a Debian OS is expected to contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load] with ensure => "file" and content supplied string Failure/Error: expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file', 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n") expected that the catalogue would contain File[/etc/apache2/mods-enabled/lbmethod_byrequests.load]
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
end
Loading