use of org.springframework.boot.buildpack.platform.docker.configuration.DockerHost in project spring-boot by spring-projects.
the class DockerTests method asDockerConfigurationWithHostConfiguration.
@Test
void asDockerConfigurationWithHostConfiguration() {
Docker docker = new Docker();
docker.setHost("docker.example.com");
docker.setTlsVerify(true);
docker.setCertPath("/tmp/ca-cert");
DockerConfiguration dockerConfiguration = docker.asDockerConfiguration();
DockerHost host = dockerConfiguration.getHost();
assertThat(host.getAddress()).isEqualTo("docker.example.com");
assertThat(host.isSecure()).isEqualTo(true);
assertThat(host.getCertificatePath()).isEqualTo("/tmp/ca-cert");
assertThat(docker.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull();
assertThat(docker.asDockerConfiguration().getPublishRegistryAuthentication()).isNull();
}
Aggregations