@Test
    @ConfiguredWithReadme("docker/README.md")
    public void update_docker_cloud() throws Exception {
        DockerCloud docker = DockerCloud.getCloudByName("docker");
        assertNotNull(docker);
        assertNotNull(docker.getDockerApi());
        assertNotNull(docker.getDockerApi().getDockerHost());
        assertEquals(
                "unix:///var/run/docker.sock",
                docker.getDockerApi().getDockerHost().getUri());

        DockerTemplate template = docker.getTemplate(Label.get("docker-agent"));
        checkTemplate(
                template,
                "docker-agent",
                "jenkins",
                "/home/jenkins/agent",
                "10",
                new String[] {
                    "type=tmpfs,destination=/run",
                    "type=bind,source=/var/run/docker.sock,destination=/var/run/docker.sock",
                    "type=volume,src=hello,dst=/world"
                },
                "hello=world\nfoo=bar");

        ConfigurationAsCode.get()
                .configure(getClass().getResource("DockerCloudTest2.yml").toExternalForm());

        docker = DockerCloud.getCloudByName("docker");
        assertNotNull(docker);
        assertNotNull(docker.getDockerApi());
        assertNotNull(docker.getDockerApi().getDockerHost());
        assertEquals(
                "unix:///var/run/docker.sock",
                docker.getDockerApi().getDockerHost().getUri());

        template = docker.getTemplate(Label.get("docker-agent"));
        checkTemplate(
                template,
                "docker-agent",
                "jenkins",
                "/home/jenkins/agent",
                "10",
                new String[] {
                    "type=volume,source=hello,destination=/hello", "type=volume,source=world,destination=/world"
                },
                "hello=world\nfoo=bar");

        template = docker.getTemplate(Label.get("generic"));
        checkTemplate(
                template,
                "generic",
                "jenkins",
                "/home/jenkins/agent2",
                "5",
                new String[] {
                    "type=volume,source=hello,destination=/hello", "type=volume,source=world,destination=/world"
                },
                "hello=world\nfoo=bar");
    }
@author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
integrations/src/test/java/io/jenkins/plugins/casc/DockerCloudTest.java