Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Spin up docker containers for integration tests.

License

NotificationsYou must be signed in to change notification settings

advantageous/docker-test-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configure the plugin and test annotations

plugins {id"io.advantageous.docker-test"version"0.1.2"}...//For docker test annotationsdependencies {testCompile'io.advantageous.gradle:docker-test-plugin:0.1.0'}//Exclude docker tests as unit teststest {useJUnit {excludeCategories'io.advantageous.test.DockerTest'    }}

Configure your test containers in your build

testDockerContainers {postgresql {publishAlltruecontainerName"postgresql"env (name:"PGSQL_ROLE_1_USERNAME",value:"docker")env ("PGSQL_ROLE_1_PASSWORD":"docker","PGSQL_DB_1_NAME":"mydb")portMapping(container:5432,host:5432)image"tozd/postgresql:9.5"waitAfterRun20    }cassandra {publishAlltruecontainerName"cassandra"portMapping(container:9042,host:9042)image"cassandra:2.2.5"waitAfterRun20    }}

Start test containers for testing in your IDE

$ gradle startTestDocker

Mark your test classes that need these containers

importio.advantageous.test.DockerTest@Category(DockerTest::class)publicclassFanCountBackFillJobTest {@TestfundoRun() {

To run tests that need docker use dockerTest

$ gradle clean dockerTest build

About

Spin up docker containers for integration tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp