diff --git a/spec/classes/mod/lbmethod_bybusyness.rb b/spec/classes/mod/lbmethod_bybusyness.rb deleted file mode 100644 index 2a54c8335e..0000000000 --- a/spec/classes/mod/lbmethod_bybusyness.rb +++ /dev/null @@ -1,24 +0,0 @@ -# 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 { - # 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 -end diff --git a/spec/classes/mod/lbmethod_bybusyness_spec.rb b/spec/classes/mod/lbmethod_bybusyness_spec.rb new file mode 100644 index 0000000000..6f12d39286 --- /dev/null +++ b/spec/classes/mod/lbmethod_bybusyness_spec.rb @@ -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 diff --git a/spec/classes/mod/lbmethod_byrequests.rb b/spec/classes/mod/lbmethod_byrequests.rb deleted file mode 100644 index 2a54c8335e..0000000000 --- a/spec/classes/mod/lbmethod_byrequests.rb +++ /dev/null @@ -1,24 +0,0 @@ -# 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 { - # 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 -end diff --git a/spec/classes/mod/lbmethod_byrequests_spec.rb b/spec/classes/mod/lbmethod_byrequests_spec.rb new file mode 100644 index 0000000000..b1c0be0126 --- /dev/null +++ b/spec/classes/mod/lbmethod_byrequests_spec.rb @@ -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 diff --git a/spec/classes/mod/lbmethod_bytraffic.rb b/spec/classes/mod/lbmethod_bytraffic.rb deleted file mode 100644 index 2a54c8335e..0000000000 --- a/spec/classes/mod/lbmethod_bytraffic.rb +++ /dev/null @@ -1,24 +0,0 @@ -# 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 { - # 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 -end diff --git a/spec/classes/mod/lbmethod_bytraffic_spec.rb b/spec/classes/mod/lbmethod_bytraffic_spec.rb new file mode 100644 index 0000000000..29cfbd70a0 --- /dev/null +++ b/spec/classes/mod/lbmethod_bytraffic_spec.rb @@ -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 diff --git a/spec/classes/mod/lbmethod_heartbeat.rb b/spec/classes/mod/lbmethod_heartbeat.rb deleted file mode 100644 index 2a54c8335e..0000000000 --- a/spec/classes/mod/lbmethod_heartbeat.rb +++ /dev/null @@ -1,24 +0,0 @@ -# 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 { - # 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 -end diff --git a/spec/classes/mod/lbmethod_heartbeat_spec.rb b/spec/classes/mod/lbmethod_heartbeat_spec.rb new file mode 100644 index 0000000000..cd550a56e2 --- /dev/null +++ b/spec/classes/mod/lbmethod_heartbeat_spec.rb @@ -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 diff --git a/spec/classes/mod/lookup_identity.rb b/spec/classes/mod/lookup_identity_spec.rb similarity index 100% rename from spec/classes/mod/lookup_identity.rb rename to spec/classes/mod/lookup_identity_spec.rb diff --git a/spec/classes/mod/proxy_wstunnel.rb b/spec/classes/mod/proxy_wstunnel_spec.rb similarity index 100% rename from spec/classes/mod/proxy_wstunnel.rb rename to spec/classes/mod/proxy_wstunnel_spec.rb