1
1
docker-it-scala
2
2
=============
3
3
4
- [ ![ Build Status] ( https://travis-ci.org/whisklabs/docker-it-scala.svg?branch=master )] ( https://travis-ci.org/whisklabs/docker-it-scala )
5
4
[ ![ Maven Central] ( https://maven-badges.herokuapp.com/maven-central/com.whisk/docker-testkit-core_2.12/badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/com.whisk/docker-testkit-core_2.12 )
6
5
[ ![ Join the chat at https://gitter.im/whisklabs/docker-it-scala ] ( https://badges.gitter.im/Join%20Chat.svg )] ( https://gitter.im/whisklabs/docker-it-scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge )
7
6
@@ -23,16 +22,16 @@ There are separate artifacts available for these libraries:
23
22
24
23
``` scala
25
24
libraryDependencies ++= Seq (
26
- " com.whisk" %% " docker-testkit-scalatest" % " 0.9.5 " % " test" ,
27
- " com.whisk" %% " docker-testkit-impl-spotify" % " 0.9.5 " % " test" )
25
+ " com.whisk" %% " docker-testkit-scalatest" % " 0.9.9 " % " test" ,
26
+ " com.whisk" %% " docker-testkit-impl-spotify" % " 0.9.9 " % " test" )
28
27
```
29
28
30
29
** docker-java**
31
30
32
31
``` scala
33
32
libraryDependencies ++= Seq (
34
- " com.whisk" %% " docker-testkit-scalatest" % " 0.9.5 " % " test" ,
35
- " com.whisk" %% " docker-testkit-impl-docker-java" % " 0.9.5 " % " test" )
33
+ " com.whisk" %% " docker-testkit-scalatest" % " 0.9.9 " % " test" ,
34
+ " com.whisk" %% " docker-testkit-impl-docker-java" % " 0.9.9 " % " test" )
36
35
```
37
36
38
37
You don't necessarily have to use ` scalatest ` dependency as demonstrated above.
@@ -42,7 +41,7 @@ Have a look at [this specific trait](https://github.com/whisklabs/docker-it-scal
42
41
43
42
### Overriding execution environment
44
43
45
- If you need to have custom setup for you environment, you need to override ` dockerFactory ` field, providing ` DockerClient ` instance
44
+ If you need to have a custom environment setup , you need to override ` dockerFactory ` field, providing ` DockerClient ` instance
46
45
47
46
``` scala
48
47
import com .spotify .docker .client .{DefaultDockerClient , DockerClient }
@@ -154,10 +153,14 @@ trait DockerMongodbService extends DockerKitConfig {
154
153
### Fields
155
154
156
155
- ` image-name ` required (String)
156
+ - ` container-name ` optional (String)
157
+ - ` command ` optional (Array of Strings)
158
+ - ` entrypoint ` optional (Array of Strings)
157
159
- ` environmental-variables ` optional (Array of Strings)
158
160
- ` ready-checker ` optional structure
159
161
- ` log-line ` optional (String)
160
162
- ` http-response-code `
163
+ - ` code ` optional (Int - defaults to ` 200 ` )
161
164
- ` port ` required (Int)
162
165
- `path` optional (String - defaults to `/`)
163
166
- `within` optional (Int)
@@ -172,6 +175,8 @@ trait DockerMongodbService extends DockerKitConfig {
172
175
- ` container ` required (String)
173
176
- ` host ` required (String)
174
177
- ` rw ` optional (Boolean - default: false )
178
+ - ` memory ` optional (Long)
179
+ - ` memory-reservation ` optional (Long)
175
180
176
181
# Testkit
177
182
@@ -197,7 +202,7 @@ class MyMongoSpec extends FlatSpec with Matchers with DockerMongodbService {
197
202
class AllAtOnceSpec extends FlatSpec with Matchers with BeforeAndAfterAll with GivenWhenThen with ScalaFutures
198
203
with DockerElasticsearchService with DockerCassandraService with DockerNeo4jService with DockerMongodbService {
199
204
200
- implicit val pc = PatienceConfig (Span (20 , Seconds ), Span (1 , Second ))
205
+ implicit val pc : PatienceConfig = PatienceConfig (Span (20 , Seconds ), Span (1 , Second ))
201
206
202
207
" all containers" should " be ready at the same time" in {
203
208
dockerContainers.map(_.image).foreach(println)
0 commit comments