Skip to content

Commit 55b9a53

Browse files
authored
Merge pull request #280 from smortex/metadata
2 parents 9679304 + 7727018 commit 55b9a53

File tree

2 files changed

+71
-32
lines changed

2 files changed

+71
-32
lines changed

metadata.json

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"project_page": "https://github.com/choria-io/puppet-choria",
99
"issues_url": "https://github.com/choria-io/puppet-choria/issues",
1010
"dependencies": [
11-
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 4.24.0 < 8.0.0" },
11+
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 4.24.0 < 9.0.0" },
1212
{ "name": "puppetlabs/apt", "version_requirement": ">= 4.5.1 < 9.0.0" },
1313
{ "name": "choria/mcollective_choria", "version_requirement": ">= 0.21.2 < 2.0.0" },
1414
{ "name": "choria/mcollective", "version_requirement": ">= 0.13.4 < 2.0.0" },
@@ -20,19 +20,59 @@
2020
],
2121
"operatingsystem_support": [
2222
{
23-
"operatingsystem": "RedHat",
23+
"operatingsystem": "AIX",
24+
"operatingsystemrelease": [
25+
"7.1",
26+
"7.2"
27+
]
28+
},
29+
{
30+
"operatingsystem": "AlmaLinux",
2431
"operatingsystemrelease": [
25-
"7",
2632
"8"
2733
]
2834
},
35+
{
36+
"operatingsystem": "Archlinux"
37+
},
2938
{
3039
"operatingsystem": "CentOS",
3140
"operatingsystemrelease": [
3241
"7",
3342
"8"
3443
]
3544
},
45+
{
46+
"operatingsystem": "Darwin",
47+
"operatingsystemrelease": [
48+
"10.11",
49+
"10.12",
50+
"10.13"
51+
]
52+
},
53+
{
54+
"operatingsystem": "Debian",
55+
"operatingsystemrelease": [
56+
"9",
57+
"10",
58+
"11"
59+
]
60+
},
61+
{
62+
"operatingsystem": "Fedora",
63+
"operatingsystemrelease": [
64+
"33",
65+
"34",
66+
"35"
67+
]
68+
},
69+
{
70+
"operatingsystem": "FreeBSD",
71+
"operatingsystemrelease": [
72+
"12",
73+
"13"
74+
]
75+
},
3676
{
3777
"operatingsystem": "OracleLinux",
3878
"operatingsystemrelease": [
@@ -41,39 +81,36 @@
4181
]
4282
},
4383
{
44-
"operatingsystem": "Scientific",
84+
"operatingsystem": "RedHat",
4585
"operatingsystemrelease": [
4686
"7",
4787
"8"
4888
]
4989
},
5090
{
51-
"operatingsystem": "Fedora",
91+
"operatingsystem": "RockyLinux",
5292
"operatingsystemrelease": [
53-
"32",
54-
"33",
55-
"34"
93+
"8"
5694
]
5795
},
5896
{
59-
"operatingsystem": "SLES",
97+
"operatingsystem": "Scientific",
6098
"operatingsystemrelease": [
61-
"11 SP1",
62-
"12"
99+
"7",
100+
"8"
63101
]
64102
},
65103
{
66-
"operatingsystem": "Debian",
104+
"operatingsystem": "SLES",
67105
"operatingsystemrelease": [
68-
"9",
69-
"10",
70-
"11"
106+
"11",
107+
"12",
108+
"15"
71109
]
72110
},
73111
{
74112
"operatingsystem": "Ubuntu",
75113
"operatingsystemrelease": [
76-
"16.04",
77114
"18.04",
78115
"20.04"
79116
]
@@ -83,22 +120,18 @@
83120
"operatingsystemrelease": [
84121
"Server 2012",
85122
"Server 2012 R2",
86-
"7",
87-
"8"
88-
]
89-
},
90-
{
91-
"operatingsystem": "FreeBSD",
92-
"operatingsystemrelease": [
93-
"11",
94-
"12"
123+
"Server 2016",
124+
"Server 2019",
125+
"Server 2022",
126+
"8",
127+
"10"
95128
]
96129
}
97130
],
98131
"requirements": [
99132
{
100133
"name": "puppet",
101-
"version_requirement": ">= 6.0.0"
134+
"version_requirement": ">= 6.0.0 < 8.0.0"
102135
}
103136
]
104137
}

spec/classes/init_spec.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
it { is_expected.to contain_file("/usr/local/etc/choria/machine").with_ensure("directory") }
6666
end
6767

68-
if ["FreeBSD", "AIX", "Solaris", "windows", "SLES"].include? facts[:os]["name"]
68+
if ["Archlinux", "AIX", "FreeBSD", "SLES", "Solaris", "windows"].include? facts[:os]["name"]
6969
it { is_expected.not_to contain_class("choria::repo") }
7070
else
7171
it { is_expected.to contain_class("choria::repo") }
@@ -86,7 +86,7 @@
8686
{ manage_package_repo: true, manage_mcollective: false }
8787
end
8888

89-
if facts[:kernel] == "Linux" and facts[:os]["family"] != "Suse"
89+
if facts[:kernel] == "Linux" and ! ["Archlinux", "Suse"].include?(facts[:os]["family"])
9090
it { is_expected.to contain_class("choria::repo").with_nightly(false) }
9191
it { is_expected.to contain_class("choria::repo").with_ensure("present") }
9292
else
@@ -103,7 +103,7 @@
103103
end
104104
end
105105

106-
context "with managed repos", if: (facts[:kernel] == "Linux" and facts[:os]["family"] != "Suse") do
106+
context "with managed repos", if: (facts[:kernel] == "Linux" and ! ["Archlinux", "Suse"].include?(facts[:os]["family"])) do
107107
let(:params) do
108108
{
109109
manage_package_repo: true,
@@ -233,7 +233,7 @@
233233
end
234234
end
235235

236-
context "with package set to a specific version" do
236+
context "with package set to a specific version", unless: facts[:os]["family"] == "Archlinux" do
237237
let :params do
238238
{
239239
manage_mcollective: false,
@@ -269,8 +269,14 @@
269269
if facts[:kernel] == "windows"
270270
it { is_expected.not_to contain_package("choria") }
271271
else
272-
it "should use the correct ensure value" do
273-
is_expected.to contain_package("choria").with_ensure("absent")
272+
if facts[:os]["family"] == "Archlinux"
273+
it "should use the correct ensure value" do
274+
is_expected.to contain_package("choria-io").with_ensure("absent")
275+
end
276+
else
277+
it "should use the correct ensure value" do
278+
is_expected.to contain_package("choria").with_ensure("absent")
279+
end
274280
end
275281
end
276282
end

0 commit comments

Comments
 (0)