diff --git a/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerDisposeContainerTaskSpec.groovy b/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerDisposeContainerTaskSpec.groovy index d4eb15ff..634f2455 100644 --- a/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerDisposeContainerTaskSpec.groovy +++ b/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerDisposeContainerTaskSpec.groovy @@ -1,6 +1,7 @@ package de.gesellix.gradle.docker.tasks import de.gesellix.docker.client.DockerClient +import de.gesellix.docker.client.EngineResponseContent import de.gesellix.docker.remote.api.ContainerInspectResponse import de.gesellix.docker.remote.api.core.ClientException import org.gradle.testfixtures.ProjectBuilder @@ -21,7 +22,7 @@ class DockerDisposeContainerTaskSpec extends Specification { def "delegates to dockerClient (w/o removing the parent image)"() { given: task.containerId = "4712" - dockerClient.inspectContainer("4712") >> [content: new ContainerInspectResponse()] + dockerClient.inspectContainer("4712") >> new EngineResponseContent<>(new ContainerInspectResponse()) when: task.dispose() @@ -40,7 +41,7 @@ class DockerDisposeContainerTaskSpec extends Specification { given: task.containerId = "4712" task.rmiParentImage = true - dockerClient.inspectContainer("4712") >> [content: new ContainerInspectResponse().tap { image = "an-image-id" }] + dockerClient.inspectContainer("4712") >> new EngineResponseContent<>(new ContainerInspectResponse().tap { image = "an-image-id" }) when: task.dispose() @@ -74,7 +75,7 @@ class DockerDisposeContainerTaskSpec extends Specification { given: task.containerId = "4712" task.removeVolumes = true - dockerClient.inspectContainer("4712") >> [content: new ContainerInspectResponse()] + dockerClient.inspectContainer("4712") >> new EngineResponseContent<>(new ContainerInspectResponse()) when: task.dispose() @@ -86,7 +87,7 @@ class DockerDisposeContainerTaskSpec extends Specification { def "does not remove Volumes by default"() { given: task.containerId = "4712" - dockerClient.inspectContainer("4712") >> [content: new ContainerInspectResponse()] + dockerClient.inspectContainer("4712") >> new EngineResponseContent<>(new ContainerInspectResponse()) when: task.dispose() diff --git a/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerInspectContainerTaskSpec.groovy b/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerInspectContainerTaskSpec.groovy index fbdd03cf..91bef415 100644 --- a/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerInspectContainerTaskSpec.groovy +++ b/plugin/src/test/groovy/de/gesellix/gradle/docker/tasks/DockerInspectContainerTaskSpec.groovy @@ -1,7 +1,8 @@ package de.gesellix.gradle.docker.tasks import de.gesellix.docker.client.DockerClient -import de.gesellix.docker.engine.EngineResponse +import de.gesellix.docker.client.EngineResponseContent +import de.gesellix.docker.remote.api.ContainerInspectResponse import org.gradle.testfixtures.ProjectBuilder import spock.lang.Specification @@ -20,7 +21,7 @@ class DockerInspectContainerTaskSpec extends Specification { def "delegates to dockerClient and returns result"() { given: task.containerId = "4711" - def expectedResponse = new EngineResponse(content: ["container": "details"]) + def expectedResponse = new EngineResponseContent(new ContainerInspectResponse().tap { id = "123" }) when: task.inspect()