These test cases are duplicates
They already exist in DockerBuildImageFunctionalTest.
@@ -20,71 +20,6 @@ import org.gradle.testkit.runner.BuildResult
import spock.lang.Requires
class DockerWorkflowFunctionalTest extends AbstractGroovyDslFunctionalTest {
- def "Can create Dockerfile and build an image from it"() {
- buildFile << """
- import com.bmuschko.gradle.docker.tasks.image.Dockerfile
- import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
- import com.bmuschko.gradle.docker.tasks.image.DockerInspectImage
-
- task createDockerfile(type: Dockerfile) {
- destFile = project.file('build/mydockerfile/Dockerfile')
- from '$TEST_IMAGE_WITH_TAG'
- label(['maintainer': 'benjamin.muschko@gmail.com'])
- }
-
- task buildImage(type: DockerBuildImage) {
- dependsOn createDockerfile
- inputDir = createDockerfile.destFile.get().asFile.parentFile
- tag = "${createUniqueImageId()}"
- }
-
- task inspectImage(type: DockerInspectImage) {
- dependsOn buildImage
- targetImageId buildImage.getImageId()
- }
-
- task workflow {
- dependsOn inspectImage
- }
- """
-
- when:
- BuildResult result = build('workflow')
-
- then:
- new File(projectDir, 'build/mydockerfile/Dockerfile').exists()
- result.output.contains('Labels : [maintainer:benjamin.muschko@gmail.com]')
- }
-
- def "Can build and verify image"() {
- File imageDir = temporaryFolder.newFolder('images', 'minimal')
- createDockerfile(imageDir)
-
- buildFile << """
- import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
- import com.bmuschko.gradle.docker.tasks.image.DockerInspectImage
-
- task buildImage(type: DockerBuildImage) {
- inputDir = file('images/minimal')
- tag = "${createUniqueImageId()}"
- }
-
- task inspectImage(type: DockerInspectImage) {
- dependsOn buildImage
- targetImageId buildImage.getImageId()
- }
-
- task workflow {
- dependsOn inspectImage
- }
- """
-
- when:
- BuildResult result = build('workflow')
-
- then:
- result.output.contains('Labels : [maintainer:benjamin.muschko@gmail.com]')
- }
def "Can build an image, create and start a container"() {
File imageDir = temporaryFolder.newFolder('images', 'minimal')
