gradle-docker-plugin icon indicating copy to clipboard operation
gradle-docker-plugin copied to clipboard

Development documentation about customizing functional tests is wrong

Open Vampire opened this issue 2 years ago • 2 comments

The manual says in the development section, that you can use various system properties and / or Gradle properties and / or environment variables to customize the functional test environment. But this does not work. The build does not look at those gradle properties and also does not forward the system properties and environment variables to the test task which is executed in a forked worker process. So currently there is no way to change these properties besides editing the TestConfiguration class.

Vampire avatar May 16 '22 13:05 Vampire

AFAIKT the system properties are passed down to the build script used by the functional test which then assign the value via the plugin's DSL. For example, see https://github.com/bmuschko/gradle-docker-plugin/blob/master/src/functTest/groovy/com/bmuschko/gradle/docker/AbstractGroovyDslFunctionalTest.groovy#L46-L64.

bmuschko avatar May 24 '22 01:05 bmuschko

The code you linked forwards from the test to the executed build. But nothing forwards from the main Gradle process down to the test task. Just try to use the documented ways to change those values and you will see that it does not work. I had to edit the values in exactly that file to change them instead of using a system property, Gradle propert or environment variable.

Vampire avatar May 24 '22 10:05 Vampire