hmm... this worked until I moved the test to a new...
# community-support
c
hmm... this worked until I moved the test to a new
JvmTestSuite
called
testIntegration
. How does this file get created?
Copy code
Test runtime classpath does not contain plugin metadata file 'plugin-under-test-metadata.properties'
org.gradle.testkit.runner.InvalidPluginMetadataException: Test runtime classpath does not contain plugin metadata file 'plugin-under-test-metadata.properties'
Copy code
@ParameterizedTest
  @ArgumentsSource(BuildScriptArgumentsProvider.class)
  void configurationCache(String fileName, String buildScript) throws IOException {
    Files.writeString(testProjectDir.toPath().resolve(fileName), buildScript);
    var build = GradleRunner.create()
      .withProjectDir(testProjectDir)
      .withArguments("logGit", "--configuration-cache", "--stacktrace")
      .withPluginClasspath()
      .build();

    assertThat(build.getOutput()).contains("semver:0.1.0");
  }
v
Iirc you need something like
Copy code
gradlePlugin {
    testSourceSets sourceSets.testIntegration
}
to make
withPluginClasspath()
working.
👆 1
t