From dc24f029721080fcaed3c97789a74cafe927bb69 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:28:02 -0700 Subject: [PATCH] Fix QA failure introduced by Health API changes and update rspec dependency of the QA package. (#16521) (#16522) * Update rspec dependency of the QA package. * Update qa/Gemfile Align on rspec 3.13.x Co-authored-by: Ry Biesemeyer * Fix the QA test failure caused after reflecting Health Report status to the Node stats. --------- Co-authored-by: Ry Biesemeyer (cherry picked from commit 1e5105fcd89d71b04efd0fe27aad28895bcde56f) Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com> --- qa/Gemfile | 2 +- qa/docker/spec/spec_helper.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/Gemfile b/qa/Gemfile index 90de65993b7..05b792e7957 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -1,5 +1,5 @@ source "https://rubygems.org" -gem "rspec", "~> 3.1.0" +gem "rspec", "~> 3.13" gem "rake" gem "stud" gem "pry", :group => :test diff --git a/qa/docker/spec/spec_helper.rb b/qa/docker/spec/spec_helper.rb index 52298fcc828..b62d4d1f6e0 100644 --- a/qa/docker/spec/spec_helper.rb +++ b/qa/docker/spec/spec_helper.rb @@ -38,7 +38,8 @@ def start_container(image, options = {}) def wait_for_logstash(container) Stud.try(40.times, [NoMethodError, Docker::Error::ConflictError, RSpec::Expectations::ExpectationNotMetError, TypeError]) do expect(logstash_available?(container)).to be true - expect(get_logstash_status(container)).to eql 'green' + # unknown or red status may be also meaningful while testing + expect(%w(unknown green yellow red).include?(get_logstash_status(container))).to be true end end