{"id":18254100,"url":"https://github.com/testcontainers/testcontainers-rs-modules-community","last_synced_at":"2026-02-21T04:04:00.291Z","repository":{"id":177047212,"uuid":"650588151","full_name":"testcontainers/testcontainers-rs-modules-community","owner":"testcontainers","description":"Community maintained modules for Testcontainers for Rust","archived":false,"fork":false,"pushed_at":"2024-05-21T00:14:05.000Z","size":205,"stargazers_count":50,"open_issues_count":7,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-05-22T18:21:22.866Z","etag":null,"topics":["rust","testcontainers","testcontainers-rust","testing"],"latest_commit_sha":null,"homepage":"https://docs.rs/crate/testcontainers-modules/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testcontainers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-07T11:39:51.000Z","updated_at":"2024-06-16T12:40:17.341Z","dependencies_parsed_at":"2023-07-10T03:01:03.387Z","dependency_job_id":"1e66bee7-6b90-4ec9-94b1-0039ed1094c2","html_url":"https://github.com/testcontainers/testcontainers-rs-modules-community","commit_stats":{"total_commits":105,"total_committers":23,"mean_commits":4.565217391304348,"dds":0.6952380952380952,"last_synced_commit":"071945dc630749660752850778b2e821a3bab8e8"},"previous_names":["testcontainers/testcontainers-rs-modules-community"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testcontainers%2Ftestcontainers-rs-modules-community","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testcontainers%2Ftestcontainers-rs-modules-community/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testcontainers%2Ftestcontainers-rs-modules-community/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testcontainers%2Ftestcontainers-rs-modules-community/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testcontainers","download_url":"https://codeload.github.com/testcontainers/testcontainers-rs-modules-community/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393569,"owners_count":20931812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","testcontainers","testcontainers-rust","testing"],"created_at":"2024-11-05T10:10:25.143Z","updated_at":"2025-04-05T20:07:11.607Z","avatar_url":"https://github.com/testcontainers.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testcontainers-modules\n\n![Continuous Integration](https://github.com/testcontainers/testcontainers-rs-modules-community/workflows/Continuous%20Integration/badge.svg?branch=main)\n[![Crates.io](https://img.shields.io/crates/v/testcontainers-modules.svg)](https://crates.io/crates/testcontainers-modules)\n[![Docs.rs](https://docs.rs/testcontainers-modules/badge.svg)](https://docs.rs/testcontainers-modules)\n\nCommunity maintained modules for [testcontainers]\n\nProvides modules to use for testing components in accordance with [testcontainers-rs].\nEvery module is treated as a feature inside this crate.\n\n## Usage\n\n1. Depend on [testcontainers-modules] with necessary features (e.g `postgres`, `minio` and etc)\n    - Enable `blocking` feature if you want to use modules within synchronous tests (feature-gate for `SyncRunner`)\n2. Then start using the modules inside your tests with either `AsyncRunner` or `SyncRunner`\n\nSimple example of using `postgres` module with `SyncRunner` (`blocking` and `postgres` features enabled):\n\n```rust,ignore\nuse testcontainers_modules::{postgres, testcontainers::runners::SyncRunner};\n\n#[test]\nfn test_with_postgres() {\n    let container = postgres::Postgres::default().start().unwrap();\n    let host_ip = container.get_host().unwrap();\n    let host_port = container.get_host_port_ipv4(5432).unwrap();\n}\n```\n\n**Note**: you don't need to explicitly depend on `testcontainers` as it's re-exported dependency\nof `testcontainers-modules` with aligned version between these crates.\nFor example:\n\n```rust\nuse testcontainers_modules::testcontainers::ImageExt;\n```\n\nYou can also see [examples](https://github.com/testcontainers/testcontainers-rs-modules-community/tree/main/examples)\nfor more details.\n\n### How to override module defaults (version, tag, ENV-variables)\n\nJust use [RunnableImage](https://docs.rs/testcontainers/latest/testcontainers/core/struct.RunnableImage.html):\n\n```rust,ignore\nuse testcontainers_modules::{\n    redis::Redis,\n    testcontainers::{ContainerRequest, ImageExt}\n};\n\n\n/// Create a Redis module with `6.2-alpine` tag and custom password\nfn create_redis() -\u003e ContainerRequest\u003cRedis\u003e {\n    Redis::default()\n        .with_tag(\"6.2-alpine\")\n        .with_env_var(\"REDIS_PASSWORD\", \"my_secret_password\")\n}\n```\n\n## License\n\n- MIT license ([LICENSE] or \u003chttp://opensource.org/licenses/MIT\u003e)\n\n[testcontainers-rs]: https://github.com/testcontainers/testcontainers-rs\n\n[testcontainers]: https://crates.io/crates/testcontainers\n\n[testcontainers-modules]: https://crates.io/crates/testcontainers-modules\n\n[LICENSE]: https://github.com/testcontainers/testcontainers-rs-modules-community/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestcontainers%2Ftestcontainers-rs-modules-community","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestcontainers%2Ftestcontainers-rs-modules-community","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestcontainers%2Ftestcontainers-rs-modules-community/lists"}