mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: Remove use of require
in require.Eventually
in tests (#3110)
* fix: Remove use of `require` in `require.Eventually` in tests Because require uses `t.FailNow()` and `require.Eventually` runs the function in a goroutine, which is not allowed. * feat: Add ruleguard for require.Eventually Co-authored-by: Cian Johnston <cian@coder.com>
This commit is contained in:
committed by
GitHub
parent
3bb760576b
commit
51dd1fde3b
@ -153,8 +153,7 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
|
||||
// so we wait for it to occur.
|
||||
require.Eventually(t, func() bool {
|
||||
provisionerds, err := client.ProvisionerDaemons(ctx)
|
||||
require.NoError(t, err)
|
||||
return len(provisionerds) > 0
|
||||
return assert.NoError(t, err) && len(provisionerds) > 0
|
||||
}, time.Second*10, time.Second)
|
||||
|
||||
provisionerds, err := client.ProvisionerDaemons(ctx)
|
||||
|
Reference in New Issue
Block a user