diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java index 6972acc7ee5..248049d944b 100644 --- a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java @@ -343,14 +343,14 @@ private static Map toYaml(ApplicationManifest applicationManifes putIfPresent(yaml, "domains", applicationManifest.getDomains()); putIfPresent(yaml, "env", applicationManifest.getEnvironmentVariables()); putIfPresent(yaml, "health-check-http-endpoint", applicationManifest.getHealthCheckHttpEndpoint()); - putIfPresent(yaml, "health-check-type", applicationManifest.getHealthCheckType().getValue()); + putIfPresent(yaml, "health-check-type", applicationManifest.getHealthCheckType() != null ? applicationManifest.getHealthCheckType().getValue() : null); putIfPresent(yaml, "hosts", applicationManifest.getHosts()); putIfPresent(yaml, "instances", applicationManifest.getInstances()); putIfPresent(yaml, "memory", applicationManifest.getMemory()); putIfPresent(yaml, "name", applicationManifest.getName()); putIfPresent(yaml, "no-hostname", applicationManifest.getNoHostname()); putIfPresent(yaml, "no-route", applicationManifest.getNoRoute()); - putIfPresent(yaml, "path", applicationManifest.getPath()); + putIfPresent(yaml, "path", applicationManifest.getPath() != null ? applicationManifest.getPath().toString() : null); putIfPresent(yaml, "random-route", applicationManifest.getRandomRoute()); putIfPresent(yaml, "route-path", applicationManifest.getRoutePath()); putIfPresent(yaml, "routes", applicationManifest.getRoutes(), ApplicationManifestUtils::toRoutesYaml); diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java index a2df0fb21b8..8181ef89080 100644 --- a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java @@ -502,10 +502,10 @@ public void write() throws IOException { .command("alpha-command") .disk(-1) .healthCheckHttpEndpoint("alpha-health-check-http-endpoint") - .healthCheckType(NONE) .instances(-1) .memory(-1) .noRoute(true) + .path(Paths.get("/alpha-path")) .randomRoute(true) .route(Route.builder() .route("alpha-route-1") diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo.yml index c3f1e082b81..0a98c9d966a 100644 --- a/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo.yml +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo.yml @@ -7,11 +7,11 @@ applications: ALPHA_KEY_1: alpha-value-1 ALPHA_KEY_2: alpha-value-2 health-check-http-endpoint: alpha-health-check-http-endpoint - health-check-type: none instances: -1 memory: -1 name: alpha-application-1 no-route: true + path: /alpha-path random-route: true routes: - route: alpha-route-1