Skip to content

Commit

Permalink
Skip offline pack manager tests when running in fips mode (#17160)
Browse files Browse the repository at this point in the history
This commit introduces a pattern for skipping tests we do not want to run in
fips mode. In this case the plugin manager tests rely on using
bundler/net-http/openssl which is not configured to be run with bouncycastle
fips providers.
  • Loading branch information
donoghuc committed Feb 28, 2025
1 parent a0de9d7 commit 6b8b56b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions qa/integration/specs/cli/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def gem_in_lock_file?(pattern, lock_file)
end
end

context "pack" do
context "pack", :skip_fips do
context "when the command is run in the `$LOGSTASH_HOME`" do
include_examples "install from a pack"
end
Expand All @@ -118,7 +118,7 @@ def gem_in_lock_file?(pattern, lock_file)
end
end

context "install non bundle plugin" do
context "install non bundle plugin", :skip_fips do
let(:plugin_name) { "logstash-input-github" }
let(:install_command) { "bin/logstash-plugin install" }

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def puts(payload)
Flores::RSpec.configure(c)
c.include LogStashHelper
c.extend LogStashHelper

c.filter_run_excluding skip_fips: true if java.lang.System.getProperty("org.bouncycastle.fips.approved_only") == "true"
if ENV['COVERAGE']
c.after(:suite) do
SimpleCov.result.format!
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/plugin_manager/offline_plugin_packager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def retrieve_dependencies_gems(path)
end
end

context "when the plugins exist" do
context "when the plugins exist", :skip_fips do
before :all do
Paquet.ui = Paquet::SilentUI
end
Expand Down

0 comments on commit 6b8b56b

Please sign in to comment.