Merge branch '2.7.x'

pull/31828/head
Scott Frederick 2 years ago
commit cf7a163c6d

@ -104,7 +104,7 @@ public final class DockerConfiguration {
public DockerConfiguration withEmptyPublishRegistryAuthentication() { public DockerConfiguration withEmptyPublishRegistryAuthentication() {
return new DockerConfiguration(this.host, this.builderAuthentication, return new DockerConfiguration(this.host, this.builderAuthentication,
new DockerRegistryUserAuthentication("", "", "", "")); new DockerRegistryUserAuthentication("", "", "", ""), this.bindHostToBuilder);
} }
} }

@ -74,7 +74,9 @@ class DockerSpecTests {
assertThat(host.getCertificatePath()).isNull(); assertThat(host.getCertificatePath()).isNull();
assertThat(dockerConfiguration.isBindHostToBuilder()).isFalse(); assertThat(dockerConfiguration.isBindHostToBuilder()).isFalse();
assertThat(dockerSpec.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull(); assertThat(dockerSpec.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull();
assertThat(dockerSpec.asDockerConfiguration().getPublishRegistryAuthentication()).isNull(); assertThat(decoded(dockerConfiguration.getPublishRegistryAuthentication().getAuthHeader()))
.contains("\"username\" : \"\"").contains("\"password\" : \"\"").contains("\"email\" : \"\"")
.contains("\"serveraddress\" : \"\"");
} }
@Test @Test

@ -57,7 +57,9 @@ class DockerTests {
assertThat(host.getCertificatePath()).isEqualTo("/tmp/ca-cert"); assertThat(host.getCertificatePath()).isEqualTo("/tmp/ca-cert");
assertThat(dockerConfiguration.isBindHostToBuilder()).isFalse(); assertThat(dockerConfiguration.isBindHostToBuilder()).isFalse();
assertThat(docker.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull(); assertThat(docker.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull();
assertThat(docker.asDockerConfiguration().getPublishRegistryAuthentication()).isNull(); assertThat(decoded(dockerConfiguration.getPublishRegistryAuthentication().getAuthHeader()))
.contains("\"username\" : \"\"").contains("\"password\" : \"\"").contains("\"email\" : \"\"")
.contains("\"serveraddress\" : \"\"");
} }
@Test @Test

Loading…
Cancel
Save