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

Method CreateTestAuditLog

codersdk/audit.go:278–290  ·  view source on GitHub ↗

CreateTestAuditLog creates a fake audit log. Only owners of the organization can perform this action. It's used for testing purposes.

(ctx context.Context, req CreateTestAuditLogRequest)

Source from the content-addressed store, hash-verified

276// CreateTestAuditLog creates a fake audit log. Only owners of the organization
277// can perform this action. It's used for testing purposes.
278func (c *Client) CreateTestAuditLog(ctx context.Context, req CreateTestAuditLogRequest) error {
279 res, err := c.Request(ctx, http.MethodPost, "/api/v2/audit/testgenerate", req)
280 if err != nil {
281 return err
282 }
283 defer res.Body.Close()
284
285 if res.StatusCode != http.StatusNoContent {
286 return err
287 }
288
289 return nil
290}

Callers 3

TestAuditLogsFunction · 0.80
TestAuditLogsFilterFunction · 0.80
TestEnterpriseAuditLogsFunction · 0.80

Calls 2

RequestMethod · 0.95
CloseMethod · 0.65

Tested by 3

TestAuditLogsFunction · 0.64
TestAuditLogsFilterFunction · 0.64
TestEnterpriseAuditLogsFunction · 0.64