Fix plugin functional test
@@ -18,6 +18,23 @@ class DockerJavaApplicationPluginFunctionalTest extends AbstractGroovyDslFunctio
setupProjectUnderTest()
}
+ def "Can create image and start container for Java application with default configuration and configuration cache enabled"() {
+ when:
+ BuildResult result = build(CONFIGURATION_CACHE, 'buildAndCleanResources')
+
+ then:
+ assertGeneratedDockerfile()
+ assertBuildContextLibs()
+ assertBuildContextClasses()
+ result.output.contains("0 problems were found storing the configuration cache.")
+
+ when:
+ result = build(CONFIGURATION_CACHE, 'buildAndCleanResources')
+
+ then:
+ result.output.contains("Configuration cache entry reused.")
+ }
+
def "Can create image and start container for Java application with default configuration"() {
when:
build('buildAndCleanResources')
@@ -325,6 +342,17 @@ ADD file2.txt /other/dir/file2.txt
writeBasicSetupToBuildFile()
writeCustomTasksToBuildFile()
writeJettyMainClass(projectDir)
+ writeJettyMainClass()
+ }
+
+ private void writeJettyMainClass() {
+ buildFile << """
+ docker {
+ javaApplication {
+ mainClassName = 'com.bmuschko.gradle.docker.application.JettyMain'
+ }
+ }
+ """
}
private void writeSettingsFile() {
