-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Replace assert with require in host user integration tests
#58739
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
Conversation
assert with require in hos tuser integration testsassert with require in host user integration tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should revert the mass conversion from assert to require in the spirit of keep-going. The one place we either need to use require, or return if an assert.NoError fails is in the EventuallyWithT blocks to prevent panics like
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x16e7d0f9]
goroutine 15065 [running]:
github.com/gravitational/teleport/integration.testStaticHostUsers.func2(0xc00428bad0)
/__w/teleport/teleport/integration/hostuser_test.go:879 +0xd9
github.com/stretchr/testify/assert.EventuallyWithT.func1()
/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:2096 +0xb8
created by github.com/stretchr/testify/assert.EventuallyWithT in goroutine 5479
/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:2108 +0x27d
The above comment applied to the original commit which has since been resolved by the squashed commit.
…host user integration tests
6efdba1 to
f6bd24e
Compare
cthach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…host user integration tests (#58739)
No description provided.