voxpupuli-acceptance 4.3.0 → 4.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ddc0418f12e74fe707ebfed100c44ea4c4cde9b264dd35a9e266207cc7144de
4
- data.tar.gz: 7f4b04f3f5896d83c85111887a18bd31144e6ca21c2b4e7f975f7dca1b122a4f
3
+ metadata.gz: 78117c5e267d1a734193a449190fba13205c9073f2410fd2005c8a4132ca550f
4
+ data.tar.gz: 89e0d888f8defe3a076ca228369fa3613c014353ccabcc7015d4598b35365f80
5
5
  SHA512:
6
- metadata.gz: b7d4d3c12e70e476be2cc27d121e63f1546dc1b3932880f2e11b45cf4469f0adfc92c03237e60c424b2a651f0faf8331fc4e5eb811847771fb253cc7eef63bbe
7
- data.tar.gz: 676313376ec3a341257d6bdeb5c449b4a02816f256e787d3baba670a6cef831bb0233cfd283dc20550b2ce8da814eafb5de4515b4791922693ee76dd210a8e83
6
+ metadata.gz: bcddd8048948cb683693ea87b562974b87262e9a69a61ebacb5132555aed00c2d6e6f79c2f521c11e01ba927ace9d0d116af551fce08e3472204edc085d8c5ad
7
+ data.tar.gz: d69c7ccf693420099181b00d5d786a062f18437ec4df9072f15df05cdb1d81b8fa21f5ca117e004a6921885373df33ee3a039e0c2b595c12dc954ea26b0e9cd5
@@ -5,6 +5,8 @@ require_relative 'serverspec_extensions'
5
5
 
6
6
  def configure_beaker(modules: :metadata, &block)
7
7
  collection = ENV['BEAKER_PUPPET_COLLECTION'] || 'openvox8'
8
+ staging_url = ENV['BEAKER_STAGING_URL'] || 'https://artifacts.voxpupuli.org/openvox-agent'
9
+ staging_version = ENV.fetch('BEAKER_STAGING_VERSION', nil)
8
10
  ENV['BEAKER_DEBUG'] ||= 'true'
9
11
  ENV['BEAKER_HYPERVISOR'] ||= 'docker'
10
12
 
@@ -18,7 +20,16 @@ def configure_beaker(modules: :metadata, &block)
18
20
 
19
21
  unless ENV['BEAKER_PROVISION'] == 'no'
20
22
  block_on hosts, run_in_parallel: true do |host|
21
- if collection != 'preinstalled'
23
+ # Only hosts that run systemd-resolved can be affected. Windows, BSD and
24
+ # macOS hosts do not have the file, and the command itself re-checks the
25
+ # remaining conditions.
26
+ disable_dnssec_validation_on(host) if host.file_exist?('/etc/systemd/resolved.conf')
27
+
28
+ if collection == 'staging'
29
+ raise StandardError, "staging server '#{staging_url}' configured, but no BEAKER_STAGING_VERSION environment variable set" unless staging_version
30
+
31
+ BeakerPuppetHelpers::InstallUtils.install_openvox_agent_from_url_on(host, staging_url, staging_version)
32
+ elsif collection != 'preinstalled'
22
33
  if collection != 'none'
23
34
  BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(host, collection)
24
35
  end
@@ -77,6 +88,26 @@ def configure_beaker(modules: :metadata, &block)
77
88
  end
78
89
  end
79
90
 
91
+ # Debian and Ubuntu cloud images ship systemd-resolved with DNSSEC=yes but
92
+ # without dns-root-data. When the built-in trust anchor is older than the
93
+ # current root KSK, every lookup fails with
94
+ # "DNSSEC validation failed: missing-key", which breaks the package
95
+ # installation done by configure_beaker. The command is a no-op unless the
96
+ # host runs systemd as init, has no local trust anchor, and resolution really
97
+ # fails with that error, so hosts with a current trust anchor are unaffected.
98
+ DNSSEC_VALIDATION_FIX = <<~SHELL
99
+ if [ ! -f /usr/share/dns/root.key ] &&
100
+ [ "$(ps -p 1 -o comm= 2>/dev/null)" = "systemd" ] &&
101
+ resolvectl query --cache=no example.com 2>&1 | grep -q 'DNSSEC validation failed: missing-key'; then
102
+ sed -i 's/^#*DNSSEC=.*/DNSSEC=no/' /etc/systemd/resolved.conf
103
+ systemctl restart systemd-resolved
104
+ fi
105
+ SHELL
106
+
107
+ def disable_dnssec_validation_on(host)
108
+ on(host, DNSSEC_VALIDATION_FIX)
109
+ end
110
+
80
111
  RSpec.configure do |c|
81
112
  c.formatter = 'RSpec::Github::Formatter' if ENV['GITHUB_ACTIONS'] == 'true'
82
113
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voxpupuli-acceptance
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
@@ -289,14 +289,14 @@ dependencies:
289
289
  requirements:
290
290
  - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: 5.1.0
292
+ version: 5.3.0
293
293
  type: :development
294
294
  prerelease: false
295
295
  version_requirements: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: 5.1.0
299
+ version: 5.3.0
300
300
  description: A package that depends on all the gems Vox Pupuli modules need and methods
301
301
  to simplify acceptance spec helpers
302
302
  email:
@@ -316,7 +316,11 @@ files:
316
316
  homepage: https://github.com/voxpupuli/voxpupuli-acceptance
317
317
  licenses:
318
318
  - Apache-2.0
319
- metadata: {}
319
+ metadata:
320
+ source_code_uri: https://github.com/voxpupuli/voxpupuli-acceptance
321
+ changelog_uri: https://github.com/voxpupuli/voxpupuli-acceptance/blob/main/CHANGELOG.md
322
+ bug_tracker_uri: https://github.com/voxpupuli/voxpupuli-acceptance/issues
323
+ rubygems_mfa_required: 'true'
320
324
  rdoc_options: []
321
325
  require_paths:
322
326
  - lib
@@ -334,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
334
338
  - !ruby/object:Gem::Version
335
339
  version: '0'
336
340
  requirements: []
337
- rubygems_version: 4.0.3
341
+ rubygems_version: 4.0.20
338
342
  specification_version: 4
339
343
  summary: Helpers for acceptance testing Vox Pupuli modules
340
344
  test_files: []