Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the err is surfaced in e2e/integration tests to improve debuggability #3300

Closed
mimowo opened this issue Oct 24, 2024 · 1 comment · Fixed by #3347
Closed

Ensure the err is surfaced in e2e/integration tests to improve debuggability #3300

mimowo opened this issue Oct 24, 2024 · 1 comment · Fixed by #3347
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@mimowo
Copy link
Contributor

mimowo commented Oct 24, 2024

What would you like to be cleaned:

We use this pattern in many places :

if err := k8sClient.Get(ctx, wlLookupKey, createdWorkload); err != nil {
return false
}

We prefer to replace it with something like:

gomega.Eventually(func(g gomega.Gomega) {
	g.Expect(k8sClient.Get(ctx, wlLookupKey, createdWorkload)).Should(gomega.Succeed())
	...
}, util.LongTimeout, util.Interval).Should(gomega.Succeed())

This is a follow up to the discussion here: #3284 (comment)

Why is this needed:

To improve debuggability.

@mimowo mimowo added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Oct 24, 2024
@mimowo mimowo changed the title Ensure the err is surfaced in e2e tests to improve debuggability Ensure the err is surfaced in e2e/integration tests to improve debuggability Oct 24, 2024
@mbobrovskyi
Copy link
Contributor

/assign

I already started working on it before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants