{"id":21322109,"url":"https://github.com/advantageous/docker-test-plugin","last_synced_at":"2025-03-15T22:44:53.689Z","repository":{"id":77190971,"uuid":"61015485","full_name":"advantageous/docker-test-plugin","owner":"advantageous","description":"Spin up docker containers for integration tests.","archived":false,"fork":false,"pushed_at":"2019-05-21T11:05:10.000Z","size":70,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-22T11:48:00.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/advantageous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-06-13T07:17:22.000Z","updated_at":"2018-10-08T07:19:39.000Z","dependencies_parsed_at":"2023-06-03T02:00:18.210Z","dependency_job_id":null,"html_url":"https://github.com/advantageous/docker-test-plugin","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/advantageous%2Fdocker-test-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-test-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-test-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-test-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/advantageous","download_url":"https://codeload.github.com/advantageous/docker-test-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801612,"owners_count":20350106,"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-21T20:13:18.145Z","updated_at":"2025-03-15T22:44:53.679Z","avatar_url":"https://github.com/advantageous.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"## This plugin allows you to start up docker containers for testing.\n\n\n#### Configure the plugin and test annotations\n```java\nplugins {\n    id \"io.advantageous.docker-test\" version \"0.1.2\"\n}\n...\n\n//For docker test annotations\ndependencies {\n    testCompile 'io.advantageous.gradle:docker-test-plugin:0.1.0'\n}\n\n//Exclude docker tests as unit tests\ntest {\n    useJUnit {\n        excludeCategories 'io.advantageous.test.DockerTest'\n    }\n}\n```\n\n#### Configure your test containers in your build\n```java\n\n\ntestDockerContainers {\n    postgresql {\n        publishAll true\n        containerName \"postgresql\"\n        env (name:\"PGSQL_ROLE_1_USERNAME\", value:\"docker\")\n        env (\"PGSQL_ROLE_1_PASSWORD\":\"docker\", \"PGSQL_DB_1_NAME\":\"mydb\")\n        portMapping(container: 5432, host: 5432)\n        image \"tozd/postgresql:9.5\"\n        waitAfterRun 20\n    }\n\n    \n    cassandra {\n        publishAll true\n        containerName \"cassandra\"\n        portMapping(container: 9042, host: 9042)\n        image \"cassandra:2.2.5\"\n        waitAfterRun 20\n    }\n}\n```\n\n#### Start test containers for testing in your IDE\n\n```sh \n$ gradle startTestDocker\n```\n\n#### Mark your test classes that need these containers \n\n```java\n\nimport io.advantageous.test.DockerTest\n\n@Category(DockerTest::class)\npublic class FanCountBackFillJobTest {\n    @Test\n    fun doRun() {\n```\n\n\n#### To run tests that need docker use dockerTest\n\n```sh\n$ gradle clean dockerTest build  \n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvantageous%2Fdocker-test-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadvantageous%2Fdocker-test-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvantageous%2Fdocker-test-plugin/lists"}