Skip to content

test: run tests against a real MongoDB #154

Closed

Description

@uniqueg

Why?

All tests run against mongomock, including the role, group and permission queries. Mongomock differs from MongoDB in places (operators, indexes, unique constraints), and the Docker Compose smoke test only checks public reads and 401s. Found in the v0.3.0 pre-release review; to be fixed before the release (user decision, 2026-10-21).

How?

  1. Let the test fixtures use a real MongoDB when an environment variable is set (e.g. MONGODB_TEST_URI), and mongomock otherwise.
  2. Add a CI job that runs the full suite against a MongoDB 7.0 service container.
  3. Fix anything that behaves differently against the real database.
  4. Document how to run the tests against a local MongoDB.

Acceptance criteria

  • CI runs the full suite against real MongoDB 7.0, and it passes.
  • Local runs without the variable still use mongomock.

Activity

  1. added
    priority: high
    status: blocked
    type: testing
    workload: hours
    on Oct 21, 2026
  2. added
    status: in progress
    and removed
    status: blocked
    on Oct 21, 2026
  3. removed
    status: in progress
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: testingworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions