From 534f5c17a9ad083bf14b0b2671389c49e6286c51 Mon Sep 17 00:00:00 2001 From: Michael Harp Date: Thu, 5 Nov 2026 06:59:10 -0500 Subject: [PATCH] Test that puppetserver can load the vendored multi_json The agent installs multi_json into the vendor gem directory that puppetserver also loads from. A puppet-runtime gem update has twice shipped a version that puppetserver's JRuby cannot load (puppet-runtime#156, puppet-runtime#333), and nothing in the acceptance suite noticed, because OpenVox itself no longer requires the gem. Require it through `puppetserver ruby` on the master, next to the r10k test that covers the same class of problem. Co-Authored-By: Claude Fable 5.1 Signed-off-by: Michael Harp --- .../tests/puppetserver_loads_vendored_multi_json.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 acceptance/tests/puppetserver_loads_vendored_multi_json.rb diff --git a/acceptance/tests/puppetserver_loads_vendored_multi_json.rb b/acceptance/tests/puppetserver_loads_vendored_multi_json.rb new file mode 100644 index 0000000000..92cebd186f --- /dev/null +++ b/acceptance/tests/puppetserver_loads_vendored_multi_json.rb @@ -0,0 +1,12 @@ +# The agent installs multi_json into the vendor gem directory that puppetserver +# also loads from. This test ONLY checks that puppetserver's JRuby can load +# that copy, because gem version bumps in puppet-runtime have broken it before +# (puppet-runtime#156, puppet-runtime#333). It does not test multi_json itself. +test_name 'puppetserver can load the multi_json gem shipped by the agent' + +tag 'server', + 'shard:group2' + +on(master, %q{/opt/puppetlabs/server/bin/puppetserver ruby -e 'require "multi_json"; puts MultiJson.dump("loaded" => true)'}) do |result| + assert_match(/\{"loaded":true\}/, result.stdout) +end