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

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

Open
walmaaoui opened this issue Dec 2, 2020 · 0 comments

Comments

@walmaaoui
Copy link

walmaaoui commented Dec 2, 2020

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?

@walmaaoui walmaaoui changed the title dockerComposeTest doesn't include l test dockerComposeTest doesn't include parent test scope in dependency classpath Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant