sbt-docker-compose icon indicating copy to clipboard operation
sbt-docker-compose copied to clipboard

testOnly doesn't behave as expected

Open dfarrel1 opened this issue 5 years ago • 0 comments

expected behavior:

sbt dockerComposeTest --no-ansi it:testOnly "*MyClass" --force-recreate

should run only the class given.

seen behavior:

this just tries to run the entire test suite

If I add a container_name to my docker-compose.yml file, then curiously sbt dockerComposeTest complains about that unrecognized field, BUT it actually behaves as expected, running only the test class provided. I'm not sure how to go about debugging here. Any advice?

dc file like so:

version: "3.7"

services:
  app:
    image: <my-image>
    container_name: cdp-etl-container # this effects sbt-docker-compose behavior
    working_dir: /var/app

when running with the extra container_name field above, we must remove all parameters passed to sbt dockerComposeTest like so:

sbt dockerComposeTest "testOnly *MyClass"

dfarrel1 avatar Feb 24 '20 18:02 dfarrel1