puppet_litmus 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/matrix.json +6 -1
- data/exe/matrix_from_metadata_v2 +2 -1
- data/exe/matrix_from_metadata_v3 +19 -15
- data/lib/puppet_litmus/inventory_manipulation.rb +4 -5
- data/lib/puppet_litmus/rake_helper.rb +1 -1
- data/lib/puppet_litmus/version.rb +1 -1
- data/spec/exe/fake_metadata.json +1 -1
- data/spec/exe/matrix_from_metadata_v2_spec.rb +12 -12
- data/spec/exe/matrix_from_metadata_v3_spec.rb +16 -17
- data/spec/lib/puppet_litmus/puppet_helpers_spec.rb +1 -1
- data/spec/lib/puppet_litmus/rake_helper_spec.rb +7 -7
- data/spec/lib/puppet_litmus/rake_tasks_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae343528c6aa1a501ab3a74a35413af6fa597549117eabeb8187c34620ace77b
|
|
4
|
+
data.tar.gz: '084246ae80f218ff9fee07e7dc207ffafca0d1c88e4d7bf43f4698857465098c'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b04fdf66b039df83064c3a2e658990269994a4916cba170b06b47bcf94c0ec45cc536fdc627aa7ca51b49ce6a394baa13a4c42e3ef568ed6175f6f5dc1181abe
|
|
7
|
+
data.tar.gz: c130ece42862fbc1434971b153b8ff3e5e0a8a8a9c397dbe423ccf5b347c621c656d9c0e8544d704b95de4257ab0dc13db0fe5870da5e81b814a6f18ace93b5c
|
data/exe/matrix.json
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
{
|
|
4
4
|
"puppet": 8.0,
|
|
5
5
|
"ruby": 3.2
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"puppet": 9.0,
|
|
9
|
+
"ruby": 4.0
|
|
6
10
|
}
|
|
7
11
|
],
|
|
8
12
|
"provisioners": {
|
|
@@ -44,7 +48,8 @@
|
|
|
44
48
|
"Windows": {
|
|
45
49
|
"2016": { "x86_64": "windows-2016" },
|
|
46
50
|
"2019": { "x86_64": "windows-2019" },
|
|
47
|
-
"2022": { "x86_64": "windows-2022" }
|
|
51
|
+
"2022": { "x86_64": "windows-2022" },
|
|
52
|
+
"2025": { "x86_64": "windows-2025" }
|
|
48
53
|
}
|
|
49
54
|
},
|
|
50
55
|
"docker": {
|
data/exe/matrix_from_metadata_v2
CHANGED
|
@@ -33,7 +33,8 @@ IMAGE_TABLE = {
|
|
|
33
33
|
'SLES-15' => 'sles-15',
|
|
34
34
|
'Windows-2016' => 'windows-2016',
|
|
35
35
|
'Windows-2019' => 'windows-2019',
|
|
36
|
-
'Windows-2022' => 'windows-2022'
|
|
36
|
+
'Windows-2022' => 'windows-2022',
|
|
37
|
+
'Windows-2025' => 'windows-2025'
|
|
37
38
|
}.freeze
|
|
38
39
|
|
|
39
40
|
ARM_IMAGE_TABLE = {
|
data/exe/matrix_from_metadata_v3
CHANGED
|
@@ -287,21 +287,25 @@ options[:metadata]['requirements']&.each do |req|
|
|
|
287
287
|
Action.warning('--nightly ignored: PUPPET_FORGE_TOKEN is not set, falling back to public puppet collection') \
|
|
288
288
|
if options[:nightly] && !forge_token
|
|
289
289
|
group = nightly ? "#{prefix}#{version}-nightly" : "#{prefix}#{version}"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
290
|
+
|
|
291
|
+
# puppet 9+ is only published via puppetcore; skip it when falling back to the public collection
|
|
292
|
+
if forge_token || version < 9
|
|
293
|
+
matrix[:collection] << if options[:latest_agent] && collection['puppet'] != 'nightly'
|
|
294
|
+
require 'net/http'
|
|
295
|
+
require 'json'
|
|
296
|
+
require 'uri'
|
|
297
|
+
|
|
298
|
+
uri = URI('https://forgeapi.puppet.com/private/versions/puppet-agent')
|
|
299
|
+
response = Net::HTTP.get_response(uri)
|
|
300
|
+
json_data = JSON.parse(response.body)
|
|
301
|
+
all_versions = json_data.keys
|
|
302
|
+
versionx = all_versions.select { |v| v.start_with?("#{collection['puppet'].to_i}.") }
|
|
303
|
+
versionx.sort_by { |v| Gem::Version.new(v) }.last # rubocop:disable Style/RedundantSort
|
|
304
|
+
{ collection: group, version: agent_version }
|
|
305
|
+
else
|
|
306
|
+
group
|
|
307
|
+
end
|
|
308
|
+
end
|
|
305
309
|
|
|
306
310
|
spec_matrix[:include] << {
|
|
307
311
|
puppet_version: "~> #{collection['puppet']}",
|
|
@@ -42,11 +42,10 @@ module PuppetLitmus::InventoryManipulation
|
|
|
42
42
|
# @param targets [Array]
|
|
43
43
|
# @return [Array] array of targets.
|
|
44
44
|
def find_targets(inventory_hash, targets)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
end
|
|
45
|
+
return [targets] unless targets.nil?
|
|
46
|
+
return [] unless inventory_hash['groups']
|
|
47
|
+
|
|
48
|
+
targets_in_inventory(inventory_hash) { |target| target['uri'] }
|
|
50
49
|
end
|
|
51
50
|
|
|
52
51
|
# Recursively find and iterate over the groups in an inventory. If no block is passed
|
|
@@ -133,7 +133,7 @@ module PuppetLitmus::RakeHelper # rubocop:disable Metrics/ModuleLength
|
|
|
133
133
|
# Skip forge token assignation when pointing to private collection endpoints as it is only accesible via VPN and it fails when credentials are passed.
|
|
134
134
|
forge_token = ENV.fetch('PUPPET_FORGE_TOKEN', nil)
|
|
135
135
|
params = {}
|
|
136
|
-
params['password'] = forge_token
|
|
136
|
+
params['password'] = forge_token unless !forge_token || (collection.start_with?('puppetcore') && collection.end_with?('-nightly'))
|
|
137
137
|
params['collection'] = collection if collection
|
|
138
138
|
params['version'] = puppet_version if puppet_version
|
|
139
139
|
|
data/spec/exe/fake_metadata.json
CHANGED
|
@@ -35,15 +35,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
35
35
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
|
|
36
36
|
'],',
|
|
37
37
|
'"collection":[',
|
|
38
|
-
'"
|
|
38
|
+
'"puppetcore8"',
|
|
39
39
|
']',
|
|
40
40
|
'}'
|
|
41
41
|
].join
|
|
42
42
|
)
|
|
43
43
|
expect(github_output_content).to include(
|
|
44
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
44
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
45
45
|
)
|
|
46
|
-
expect(result.stdout).to include("Created matrix with
|
|
46
|
+
expect(result.stdout).to include("Created matrix with 11 cells:\n - Acceptance Test Cells: 10\n - Spec Test Cells: 1")
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -79,15 +79,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
79
79
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
|
|
80
80
|
'],',
|
|
81
81
|
'"collection":[',
|
|
82
|
-
'"
|
|
82
|
+
'"puppetcore8"',
|
|
83
83
|
']',
|
|
84
84
|
'}'
|
|
85
85
|
].join
|
|
86
86
|
)
|
|
87
87
|
expect(github_output_content).to include(
|
|
88
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
88
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
89
89
|
)
|
|
90
|
-
expect(result.stdout).to include("Created matrix with
|
|
90
|
+
expect(result.stdout).to include("Created matrix with 10 cells:\n - Acceptance Test Cells: 9\n - Spec Test Cells: 1")
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
@@ -120,15 +120,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
120
120
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","image":"ubuntu-2204-lts-arm64"}',
|
|
121
121
|
'],',
|
|
122
122
|
'"collection":[',
|
|
123
|
-
'"
|
|
123
|
+
'"puppetcore8"',
|
|
124
124
|
']',
|
|
125
125
|
'}'
|
|
126
126
|
].join
|
|
127
127
|
)
|
|
128
128
|
expect(github_output_content).to include(
|
|
129
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
129
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
130
130
|
)
|
|
131
|
-
expect(result.stdout).to include("Created matrix with
|
|
131
|
+
expect(result.stdout).to include("Created matrix with 5 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 1")
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
134
|
|
|
@@ -159,15 +159,15 @@ RSpec.describe 'matrix_from_metadata_v2' do
|
|
|
159
159
|
'{"label":"Ubuntu-22.04","provider":"docker","image":"litmusimage/ubuntu:22.04"}',
|
|
160
160
|
'],',
|
|
161
161
|
'"collection":[',
|
|
162
|
-
'"
|
|
162
|
+
'"puppetcore8"',
|
|
163
163
|
']',
|
|
164
164
|
'}'
|
|
165
165
|
].join
|
|
166
166
|
)
|
|
167
167
|
expect(github_output_content).to include(
|
|
168
|
-
'spec_matrix={"include":[{"puppet_version":"~>
|
|
168
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
169
169
|
)
|
|
170
|
-
expect(result.stdout).to include("Created matrix with
|
|
170
|
+
expect(result.stdout).to include("Created matrix with 5 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 1")
|
|
171
171
|
end
|
|
172
172
|
end
|
|
173
173
|
end
|
|
@@ -30,7 +30,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
30
30
|
'{"label":"Ubuntu-22.04","provider":"docker","arch":"x86_64","image":"litmusimage/ubuntu:22.04","runner":"ubuntu-latest"}',
|
|
31
31
|
'],',
|
|
32
32
|
'"collection":[',
|
|
33
|
-
'"puppetcore8"',
|
|
33
|
+
'"puppetcore8","puppetcore9"',
|
|
34
34
|
']',
|
|
35
35
|
'}'
|
|
36
36
|
].join
|
|
@@ -41,7 +41,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
41
41
|
'::group::spec_matrix'
|
|
42
42
|
)
|
|
43
43
|
expect(github_output_content).to include(matrix)
|
|
44
|
-
expect(github_output_content).to include('spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}')
|
|
44
|
+
expect(github_output_content).to include('spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}')
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -65,7 +65,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
65
65
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
66
66
|
'],',
|
|
67
67
|
'"collection":[',
|
|
68
|
-
'"puppetcore8"',
|
|
68
|
+
'"puppetcore8","puppetcore9"',
|
|
69
69
|
']',
|
|
70
70
|
'}'
|
|
71
71
|
].join
|
|
@@ -84,7 +84,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
84
84
|
)
|
|
85
85
|
expect(github_output_content).to include(matrix)
|
|
86
86
|
expect(github_output_content).to include(
|
|
87
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
87
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
88
88
|
)
|
|
89
89
|
end
|
|
90
90
|
end
|
|
@@ -107,7 +107,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
107
107
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
108
108
|
'],',
|
|
109
109
|
'"collection":[',
|
|
110
|
-
'"puppetcore8"',
|
|
110
|
+
'"puppetcore8","puppetcore9"',
|
|
111
111
|
']',
|
|
112
112
|
'}'
|
|
113
113
|
].join
|
|
@@ -126,7 +126,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
126
126
|
)
|
|
127
127
|
expect(github_output_content).to include(matrix)
|
|
128
128
|
expect(github_output_content).to include(
|
|
129
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
129
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
130
130
|
)
|
|
131
131
|
end
|
|
132
132
|
end
|
|
@@ -148,7 +148,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
148
148
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
149
149
|
'],',
|
|
150
150
|
'"collection":[',
|
|
151
|
-
'"puppetcore8"',
|
|
151
|
+
'"puppetcore8","puppetcore9"',
|
|
152
152
|
']',
|
|
153
153
|
'}'
|
|
154
154
|
].join
|
|
@@ -168,7 +168,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
168
168
|
)
|
|
169
169
|
expect(github_output_content).to include(matrix)
|
|
170
170
|
expect(github_output_content).to include(
|
|
171
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
171
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
172
172
|
)
|
|
173
173
|
end
|
|
174
174
|
end
|
|
@@ -181,7 +181,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
181
181
|
'"platforms":[',
|
|
182
182
|
'],',
|
|
183
183
|
'"collection":[',
|
|
184
|
-
'"puppetcore8"',
|
|
184
|
+
'"puppetcore8","puppetcore9"',
|
|
185
185
|
']',
|
|
186
186
|
'}'
|
|
187
187
|
].join
|
|
@@ -205,7 +205,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
205
205
|
)
|
|
206
206
|
expect(github_output_content).to include(matrix)
|
|
207
207
|
expect(github_output_content).to include(
|
|
208
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
208
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
209
209
|
)
|
|
210
210
|
end
|
|
211
211
|
end
|
|
@@ -239,10 +239,9 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
239
239
|
'::group::matrix',
|
|
240
240
|
'::group::spec_matrix'
|
|
241
241
|
)
|
|
242
|
-
expect(github_output_content).to match(/"collection":\["\d{4}\.\d\.\d-puppet_enterprise","
|
|
243
|
-
|
|
242
|
+
expect(github_output_content).to match(/"collection":\[(?:"\d{4}\.\d\.\d-puppet_enterprise",)+"puppetcore8","puppetcore9"/)
|
|
244
243
|
expect(github_output_content).to include(
|
|
245
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
244
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
246
245
|
)
|
|
247
246
|
end
|
|
248
247
|
end
|
|
@@ -265,7 +264,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
265
264
|
'{"label":"Ubuntu-22.04-arm","provider":"provision_service","arch":"arm","image":"ubuntu-2204-lts-arm64","runner":"ubuntu-latest"}',
|
|
266
265
|
'],',
|
|
267
266
|
'"collection":[',
|
|
268
|
-
'"puppetcore8-nightly"',
|
|
267
|
+
'"puppetcore8-nightly","puppetcore9-nightly"',
|
|
269
268
|
']',
|
|
270
269
|
'}'
|
|
271
270
|
].join
|
|
@@ -284,7 +283,7 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
284
283
|
)
|
|
285
284
|
expect(github_output_content).to include(matrix)
|
|
286
285
|
expect(github_output_content).to include(
|
|
287
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
286
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
288
287
|
)
|
|
289
288
|
end
|
|
290
289
|
end
|
|
@@ -330,9 +329,9 @@ RSpec.describe 'matrix_from_metadata_v3' do
|
|
|
330
329
|
'::group::spec_matrix'
|
|
331
330
|
)
|
|
332
331
|
expect(github_output_content).to match(/{"collection":"puppetcore8","version":"\d+\.\d+\.\d+"}/)
|
|
333
|
-
|
|
332
|
+
expect(github_output_content).to match(/{"collection":"puppetcore9","version":("\d+\.\d+\.\d+"|null)}/)
|
|
334
333
|
expect(github_output_content).to include(
|
|
335
|
-
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
|
|
334
|
+
'spec_matrix={"include":[{"puppet_version":"~> 8.0","ruby_version":3.2},{"puppet_version":"~> 9.0","ruby_version":4.0}]}'
|
|
336
335
|
)
|
|
337
336
|
end
|
|
338
337
|
end
|
|
@@ -275,7 +275,7 @@ RSpec.describe PuppetLitmus::PuppetHelpers do
|
|
|
275
275
|
expect(self).to receive(:target_in_inventory?).and_return(true)
|
|
276
276
|
expect(self).to receive(:run_task).with(task_name, 'some.host', params, config: config_data, inventory: inventory_hash).and_return(result_structured_task_success)
|
|
277
277
|
method_result = run_bolt_task(task_name, params, opts: {})
|
|
278
|
-
expect(method_result.stdout).to eq('
|
|
278
|
+
expect(method_result.stdout).to eq({ 'key1' => 'foo', 'key2' => 'bar' }.to_s)
|
|
279
279
|
expect(method_result.result['key1']).to eq('foo')
|
|
280
280
|
expect(method_result.result['key2']).to eq('bar')
|
|
281
281
|
end
|
|
@@ -132,32 +132,32 @@ RSpec.describe PuppetLitmus::RakeHelper do
|
|
|
132
132
|
end
|
|
133
133
|
let(:targets) { ['some.host'] }
|
|
134
134
|
let(:token) { 'some_token' }
|
|
135
|
-
let(:params) { { 'collection' => '
|
|
135
|
+
let(:params) { { 'collection' => 'puppet8', 'password' => token } }
|
|
136
136
|
|
|
137
137
|
it 'calls function' do
|
|
138
138
|
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return(nil)
|
|
139
139
|
allow(ENV).to receive(:fetch).with('PUPPET_FORGE_TOKEN', nil).and_return(token)
|
|
140
140
|
allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'puppet_agent')).and_return(true)
|
|
141
141
|
allow_any_instance_of(BoltSpec::Run).to receive(:run_task).with('puppet_agent::install', targets, params, config: described_class::DEFAULT_CONFIG_DATA, inventory: inventory_hash).and_return([])
|
|
142
|
-
install_agent('
|
|
142
|
+
install_agent('puppet8', targets, inventory_hash)
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
it 'adds puppet version' do
|
|
146
|
-
params = { 'collection' => '
|
|
147
|
-
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return('
|
|
146
|
+
params = { 'collection' => 'puppet8', 'version' => '8.0.0' }
|
|
147
|
+
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return('8.0.0')
|
|
148
148
|
allow(ENV).to receive(:fetch).with('PUPPET_FORGE_TOKEN', nil).and_return(nil)
|
|
149
149
|
allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'puppet_agent')).and_return(true)
|
|
150
150
|
allow_any_instance_of(BoltSpec::Run).to receive(:run_task).with('puppet_agent::install', targets, params, config: described_class::DEFAULT_CONFIG_DATA, inventory: inventory_hash).and_return([])
|
|
151
|
-
install_agent('
|
|
151
|
+
install_agent('puppet8', targets, inventory_hash)
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
it 'fails for puppetcore if no token supplied' do
|
|
155
|
-
params = { 'collection' => '
|
|
155
|
+
params = { 'collection' => 'puppetcore8' }
|
|
156
156
|
allow(ENV).to receive(:fetch).with('PUPPET_VERSION', nil).and_return(nil)
|
|
157
157
|
allow(ENV).to receive(:fetch).with('PUPPET_FORGE_TOKEN', nil).and_return(nil)
|
|
158
158
|
allow(File).to receive(:directory?).with(File.join(described_class::DEFAULT_CONFIG_DATA['modulepath'], 'puppet_agent')).and_return(true)
|
|
159
159
|
allow_any_instance_of(BoltSpec::Run).to receive(:run_task).with('puppet_agent::install', targets, params, config: described_class::DEFAULT_CONFIG_DATA, inventory: inventory_hash).and_return([])
|
|
160
|
-
expect { install_agent('
|
|
160
|
+
expect { install_agent('puppetcore8', targets, inventory_hash) }.to raise_error(RuntimeError, /puppetcore agent installs require a valid PUPPET_FORGE_TOKEN set in the env\./)
|
|
161
161
|
end
|
|
162
162
|
end
|
|
163
163
|
|
|
@@ -77,7 +77,7 @@ describe 'litmus rake tasks' do
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
context 'with litmus:install_modules_from_directory' do
|
|
80
|
-
let(:inventory_hash) { { 'groups' => [{ 'name' => 'ssh_nodes', '
|
|
80
|
+
let(:inventory_hash) { { 'groups' => [{ 'name' => 'ssh_nodes', 'targets' => [{ 'uri' => 'some.host' }] }] } }
|
|
81
81
|
let(:target_dir) { File.join(Dir.pwd, 'spec/fixtures/modules') }
|
|
82
82
|
let(:dummy_tar) { 'spec/data/doot.tar.gz' }
|
|
83
83
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: puppet_litmus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bolt
|