Skip to content

Commit 5b94b5f

Browse files
committed
(gh-64) Fix two acceptance tests for openvox7
The validate_vendored_openssl and validate_vendored_ruby tests were failing when run against openvox7. The openssl test was expecting openssl 3 instead of the v1 shipped with openvox7. And the ruby test was attempting a gem update --system which was pulling the latest rubygem-update which is incompatible with the ruby 2.7 shipped with openvox7. Presumably the suite was never run for the puppet 7 collection, or I'm missing something else -- or these tests were specifically skipped? Either way, it was simple enough to add a version test for these two, allowing them to pass by testing for openssl v1, and tightening up the gem update --system to 3.4.22 which was the last rubygems available for ruby 2.7.
1 parent 9eada28 commit 5b94b5f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

acceptance/tests/validate_vendored_openssl.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ def create_bat_wrapper(host, file, command)
1919
agents.each do |agent|
2020
openssl = openssl_command(agent)
2121

22+
puppet_version = on(agent, puppet('--version')).stdout.chomp
23+
expected_openssl = case puppet_version
24+
when /^7\./ then 1
25+
else 3
26+
end
27+
2228
step "check openssl version" do
2329
on(agent, "#{openssl} version -v") do |result|
24-
assert_match(/^OpenSSL 3\./, result.stdout)
30+
assert_match(/^OpenSSL #{expected_openssl}\./, result.stdout)
2531
end
2632
end
2733

acceptance/tests/validate_vendored_ruby.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def setup_build_environment(agent)
2121
# We add `--enable-system-libraries` to use system libsqlite3
2222
gem_install_sqlite3 = "env GEM_HOME=/opt/puppetlabs/puppet/lib/ruby/vendor_gems " + gem_command(agent) + " install sqlite3 -- --enable-system-libraries"
2323
install_package_on_agent = package_installer(agent)
24-
rubygems_version = agent['platform'] =~ /aix-7\.2/ ? '3.4.22' : ''
24+
25+
puppet_version = on(agent, puppet('--version')).stdout.chomp
26+
rubygems_version = ((agent['platform'] =~ /aix-7\.2/) ||
27+
(puppet_version =~ /^7\./)) ? '3.4.22' : ''
2528
on(agent, "#{gem_command(agent)} update --system #{rubygems_version}")
2629

2730
case agent['platform']

0 commit comments

Comments
 (0)