Skip to content

Fix flaky update spec

Ash McKenzie requested to merge ashmckenzie/minor-update-spec-fix into master

What does this Merge Request do?

This MR fixes a flaky test in spec/lib/gdk/command/update_spec.rb which needed a stub to address:

$ make rspec
RSpec: ...............................F.....................................................................................................................................................................................................................................................................................................................

Failures:

  1) GDK::Command::Update#run when update fails displays an error message
     Failure/Error: expect { subject.run }.to output(/ERROR: Failed to update/).to_stderr.and output(/You can try the following that may be of assistance/).to_stdout
       expected block to output /ERROR: Failed to update/ to stderr, but output "❌️ \e[31mERROR\e[0m: Failed to update.\n"
     # ./spec/lib/gdk/command/update_spec.rb:16:in `block (4 levels) in <top (required)>'

Finished in 1.18 seconds (files took 0.42663 seconds to load)
341 examples, 1 failure

Failed examples:

rspec ./spec/lib/gdk/command/update_spec.rb:13 # GDK::Command::Update#run when update fails displays an error message

Merge Request checklist

  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.

Merge request reports

Loading