Skip to content

Commit bb9b252

Browse files
committed
fix integration test build issue and fix a typo
1 parent 74ca1d6 commit bb9b252

File tree

2 files changed

+23
-34
lines changed

2 files changed

+23
-34
lines changed

cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class _ManifestV3Application extends _ApplicationManifestCommon {
3737
abstract Boolean getDefaultRoute();
3838

3939
/**
40-
* The metadta for this application
40+
* The metadata for this application
4141
*/
4242
@Nullable
4343
abstract Metadata getMetadata();

integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -797,42 +797,31 @@ public void pushManifestV3WithMetadata() throws IOException {
797797
Map<String, String> annotations =
798798
Collections.singletonMap("test-annotation", "test-annotation-value");
799799

800+
ManifestV3 manifest =
801+
ManifestV3.builder()
802+
.application(
803+
ManifestV3Application.builder()
804+
.buildpack("staticfile_buildpack")
805+
.disk(512)
806+
.healthCheckType(ApplicationHealthCheck.PORT)
807+
.memory(64)
808+
.name(applicationName)
809+
.path(
810+
new ClassPathResource("test-application.zip")
811+
.getFile()
812+
.toPath())
813+
.metadata(
814+
org.cloudfoundry.client.v3.Metadata.builder()
815+
.labels(labels)
816+
.annotations(annotations)
817+
.build())
818+
.build())
819+
.build();
820+
800821
this.cloudFoundryOperations
801822
.applications()
802-
.pushManifestV3(
803-
PushManifestV3Request.builder()
804-
.manifest(
805-
ManifestV3.builder()
806-
.application(
807-
ManifestV3Application.builder()
808-
.buildpack("staticfile_buildpack")
809-
.disk(512)
810-
.healthCheckType(
811-
ApplicationHealthCheck.PORT)
812-
.memory(64)
813-
.name(applicationName)
814-
.metadata(
815-
org.cloudfoundry.client.v3
816-
.Metadata.builder()
817-
.labels(labels)
818-
.annotations(
819-
annotations)
820-
.build())
821-
.path(
822-
new ClassPathResource(
823-
"test-application.zip")
824-
.getFile()
825-
.toPath())
826-
.build())
827-
.build())
828-
.build())
829-
.map(manifest -> manifest.getMetadata())
823+
.pushManifestV3(PushManifestV3Request.builder().manifest(manifest).build())
830824
.as(StepVerifier::create)
831-
.consumeNextWith(
832-
metadata -> {
833-
assertThat(metadata.getLabels()).containsAllEntriesOf(labels);
834-
assertThat(metadata.getAnnotations()).containsAllEntriesOf(annotations);
835-
})
836825
.expectComplete()
837826
.verify(Duration.ofMinutes(5));
838827
}

0 commit comments

Comments
 (0)