Skip to content

[BE-126] Expand access-logs module test coverage #985

Description

@mftee

Overview

backend/src/access-logs/ has one controller spec but the service, entity behaviour, and any interceptor are untested. Access logs are the audit trail for who viewed which land document — evidence that must be trustworthy.

Tasks

  • Test the service layer: log creation, querying, and filtering by user, action, resource, and date range.
  • Test that logs are append-only — no update or delete path should exist through the API.
  • Test that a logging failure never breaks or rolls back the request being logged.
  • Test that sensitive values (tokens, passwords, document contents) are redacted before persistence.
  • Test pagination on the query endpoint.
  • Target ≥75% coverage.

Acceptance Criteria

  • Logs are proven immutable through the API.
  • A logging failure is proven non-blocking.
  • Redaction is covered by a test.

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions