From 1390ffeea362494d45cd1574060ec3c5674b894e Mon Sep 17 00:00:00 2001 From: vkalapov <87693906+vkalapov@users.noreply.github.com> Date: Wed, 2 Jul 2025 11:18:35 +0300 Subject: [PATCH] Fix CNB integration test LMCROSSITXSADEPLOY-3220 --- .../ApplicationsCloudControllerClientIntegrationTest.java | 8 ++++++-- .../client/facade/IntegrationTestConstants.java | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/sap/cloudfoundry/client/facade/ApplicationsCloudControllerClientIntegrationTest.java b/src/test/java/com/sap/cloudfoundry/client/facade/ApplicationsCloudControllerClientIntegrationTest.java index 3f77206d0..cbc9a6eac 100644 --- a/src/test/java/com/sap/cloudfoundry/client/facade/ApplicationsCloudControllerClientIntegrationTest.java +++ b/src/test/java/com/sap/cloudfoundry/client/facade/ApplicationsCloudControllerClientIntegrationTest.java @@ -41,8 +41,10 @@ import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.HEALTH_CHECK_ENDPOINT; import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.HEALTH_CHECK_TIMEMOUT; import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.JAVA_BUILDPACK; +import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.JAVA_BUILDPACK_URL; import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.MEMORY_IN_MB; import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.NODEJS_BUILDPACK; +import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.NODEJS_BUILDPACK_URL; import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.STATICFILE_APPLICATION_CONTENT; import static com.sap.cloudfoundry.client.facade.IntegrationTestConstants.STATICFILE_BUILDPACK; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -233,7 +235,7 @@ void getAppInstances() { } @Test - @DisplayName("Create application and verify its GUID") + @DisplayName("Create an application, rename it, and verify its GUID") void renameApplication() { String applicationName = "test-application-8"; String newApplicationName = "new-test-application-8"; @@ -426,9 +428,11 @@ void createApplicationWithBuildpacks() { @DisplayName("Create application with CNB lifecycle and verify attributes") void createCnbApplication() { String applicationName = "test-app-17"; + List buildpacks = List.of(JAVA_BUILDPACK_URL, NODEJS_BUILDPACK_URL); + Staging staging = ImmutableStaging.builder() .lifecycleType(LifecycleType.CNB) - .addBuildpacks(JAVA_BUILDPACK, STATICFILE_BUILDPACK) + .addAllBuildpacks(buildpacks) .build(); CloudRoute route = getImmutableCloudRoute(); try { diff --git a/src/test/java/com/sap/cloudfoundry/client/facade/IntegrationTestConstants.java b/src/test/java/com/sap/cloudfoundry/client/facade/IntegrationTestConstants.java index 4ffaf91c9..467137fb6 100644 --- a/src/test/java/com/sap/cloudfoundry/client/facade/IntegrationTestConstants.java +++ b/src/test/java/com/sap/cloudfoundry/client/facade/IntegrationTestConstants.java @@ -15,6 +15,8 @@ private IntegrationTestConstants() { public static final String DEFAULT_DOMAIN = "deploy-service.custom.domain.for.integration.tests"; public static final String APPLICATION_HOST = "test-application-hostname-ztana-test"; public static final String STATICFILE_APPLICATION_CONTENT = "staticfile.zip"; + public static final String JAVA_BUILDPACK_URL = "https://github.com/paketo-buildpacks/java"; + public static final String NODEJS_BUILDPACK_URL = "https://github.com/paketo-buildpacks/nodejs"; // Service broker constants public static final int SERVICE_BROKER_DISK_IN_MB = 256;