mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: wrap audit logs in a mutex to fix data race (#6898)
This was seen in `main`!
This commit is contained in:
@@ -94,8 +94,8 @@ func TestGitSSHKey(t *testing.T) {
|
||||
require.NotEmpty(t, key2.PublicKey)
|
||||
require.NotEqual(t, key2.PublicKey, key1.PublicKey)
|
||||
|
||||
require.Len(t, auditor.AuditLogs, 2)
|
||||
assert.Equal(t, database.AuditActionWrite, auditor.AuditLogs[1].Action)
|
||||
require.Len(t, auditor.AuditLogs(), 2)
|
||||
assert.Equal(t, database.AuditActionWrite, auditor.AuditLogs()[1].Action)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user