Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

dockerComposeTest doesn't include parent test scope in dependency classpath #122

@walmaaoui

Description

@walmaaoui

When I have a module test-util, where I define an object object Util {..}.

then in the build.sbt second module I depend on the the first module
dependsOn(`test-util`) % "compile->compile;test->test"
And reuse its object Util in my docker compose tests.

That would compile bu when running dockerComposeTest on the child module, I got an

Class Not Found Exception Util

I managed to make it work by overriding

testDependenciesClasspath := {
  val fullClasspathCompile = (fullClasspath in Compile).value
  val fullClasspathTest = (fullClasspath in Test).value
  (fullClasspathCompile.files ++ fullClasspathTest.files).map(_.getAbsoluteFile).mkString(":")
}

1- May be there are a subset of fullClasspath that would be enough to include the parent test scope in classpath
2- Do you think that this could be included in the default conf?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions