Skip to content

Commit

Permalink
specs: assert presence of logging without risking NoMethodError (#14633
Browse files Browse the repository at this point in the history
…) (#14719)

* specs: assert presence of logging without risking NoMethodError

* Update qa/integration/specs/monitoring_api_spec.rb

(cherry picked from commit 9460d4d)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and yaauie authored Jul 18, 2023
1 parent 8fac913 commit 6ac0760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qa/integration/specs/monitoring_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@
Stud.try(max_retry.times, [StandardError, RSpec::Expectations::ExpectationNotMetError]) do
# monitoring api can fail if the subsystem isn't ready
result = logstash_service.monitoring_api.logging_get rescue nil
expect(result).not_to be_nil
expect(result["loggers"].size).to be > 0
expect(result).to_not be_nil
expect(result).to include("loggers" => an_object_having_attributes(:size => a_value > 0))
end

#default
Expand Down

0 comments on commit 6ac0760

Please sign in to comment.