Coder Social home page Coder Social logo

Comments (6)

etorreborre avatar etorreborre commented on July 24, 2024 1

@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.

viktortnk avatar viktortnk commented on July 24, 2024

@francisdb Sorry, I don't know much about specs2. Contributions are welcome

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

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.

etorreborre avatar etorreborre commented on July 24, 2024

You can probably start and stop it using the AroundEach trait instead.

from docker-it-scala.

viktortnk avatar viktortnk commented on July 24, 2024

Sorry, I'm not familiar with Specs2 setup.
Is it still an issue with latest version? If so, help wanted

from docker-it-scala.

francisdb avatar francisdb commented on July 24, 2024

@viktortnk closing this, works properly now with the hints from @etorreborre

from docker-it-scala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.