From 0d904c78c3483db139ad281a64a18fcd8d776cd9 Mon Sep 17 00:00:00 2001 From: Anthony Ryan Date: Sun, 14 Jun 2026 19:02:16 -0400 Subject: [PATCH] Fix "translates custom oids to their long name" test Previously, this test used puppet from $PATH on Linux, and if you ran the test suite in a git repo, it would accidentally test the puppet version that was already installed on the system (rather than the one you are actively working on), and the test would fail if puppet was not installed. I fixed the test to use a relative puppet path, so that we aren't getting accidentaly pass/fail from the wrong binary. Signed-off-by: Anthony Ryan --- spec/integration/application/ssl_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/integration/application/ssl_spec.rb b/spec/integration/application/ssl_spec.rb index d0971d3b77..a9e2b97303 100644 --- a/spec/integration/application/ssl_spec.rb +++ b/spec/integration/application/ssl_spec.rb @@ -4,9 +4,12 @@ context "print" do it 'translates custom oids to their long name' do basedir = File.expand_path("#{__FILE__}/../../../fixtures/ssl") + puppet = File.expand_path("#{__FILE__}/../../../../bin/puppet") + libdir = File.expand_path("#{__FILE__}/../../../../lib") + ruby = Puppet::Util::Execution.ruby_path # registering custom oids changes global state, so shell out output = - %x{puppet ssl show \ + %x{#{ruby} -I#{libdir} #{puppet} ssl show \ --certname oid \ --localcacert #{basedir}/ca.pem \ --hostcrl #{basedir}/crl.pem \