{"id":21055805,"url":"https://github.com/startdusk/docker-tester","last_synced_at":"2025-05-15T23:32:49.882Z","repository":{"id":63720671,"uuid":"570187367","full_name":"startdusk/docker-tester","owner":"startdusk","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-28T14:50:03.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T02:03:37.214Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/startdusk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-24T14:36:27.000Z","updated_at":"2023-01-18T20:43:41.000Z","dependencies_parsed_at":"2023-01-22T07:50:12.607Z","dependency_job_id":null,"html_url":"https://github.com/startdusk/docker-tester","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startdusk%2Fdocker-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startdusk%2Fdocker-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startdusk%2Fdocker-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startdusk%2Fdocker-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/startdusk","download_url":"https://codeload.github.com/startdusk/docker-tester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442407,"owners_count":22071864,"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":[],"created_at":"2024-11-19T16:47:20.724Z","updated_at":"2025-05-15T23:32:46.935Z","avatar_url":"https://github.com/startdusk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-tester\n\nThis library provides simple functions for starting and stopping containers using Docker.\n\n## Getting started\n\nYou must have Docker installed and started\n\n```rust\nuse docker_tester::start_container;\n\nfn main() {\n    let image = \"postgres:latest\"\n    let port = \"5432\"\n    let args = \u0026[\n        \"-e\",\n        \"POSTGRES_USER=postgres\",\n        \"-e\",\n        \"POSTGRES_PASSWORD=password\"\n    ];\n    let container = start_container(image, port, args)\n        .expect(\"Failed to start Postgres contaienr\");\n\n    assert!(container.id);\n    assert!(container.host);\n    assert!(container.port);\n}\n```\n\n## db-tester\n\n```rust\nuse docker_tester::TestPostgres;\n\n#[tokio::test]\nasync fn it_works() {\n    let test_postgres = TestPostgres::new(\"./migrations\").await.unwrap();\n    let pool = test_postgres.get_pool().await;\n\n    // do something with the pool\n\n    // when test_postgres gets dropped, the database will be dropped on Docker\n}\n```\n\n## License\n\nThis project is distributed under the terms of MIT.\n\nSee [LICENSE](./LICENSE) for details.\n\nCopyright 2022 startdusk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartdusk%2Fdocker-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartdusk%2Fdocker-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartdusk%2Fdocker-tester/lists"}