Skip to content

Commit

Permalink
Drop unused code for usupported OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Valentini committed Apr 5, 2024
1 parent a31b23c commit 7a42bd5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 66 deletions.
8 changes: 0 additions & 8 deletions data/os/Debian/Debian/7.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions data/os/Debian/Debian/8.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions data/os/RedHat/CentOS/6.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions data/os/RedHat/RedHat/6.yaml

This file was deleted.

17 changes: 2 additions & 15 deletions spec/classes/director_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,11 @@
when 'Debian'
it { is_expected.to contain_class('bacula::director') }

case facts[:os]['release']['major']
when '7', '8'
expected_packages << 'bacula-director-common'
when '9'
expected_packages << 'bacula-director'
end
expected_packages << 'bacula-director-pgsql'
expected_packages << 'bacula-console'
when 'RedHat'
case facts[:os]['release']['major']
when '6'
expected_packages << 'bacula-director-common'
expected_packages << 'bacula-console'
expected_packages << 'bacula-director'
else
expected_packages << 'bacula-director'
expected_packages << 'bacula-console'
end
expected_packages << 'bacula-director'
expected_packages << 'bacula-console'
when 'OpenBSD'
expected_packages << 'bacula-server'
expected_packages << 'bacula-pgsql'
Expand Down
28 changes: 6 additions & 22 deletions spec/classes/storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,14 @@
case facts[:os]['family']
when 'Debian'
it { is_expected.to contain_package('bacula-sd') }

case facts[:os]['release']['major']
when '7', '8'
it { is_expected.to contain_package('bacula-sd-pgsql') }
end
when 'RedHat'
case facts[:os]['release']['major']
when '6'
it do
is_expected.to contain_package('bacula-storage-common').with(
'ensure' => 'installed'
)
end

it { is_expected.not_to contain_package('bacula-storage') }
else
it do
is_expected.to contain_package('bacula-storage').with(
'ensure' => 'installed'
)
end

it { is_expected.not_to contain_package('bacula-storage-common') }
it do
is_expected.to contain_package('bacula-storage').with(
'ensure' => 'installed'
)
end

it { is_expected.not_to contain_package('bacula-storage-common') }
when 'OpenBSD'
it { is_expected.to contain_package('bacula-server') }
when 'FreeBSD'
Expand Down

0 comments on commit 7a42bd5

Please sign in to comment.