Skip to content

Use Expect(err).NotTo(HaveOccurred()) instead of Expect(err).Should(Succeed()) #3896

@joelanford

Description

@joelanford

Nit: I know this is a backport and this line is basically unchanged in this PR but for better readability this probably should be:

Expect(err).NotTo(HaveOccurred())

Succeed() is used more for the function itself:

Ω(DoSomethingSimple()).Should(Succeed())

https://onsi.github.io/gomega/#handling-errors

Originally posted by @hasbro17 in #3895 (comment)

Metadata

Metadata

Assignees

Labels

area/testingIssue related to testing the operator-sdk and subcomponentsgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions