voxpupuli-acceptance 3.4.0 → 3.5.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/lib/voxpupuli/acceptance/examples.rb +3 -0
- data/lib/voxpupuli/acceptance/facts.rb +4 -1
- data/lib/voxpupuli/acceptance/fixtures.rb +6 -4
- data/lib/voxpupuli/acceptance/rake.rb +2 -0
- data/lib/voxpupuli/acceptance/serverspec_extensions/curl_command.rb +4 -2
- data/lib/voxpupuli/acceptance/serverspec_extensions.rb +2 -0
- data/lib/voxpupuli/acceptance/spec_helper_acceptance.rb +7 -5
- metadata +20 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b94004396716a88abf812b4b9eb36e8ec6cf29ef9faaf7b3abcc5494c164aec5
|
4
|
+
data.tar.gz: fbb13171a4eade95e39fabc99609d6ee286269b713834d6f161928fd38525055
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb81c5a2090cede4108248a8958b5d1d4d03b9eb5941914c98d0a7f109e708a07a0a584bd2a8e0abc92b36a820d54702d4543f3b776cb7b7cd91ba37bb5cd45e
|
7
|
+
data.tar.gz: 515e5307d2ad807862a07a5f7d0c97f4628c74cf524ea7fa2ffe1ed1309079cd4ddedfbfcff3052c36409bad5b8cf9496dc81471f4942e06c0d9ea4e363480a6
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
shared_examples 'an idempotent resource' do |host|
|
2
4
|
host ||= default
|
3
5
|
|
@@ -15,6 +17,7 @@ shared_examples 'the example' do |name, host|
|
|
15
17
|
let(:manifest) do
|
16
18
|
path = File.join(Dir.pwd, 'examples', name)
|
17
19
|
raise Exception, "Example '#{path}' does not exist" unless File.exist?(path)
|
20
|
+
|
18
21
|
File.read(path)
|
19
22
|
end
|
20
23
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Voxpupuli
|
2
4
|
module Acceptance
|
3
5
|
class Facts
|
@@ -23,7 +25,8 @@ module Voxpupuli
|
|
23
25
|
|
24
26
|
if beaker_facts.any?
|
25
27
|
require 'json'
|
26
|
-
on(hosts,
|
28
|
+
on(hosts,
|
29
|
+
"mkdir -p #{File.dirname(FACT_FILE)} && cat <<VOXPUPULI_BEAKER_ENV_VARS > #{FACT_FILE}\n#{beaker_facts.to_json}\nVOXPUPULI_BEAKER_ENV_VARS")
|
27
30
|
else
|
28
31
|
on(hosts, "rm -f #{FACT_FILE}")
|
29
32
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'tmpdir'
|
2
4
|
require 'puppet/modulebuilder'
|
3
5
|
|
@@ -52,7 +54,7 @@ module Voxpupuli
|
|
52
54
|
if logger
|
53
55
|
logger.warn(warning)
|
54
56
|
else
|
55
|
-
|
57
|
+
warn(warning)
|
56
58
|
end
|
57
59
|
end
|
58
60
|
|
@@ -101,9 +103,9 @@ module Voxpupuli
|
|
101
103
|
#
|
102
104
|
# @param [Host, String, Symbol] host
|
103
105
|
# The beaker host to run on
|
104
|
-
def temp_dir_on(host
|
105
|
-
result = on host,
|
106
|
-
raise
|
106
|
+
def temp_dir_on(host)
|
107
|
+
result = on host, 'mktemp -d'
|
108
|
+
raise 'Could not create directory' unless result.success?
|
107
109
|
|
108
110
|
dir = result.stdout.strip
|
109
111
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# written by https://github.com/ekohl
|
2
4
|
# https://github.com/mizzy/serverspec/pull/611 was rejected so adding it here.
|
3
5
|
|
@@ -8,7 +10,7 @@ module Voxpupuli
|
|
8
10
|
module ServerspecExtensions
|
9
11
|
class CurlCommand < Serverspec::Type::Command
|
10
12
|
def response_code
|
11
|
-
m =
|
13
|
+
m = /Response-Code: (?<code>\d+)/.match(stderr)
|
12
14
|
return 0 unless m
|
13
15
|
|
14
16
|
m[:code].to_i
|
@@ -27,7 +29,7 @@ module Voxpupuli
|
|
27
29
|
def curl_command
|
28
30
|
# curl supports %{stderr} to --write-out since 7.63.0
|
29
31
|
# so the following doesn't work on EL8, which has curl 7.61.1
|
30
|
-
command = "curl --silent --write-out '%{stderr}Response-Code: %{response_code}\\n' '#{@name}'"
|
32
|
+
command = "curl --silent --write-out '%{stderr}Response-Code: %{response_code}\\n' '#{@name}'" # rubocop:disable Style/FormatStringToken
|
31
33
|
|
32
34
|
@options.each do |option, value|
|
33
35
|
case option
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'examples'
|
2
4
|
require_relative 'serverspec_extensions'
|
3
5
|
|
@@ -19,7 +21,9 @@ def configure_beaker(modules: :metadata, &block)
|
|
19
21
|
unless %w[none preinstalled].include?(collection)
|
20
22
|
BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(host, collection)
|
21
23
|
end
|
22
|
-
package_name = ENV.fetch('BEAKER_PUPPET_PACKAGE_NAME'
|
24
|
+
package_name = ENV.fetch('BEAKER_PUPPET_PACKAGE_NAME') do
|
25
|
+
BeakerPuppetHelpers::InstallUtils.collection2packagename(host, collection, prefer_aio: collection != 'none')
|
26
|
+
end
|
23
27
|
host.install_package(package_name)
|
24
28
|
|
25
29
|
# by default, puppet-agent creates /etc/profile.d/puppet-agent.sh which adds /opt/puppetlabs/bin to PATH
|
@@ -71,9 +75,7 @@ def configure_beaker(modules: :metadata, &block)
|
|
71
75
|
end
|
72
76
|
|
73
77
|
RSpec.configure do |c|
|
74
|
-
if ENV['GITHUB_ACTIONS'] == 'true'
|
75
|
-
c.formatter = 'RSpec::Github::Formatter'
|
76
|
-
end
|
78
|
+
c.formatter = 'RSpec::Github::Formatter' if ENV['GITHUB_ACTIONS'] == 'true'
|
77
79
|
|
78
80
|
# Fact handling
|
79
81
|
c.add_setting :suite_configure_facts_from_env, default: true
|
@@ -83,7 +85,7 @@ RSpec.configure do |c|
|
|
83
85
|
c.add_setting :suite_hiera_data_dir, default: File.join('spec', 'acceptance', 'hieradata')
|
84
86
|
c.add_setting :suite_hiera_hierachy, default: [
|
85
87
|
{
|
86
|
-
name:
|
88
|
+
name: 'Per-node data',
|
87
89
|
path: 'fqdn/%{facts.networking.fqdn}.yaml',
|
88
90
|
},
|
89
91
|
{
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voxpupuli-acceptance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bcrypt_pbkdf
|
@@ -86,14 +85,14 @@ dependencies:
|
|
86
85
|
requirements:
|
87
86
|
- - "~>"
|
88
87
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1
|
88
|
+
version: '2.1'
|
90
89
|
type: :runtime
|
91
90
|
prerelease: false
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
93
92
|
requirements:
|
94
93
|
- - "~>"
|
95
94
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1
|
95
|
+
version: '2.1'
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
97
|
name: beaker-rspec
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,10 +241,24 @@ dependencies:
|
|
242
241
|
- - "<"
|
243
242
|
- !ruby/object:Gem::Version
|
244
243
|
version: '9'
|
244
|
+
- !ruby/object:Gem::Dependency
|
245
|
+
name: voxpupuli-rubocop
|
246
|
+
requirement: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - "~>"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: 3.0.0
|
251
|
+
type: :development
|
252
|
+
prerelease: false
|
253
|
+
version_requirements: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - "~>"
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: 3.0.0
|
245
258
|
description: A package that depends on all the gems Vox Pupuli modules need and methods
|
246
259
|
to simplify acceptance spec helpers
|
247
260
|
email:
|
248
|
-
-
|
261
|
+
- voxpupuli@groups.io
|
249
262
|
executables: []
|
250
263
|
extensions: []
|
251
264
|
extra_rdoc_files: []
|
@@ -262,7 +275,6 @@ homepage: https://github.com/voxpupuli/voxpupuli-acceptance
|
|
262
275
|
licenses:
|
263
276
|
- Apache-2.0
|
264
277
|
metadata: {}
|
265
|
-
post_install_message:
|
266
278
|
rdoc_options: []
|
267
279
|
require_paths:
|
268
280
|
- lib
|
@@ -280,8 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
292
|
- !ruby/object:Gem::Version
|
281
293
|
version: '0'
|
282
294
|
requirements: []
|
283
|
-
rubygems_version: 3.
|
284
|
-
signing_key:
|
295
|
+
rubygems_version: 3.6.2
|
285
296
|
specification_version: 4
|
286
297
|
summary: Helpers for acceptance testing Vox Pupuli modules
|
287
298
|
test_files: []
|