Skip to content

Commit 47bf66c

Browse files
committed
(maint) Add macOS 12
1 parent 9960829 commit 47bf66c

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@
131131
"operatingsystemrelease": [
132132
"10.14",
133133
"10.15",
134-
"11"
134+
"11",
135+
"12"
135136
]
136137
},
137138
{

spec/classes/puppet_agent_osfamily_darwin_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
let(:params) { { package_version: package_version } }
3232

3333
context 'when running a supported OSX' do
34-
['osx-10.12-x86_64', 'osx-10.13-x86_64', 'osx-10.14-x86_64', 'osx-10.15-x86_64', 'osx-11-x86_64'].each do |tag|
34+
['osx-10.15-x86_64', 'osx-11-x86_64', 'osx-12-x86_64'].each do |tag|
3535
context "on #{tag} with no aio_version" do
3636
let(:osmajor) { tag.split('-')[1] }
3737

task_spec/spec/acceptance/init_spec.rb

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,20 @@ def target_platform
4444
'6.15.0'
4545
when %r{osx-11}
4646
'6.23.0'
47+
when %r{osx-12}
48+
'6.27.1'
4749
else
4850
'6.17.0'
4951
end
5052

53+
# we can only tests puppet 6.x -> 6.y upgrades if there multiple versions
54+
multiple_puppet6_versions = case target_platform
55+
when %r{osx-12}
56+
false
57+
else
58+
true
59+
end
60+
5161
# extra request is needed on windows hosts
5262
# this will fail with "execution expired"
5363
run_task('puppet_agent::version', 'target', {}) if %r{win}.match?(target_platform)
@@ -98,17 +108,22 @@ def target_platform
98108
expect(res['value']['source']).to be
99109
end
100110

101-
# Upgrade to latest puppet6 version
102-
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6', 'version' => 'latest' })
103-
expect(results).to all(include('status' => 'success'))
111+
# An OS needs to be supported for more than one 6.x release to test the
112+
# upgrade from puppet_6_version to latest
113+
if multiple_puppet6_versions
104114

105-
# Verify that it upgraded
106-
results = run_task('puppet_agent::version', 'target', {})
107-
results.each do |res|
108-
expect(res).to include('status' => 'success')
109-
expect(res['value']['version']).not_to eq(puppet_6_version)
110-
expect(res['value']['version']).to match(%r{^6\.\d+\.\d+})
111-
expect(res['value']['source']).to be
115+
# Upgrade to latest puppet6 version
116+
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6', 'version' => 'latest' })
117+
expect(results).to all(include('status' => 'success'))
118+
119+
# Verify that it upgraded
120+
results = run_task('puppet_agent::version', 'target', {})
121+
results.each do |res|
122+
expect(res).to include('status' => 'success')
123+
expect(res['value']['version']).not_to eq(puppet_6_version)
124+
expect(res['value']['version']).to match(%r{^6\.\d+\.\d+})
125+
expect(res['value']['source']).to be
126+
end
112127
end
113128

114129
# Puppet Agent can't be upgraded on Windows nodes while 'puppet agent' service or 'pxp-agent' service are running

tasks/install_shell.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ if [ -f "$PT__installdir/facts/tasks/bash.sh" ]; then
239239
"10.14") platform_version="10.14";;
240240
"10.15") platform_version="10.15";;
241241
"11") platform_version="11";;
242+
"12") platform_version="12";;
242243
*) echo "No builds for platform: $major_version"
243244
exit 1
244245
;;

0 commit comments

Comments
 (0)