cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

🌱 test: add failure message to Eventually().Should(bool) everywhere

Open damdo opened this issue 1 year ago • 4 comments

What type of PR is this? /kind cleanup

What this PR does / why we need it: In Gomega, when Eventually().Should() fails, the failure returns a

  [FAILED] Timed out after 1200.001s.
  Expected
      <bool>: false
  to be true

Which takes a bit of time to then debug further.

There is a more immediate way to add some context to this, by adding a failure message to the should like so: .Should(x, "message"). This PR does this for all the current occurrences of this construct.

Release note:

test: add failure message to Eventually().Should(bool) everywhere

damdo avatar Apr 22 '24 08:04 damdo

/assign @nrb @richardcase

damdo avatar Apr 22 '24 08:04 damdo

/lgtm

nrb avatar Apr 22 '24 14:04 nrb

/test pull-cluster-api-provider-aws-e2e /test pull-cluster-api-provider-aws-e2e-eks

damdo avatar Apr 24 '24 11:04 damdo

/assign @richardcase @dlipovetsky

damdo avatar May 02 '24 12:05 damdo

/approve

Thanks for improving the tests!

dlipovetsky avatar May 02 '24 22:05 dlipovetsky

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlipovetsky

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 02 '24 22:05 k8s-ci-robot