Skip to content

Commit

Permalink
Merge pull request #353 from cloudfoundry/promote-deployments
Browse files Browse the repository at this point in the history
promote deployment CAT from capi_experimental to v3

[finish #163410594](https://www.pivotaltracker.com/story/show/163410594)
  • Loading branch information
vitreuz authored Jan 23, 2019
2 parents 6496a15 + fe51108 commit 2e451ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions helpers/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type CatsConfig interface {
GetIncludeSsh() bool
GetIncludeTasks() bool
GetIncludeV3() bool
GetIncludeDeployments() bool
GetIncludeIsolationSegments() bool
GetIncludeRoutingIsolationSegments() bool
GetIncludeLoggingIsolationSegments() bool
Expand Down
6 changes: 6 additions & 0 deletions helpers/config/config_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions helpers/skip_messages/skip_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
9 changes: 7 additions & 2 deletions capi_experimental/deployment.go → v3/deployment.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package capi_experimental
package v3

import (
"fmt"
"github.com/cloudfoundry/cf-acceptance-tests/helpers/skip_messages"
"io/ioutil"
"os"
"strings"
Expand All @@ -22,7 +23,7 @@ var (
staticFileZip = "assets/staticfile.zip"
)

var _ = CapiExperimentalDescribe("deployment", func() {
var _ = V3Describe("deployment", func() {

var (
appName string
Expand All @@ -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)
Expand Down

0 comments on commit 2e451ca

Please sign in to comment.