Polish
See gh-21009
This commit is contained in:
committed by
Stephane Nicoll
parent
5b1b7bcb9b
commit
5eb5bf0a2d
@@ -102,7 +102,7 @@ class LifecycleTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void executeWhenAleadyRunThrowsException() throws Exception {
|
||||
void executeWhenAlreadyRunThrowsException() throws Exception {
|
||||
given(this.docker.container().create(any())).willAnswer(answerWithGeneratedContainerId());
|
||||
given(this.docker.container().create(any(), any())).willAnswer(answerWithGeneratedContainerId());
|
||||
given(this.docker.container().wait(any())).willReturn(ContainerStatus.of(0, null));
|
||||
@@ -211,9 +211,9 @@ class LifecycleTests {
|
||||
|
||||
static class TestLifecycle extends Lifecycle {
|
||||
|
||||
TestLifecycle(BuildLog log, DockerApi docker, BuildRequest request, ImageReference runImageReferece,
|
||||
TestLifecycle(BuildLog log, DockerApi docker, BuildRequest request, ImageReference runImageReference,
|
||||
EphemeralBuilder builder) {
|
||||
super(log, docker, request, runImageReferece, builder);
|
||||
super(log, docker, request, runImageReference, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -190,7 +190,7 @@ class DockerApiTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void removeWhenReferenceIsNulllThrowsException() {
|
||||
void removeWhenReferenceIsNullThrowsException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.api.remove(null, true))
|
||||
.withMessage("Reference must not be null");
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ abstract class ProgressUpdateEventTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getProgressDetailsReturnsProgresssDetails() {
|
||||
void getProgressDetailsReturnsProgressDetails() {
|
||||
ProgressUpdateEvent event = createEvent();
|
||||
assertThat(event.getProgressDetail().getCurrent()).isEqualTo(1);
|
||||
assertThat(event.getProgressDetail().getTotal()).isEqualTo(2);
|
||||
|
||||
@@ -177,7 +177,7 @@ class HttpClientTransportTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void executeWhenResposeIsIn400RangeShouldThrowDockerException() throws IOException {
|
||||
void executeWhenResponseIsIn400RangeShouldThrowDockerException() throws IOException {
|
||||
given(this.entity.getContent()).willReturn(getClass().getResourceAsStream("errors.json"));
|
||||
given(this.statusLine.getStatusCode()).willReturn(404);
|
||||
assertThatExceptionOfType(DockerEngineException.class).isThrownBy(() -> this.http.get(this.uri))
|
||||
@@ -185,7 +185,7 @@ class HttpClientTransportTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void executeWhenResposeIsIn500RangeShouldThrowDockerException() {
|
||||
void executeWhenResponseIsIn500RangeShouldThrowDockerException() {
|
||||
given(this.statusLine.getStatusCode()).willReturn(500);
|
||||
assertThatExceptionOfType(DockerEngineException.class).isThrownBy(() -> this.http.get(this.uri))
|
||||
.satisfies((ex) -> assertThat(ex.getErrors()).isNull());
|
||||
|
||||
@@ -45,8 +45,8 @@ class ImageConfigTests extends AbstractJsonTests {
|
||||
@Test
|
||||
void getLabelsReturnsLabels() throws Exception {
|
||||
ImageConfig imageConfig = getImageConfig();
|
||||
Map<String, String> lables = imageConfig.getLabels();
|
||||
assertThat(lables).hasSize(4).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
|
||||
Map<String, String> labels = imageConfig.getLabels();
|
||||
assertThat(labels).hasSize(4).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -46,8 +46,8 @@ class ImageTests extends AbstractJsonTests {
|
||||
@Test
|
||||
void getConfigLabelsReturnsLabels() throws Exception {
|
||||
Image image = getImage();
|
||||
Map<String, String> lables = image.getConfig().getLabels();
|
||||
assertThat(lables).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
|
||||
Map<String, String> labels = image.getConfig().getLabels();
|
||||
assertThat(labels).contains(entry("io.buildpacks.stack.id", "org.cloudfoundry.stacks.cflinuxfs3"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user