Comments (6)
@francisdb the com.whisk.docker.specs2.DockerTestKit
should work with both mutable and immutable specifications. But in your example you are trying to add before/after behaviour for a specific example where it should only be done once for the whole spec with:
import com.whisk.docker.specs2._
class InfluxDBSpec(implicit ee: ExecutionEnv) extends Specification DockerTestKit {
"The influxdb container" should {
"be ready" in new DockerInfluxDBService {
influxdbContainer.isReady() must beTrue.await
}
}
}
Your use case might be a bit more complex though because the DockerInfluDBService
might need to access some variables from DockerTestKit
. In that case you can go in new DockerInfluxDBService(dockerConfig)
.
Also note the implicit ee: ExecutionEnv
which should work for beTrue.await
.
from docker-it-scala.
@francisdb Sorry, I don't know much about specs2
. Contributions are welcome
from docker-it-scala.
But in your example you are trying to add before/after behaviour for a specific example where it should only be done once for the whole spec
@etorreborre what if I want a container per example?
from docker-it-scala.
You can probably start and stop it using the AroundEach
trait instead.
from docker-it-scala.
Sorry, I'm not familiar with Specs2 setup.
Is it still an issue with latest version? If so, help wanted
from docker-it-scala.
@viktortnk closing this, works properly now with the hints from @etorreborre
from docker-it-scala.
Related Issues (20)
- Missing support for running container in privileged mode HOT 1
- Concurrency issues on logs
- No support for UDP?
- Timeout or Race condition resulting in Cannot run all required containers HOT 1
- Shutdown connection before running tests HOT 1
- Pulling image timeout gives an error message about not being able to pull windows image
- Publish v0.9.7 for 2.11 ? HOT 1
- Plans to publish a jar with shaded spotify docker-client? HOT 8
- Setup steps unclear HOT 2
- PostgresServiceSpec fails with driver libraries from 42 HOT 1
- Allow pausing/unpausing of containers in DockerExecutor
- Release for Scala 2.13 HOT 5
- run unpublished docker image with whisk labs docker-it-scala HOT 1
- Incompatible with ScalaTest's AsyncTestSuite
- Issues with SBT 1.3.x
- An image without a tag pulls all tags
- Persisting container across multiple test classes
- withUnlinkedDependencies not starting dependent container
- DockerContainer should have an option to configure withIpv6Address and withExtraHosts
- Missing release for docker-testkit-impl-docker-java 0.11.0 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-it-scala.