Skip to content

Commit

Permalink
Fix the Bootstrap check test failure on Windows. (#15975) (#15991)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1963714)

Co-authored-by: Mashhur <[email protected]>
  • Loading branch information
github-actions[bot] and mashhurs authored Mar 11, 2024
1 parent b908f6e commit c998741
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/spec/config_management/bootstrap_check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@
end

context 'when a configuration file exists in the specified location' do
let(:config_location) { Stud::Temporary.file.path }
# gsub replacement is only for Windows platform, without `gsub` `Dir.glob` cannot discover files and test fails
# note that in other `Dir.glob` places, we used `File.join/dirname` operations which doesn't create issue on Windows
let(:config_location) { Stud::Temporary.file.path.gsub("\\", "/") }

it "raises a `LogStash::BootstrapCheckError` error" do
expect { subject.check(settings) }.to raise_error LogStash::BootstrapCheckError
Expand Down

0 comments on commit c998741

Please sign in to comment.