diff --git a/README.md b/README.md index 6d91a9f13..80d5d7bba 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ include_capi_no_bridge * `credhub_secret`: UAA client secret for Service Broker write access to CredHub (required for CredHub tests). * `include_capi_experimental`: Flag to run experimental tests for the CAPI release. Not stable! * `include_capi_no_bridge`: Flag to run tests that require CAPI's (currently optional) bridge consumption features. +* `include_deployments`: Flag to include tests for the cloud controller rolling deployments. V3 must also be enabled. * `include_detect`: Flag to include tests in the detect group. * `include_docker`: Flag to include tests related to running Docker apps on Diego. Diego must be deployed and the CC API docker_diego feature flag must be enabled for these tests to pass. * `include_internet_dependent`: Flag to include tests that require the deployment to have internet access. diff --git a/helpers/config/config.go b/helpers/config/config.go index 4101c7bc6..4dafc75bd 100644 --- a/helpers/config/config.go +++ b/helpers/config/config.go @@ -27,6 +27,7 @@ type CatsConfig interface { GetIncludeSsh() bool GetIncludeTasks() bool GetIncludeV3() bool + GetIncludeDeployments() bool GetIncludeIsolationSegments() bool GetIncludeRoutingIsolationSegments() bool GetIncludeLoggingIsolationSegments() bool diff --git a/helpers/config/config_struct.go b/helpers/config/config_struct.go index 384df3458..a0049003e 100644 --- a/helpers/config/config_struct.go +++ b/helpers/config/config_struct.go @@ -88,6 +88,7 @@ type config struct { IncludeTasks *bool `json:"include_tasks"` IncludeTCPRouting *bool `json:"include_tcp_routing"` IncludeV3 *bool `json:"include_v3"` + IncludeDeployments *bool `json:"include_deployments"` IncludeZipkin *bool `json:"include_zipkin"` IncludeIsolationSegments *bool `json:"include_isolation_segments"` IncludeRoutingIsolationSegments *bool `json:"include_routing_isolation_segments"` @@ -163,6 +164,7 @@ func getDefaults() config { defaults.IncludeDetect = ptrToBool(true) defaults.IncludeRouting = ptrToBool(true) defaults.IncludeV3 = ptrToBool(true) + defaults.IncludeDeployments = ptrToBool(false) defaults.IncludeBackendCompatiblity = ptrToBool(false) defaults.IncludeCapiExperimental = ptrToBool(false) @@ -942,6 +944,10 @@ func (c *config) GetIncludeV3() bool { return *c.IncludeV3 } +func (c *config) GetIncludeDeployments() bool { + return *c.IncludeDeployments +} + func (c *config) GetIncludeIsolationSegments() bool { return *c.IncludeIsolationSegments } diff --git a/helpers/skip_messages/skip_messages.go b/helpers/skip_messages/skip_messages.go index 4bb318c55..c64fe597c 100644 --- a/helpers/skip_messages/skip_messages.go +++ b/helpers/skip_messages/skip_messages.go @@ -34,6 +34,8 @@ const SkipTasksMessage = `Skipping this test because config.IncludeTasks is set NOTE: Ensure tasks are enabled on your platform before enabling this test.` const SkipV3Message = `Skipping this test because config.IncludeV3 is set to 'false'. NOTE: Ensure that the v3 api features are enabled on your platform before running this test.` +const SkipDeploymentsMessage = `Skipping this test because config.IncludeDeployments is set to 'false'. +NOTE: Ensure that deployments and v3 features are enabled on your platform before running this test.` const SkipWindowsMessage = `Skipping this test because config.IncludeWindows is set to 'false'. NOTE: Ensure that your deployment includes at least one Windows cell before enabling this test.` const SkipWindowsContextPathsMessage = `Skipping this test because config.UseWindowsContextPath is set to 'false'. diff --git a/capi_experimental/deployment.go b/v3/deployment.go similarity index 97% rename from capi_experimental/deployment.go rename to v3/deployment.go index 1170ee8ef..ce7d14529 100644 --- a/capi_experimental/deployment.go +++ b/v3/deployment.go @@ -1,7 +1,8 @@ -package capi_experimental +package v3 import ( "fmt" + "github.com/cloudfoundry/cf-acceptance-tests/helpers/skip_messages" "io/ioutil" "os" "strings" @@ -22,7 +23,7 @@ var ( staticFileZip = "assets/staticfile.zip" ) -var _ = CapiExperimentalDescribe("deployment", func() { +var _ = V3Describe("deployment", func() { var ( appName string @@ -38,6 +39,10 @@ var _ = CapiExperimentalDescribe("deployment", func() { ) BeforeEach(func() { + if !Config.GetIncludeDeployments() { + Skip(skip_messages.SkipDeploymentsMessage) + } + appName = random_name.CATSRandomName("APP") spaceName = TestSetup.RegularUserContext().Space spaceGuid = GetSpaceGuidFromName(spaceName)