test: ensure the return value of MockAuditor.Contains is checked (#18319)

It unfortunately doesn't seem possible, even with a custom ruleguard rule, to mark a function as requiring it's return value be used, it looks like you have to go all in on a linter that rejects *any* unused return values.
This commit is contained in:
Ethan
2025-06-11 17:16:18 +10:00
committed by GitHub
parent dd27a28cfa
commit 2377d76ebb
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1577,10 +1577,10 @@ func TestUserOIDC(t *testing.T) {
})
require.Equal(t, http.StatusOK, resp.StatusCode)
auditor.Contains(t, database.AuditLog{
require.True(t, auditor.Contains(t, database.AuditLog{
ResourceType: database.ResourceTypeUser,
AdditionalFields: json.RawMessage(`{"automatic_actor":"coder","automatic_subsystem":"dormancy"}`),
})
}))
me, err := client.User(ctx, "me")
require.NoError(t, err)