Convert MongoDB integration tests to use Testcontainers #10
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/support#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Convert the MongoDB integration tests to use Testcontainers instead of requiring an external MongoDB instance.
Motivation
Currently, the MongoDB integration tests (
mongo-it,files-mongo-it) require an external MongoDB instance and useTestAspect.ifEnvSet("MONGO_URI")to skip when unavailable. This means:The SQL testing modules already have proper Testcontainers support (MySQL, PostgreSQL) which should serve as a reference.
Current State
mongo/it/-MongoJsonRepositoryIntegrationSpec- requiresMONGO_URIenv varfiles/adapters/mongo/it/-MongoJsonFileRepositoryIntegrationSpec- requiresMONGO_URIenv varProposed Changes
MongoTestingLayerssimilar toMySQLTestingLayers/PostgreSQLTestingLayersifEnvSet("MONGO_URI")requirement (tests should run automatically)Reference
See existing Testcontainers implementations:
sqldb-mysql/testing-support/src/main/scala/works/iterative/sqldb/mysql/testing/MySQLTestingLayers.scalasqldb-postgresql/testing-support/src/main/scala/works/iterative/sqldb/postgresql/testing/PostgreSQLTestingLayers.scalaRelated
Created during SUPP-9 (CI and git hooks setup) - we're skipping MongoDB tests in CI until this is resolved.