MCPcopy Index your code
hub / github.com/coder/coder / chatAuditLogRow

Function chatAuditLogRow

coderd/audit_internal_test.go:214–226  ·  view source on GitHub ↗

chatAuditLogRow builds a GetAuditLogsOffsetRow for a successful chat write with the given diff, suitable for testing auditLogDescription.

(t *testing.T, diff codersdk.AuditDiff)

Source from the content-addressed store, hash-verified

212// chatAuditLogRow builds a GetAuditLogsOffsetRow for a successful chat write
213// with the given diff, suitable for testing auditLogDescription.
214func chatAuditLogRow(t *testing.T, diff codersdk.AuditDiff) database.GetAuditLogsOffsetRow {
215 t.Helper()
216 rawDiff, err := json.Marshal(diff)
217 require.NoError(t, err)
218 return database.GetAuditLogsOffsetRow{
219 AuditLog: database.AuditLog{
220 Action: database.AuditActionWrite,
221 StatusCode: 200,
222 ResourceType: database.ResourceTypeChat,
223 Diff: rawDiff,
224 },
225 }
226}

Callers 1

TestAuditLogDescriptionFunction · 0.85

Calls 2

HelperMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected