From 222346fc61e3f8f6e7f6a4bc3371158c2e0c92a8 Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Mon, 5 Aug 2024 10:46:15 +0200 Subject: [PATCH] Add cnb related integration tests and cats configuration --- .github/workflows/tests-integration-reusable.yml | 2 ++ integration/v7/isolated/app_command_test.go | 14 ++++++++++++++ integration/v7/isolated/create_app_command_test.go | 12 ++++++++++++ 3 files changed, 28 insertions(+) diff --git a/.github/workflows/tests-integration-reusable.yml b/.github/workflows/tests-integration-reusable.yml index dd3a3ea50c0..5d29a52df89 100644 --- a/.github/workflows/tests-integration-reusable.yml +++ b/.github/workflows/tests-integration-reusable.yml @@ -249,6 +249,7 @@ jobs: "include_container_networking": true, "include_detect": true, "include_docker": true, + "include_cnb": true, "include_internet_dependent": true, "include_isolation_segments": true, "isolation_segment_name": "persistent_isolation_segment", @@ -279,6 +280,7 @@ jobs: cf api ${API} --skip-ssl-validation cf auth cf enable-feature-flag diego_docker + cf enable-feature-flag diego_cnb cf enable-feature-flag service_instance_sharing - name: Run CATS Tests diff --git a/integration/v7/isolated/app_command_test.go b/integration/v7/isolated/app_command_test.go index 524418626f4..ed9858c5021 100644 --- a/integration/v7/isolated/app_command_test.go +++ b/integration/v7/isolated/app_command_test.go @@ -389,6 +389,20 @@ applications: }) }) + When("the app is a CNB app", func() { + BeforeEach(func() { + helpers.WithProcfileApp(func(appDir string) { + Eventually(helpers.CF("push", appName, "-p", appDir, "--lifecycle", "cnb", "-b", "docker://gcr.io/paketo-buildpacks/ruby:latest")).Should(Exit()) + }) + }) + + It("displays the app buildpacks", func() { + session := helpers.CF("app", appName) + Eventually(session).Should(Say(`paketo-buildpacks\/ruby`)) + Eventually(session).Should(Exit(0)) + }) + }) + When("the app has tcp routes", func() { var tcpDomain helpers.Domain diff --git a/integration/v7/isolated/create_app_command_test.go b/integration/v7/isolated/create_app_command_test.go index e10dc1872ea..1c582b1f352 100644 --- a/integration/v7/isolated/create_app_command_test.go +++ b/integration/v7/isolated/create_app_command_test.go @@ -105,6 +105,18 @@ var _ = Describe("create-app command", func() { Eventually(session).Should(Say("docker image:")) Eventually(session).Should(Exit(0)) }) + + It("creates the app with the cnb app type", func() { + session := helpers.CF("create-app", appName, "--app-type", "cnb", "-b", "docker://foobar.test") + userName, _ := helpers.GetCredentials() + Eventually(session).Should(Say("Creating app %s in org %s / space %s as %s...", appName, orgName, spaceName, userName)) + Eventually(session).Should(Say("OK")) + Eventually(session).Should(Exit(0)) + + session = helpers.CF("app", appName) + Eventually(session).ShouldNot(Say("docker image:")) + Eventually(session).Should(Exit(0)) + }) }) })