Skip to content

Commit

Permalink
Merge pull request #203 from Valantin/drop-code
Browse files Browse the repository at this point in the history
Drop code for unsupported OS
  • Loading branch information
Valantin authored Apr 8, 2024
2 parents 3f3bd5e + 60b9fba commit 7025fed
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 72 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.

14 changes: 8 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,30 @@
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8"
"8",
"9"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"7",
"8"
"8",
"9"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
"11",
"12"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04"
"20.04",
"22.04"
]
},
{
Expand Down
18 changes: 3 additions & 15 deletions spec/classes/director_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,12 @@
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'
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
26 changes: 4 additions & 22 deletions spec/classes/storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,11 @@
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
when 'OpenBSD'
it { is_expected.to contain_package('bacula-server') }
Expand Down

0 comments on commit 7025fed

Please sign in to comment.