sbt-docker-compose
sbt-docker-compose copied to clipboard
Specs2 tests that have a different constructor don't run
We are attempting to use sbt-docker-compose to simply start a docker-image, run our tests against the started image and then shutting down the docker image.
So far the tests seem to be working, however we appear to be getting an issue where the specs2 integration is only running one of the tests rather than all of them. I suspect the issue is with specs2 tests that use ee: ExecutionEnv
as this is the only differentiating factor.
The current work in progress can be seen here https://github.com/zalando-incubator/kanadi/pull/33 (to reproduce you can just check out the setupDockerComposeAutomatically
branch and run dockerComposeTest
in sbt).
Doing so, you will see that it only runs JsonSpec
, i.e.
[info] Done packaging.
[info] JsonSpec
[info] + Parse business events
[info] + Parse data events
[info] + Parse undefined events
[info]
[info] Total for specification JsonSpec
[info] Finished in 543 ms
3 examples, 0 failure, 0 error
[info]
Stopping and removing local Docker instance: 445734
The only differentiate thing about JSON spec (versus the other specs) is that it is defined as class JsonSpec extends Specification
, i.e. https://github.com/zalando-incubator/kanadi/blob/master/src/test/scala/JsonSpec.scala#L15 where as the other specs2 tests are defined as class BasicSourceSpec(implicit ec: ExecutionEnv) extends Specification with FutureMatchers with Config
(as an example)