Stop a slow host turning a login-guard test into a segfault (closes #186)
All checks were successful
check / check (push) Successful in 2m49s
All checks were successful
check / check (push) Successful in 2m49s
This commit was merged in pull request #188.
This commit is contained in:
@@ -339,7 +339,12 @@ func TestWebhookDBManager_MultipleWebhooks(t *testing.T) {
|
||||
var events []database.Event
|
||||
|
||||
require.NoError(t, db2.Find(&events).Error)
|
||||
assert.Len(t, events, 1)
|
||||
|
||||
// require, not assert: this is exactly the regression the test
|
||||
// guards, so the empty slice is the expected failure, and a
|
||||
// non-fatal length check would index into it on the next line and
|
||||
// panic the whole package test binary instead of failing here.
|
||||
require.Len(t, events, 1)
|
||||
assert.Equal(t, "PUT", events[0].Method)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user