Skip to content

Commit

Permalink
Merge pull request #415 from paulcwarren/vol-svc-enable-docker
Browse files Browse the repository at this point in the history
Enable docker before tests

[finishes #172729514](https://www.pivotaltracker.com/story/show/172729514)
  • Loading branch information
davewalter authored May 29, 2020
2 parents a62b580 + 92b226c commit 82adc19
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ include_capi_no_bridge
* `include_service_discovery`: Flag to include test for the service discovery. These tests use `apps.internal` domain, which is the default in `cf-networking-release`. The internal domain is currently not configurable.
* `stacks`: An array of stacks to test against. Currently only `cflinuxfs3` stack is supported. Default is `[cflinuxfs3]`.
* `include_volume_services`: Flag to include the tests for volume services. The following requirements must be met to run this suite: Diego must be deployed. Docker support must be enabled. tcp-routing must be deployed.
* `include_volume_services`: Flag to include the tests for volume services. The following requirements must be met to run this suite: tcp-routing must be deployed.
* `volume_service_name`: The name of the volume service provided by the volume service broker.
* `volume_service_plan_name`: The name of the plan of the service provided by the volume service broker.
* `volume_service_create_config`: The JSON configuration that is used when volume service is created.
Expand Down
3 changes: 3 additions & 0 deletions cats_suite_helpers/cats_suite_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ func VolumeServicesDescribe(description string, callback func()) bool {
if !Config.GetIncludeVolumeServices() {
Skip(skip_messages.SkipVolumeServicesMessage)
}
if Config.GetIncludeDocker() {
Skip(skip_messages.SkipVolumeServicesDockerEnabledMessage)
}
})
Describe(description, callback)
})
Expand Down
1 change: 1 addition & 0 deletions helpers/skip_messages/skip_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ const SkipWindowsTasksMessage = `Skipping Windows tasks tests (requires diego-re
const SkipNoAlternateStacksMessage = `Skipping this test because config.Stacks is empty.`
const SkipVolumeServicesMessage = `Skipping this test because config.IncludeVolumeServices is set to 'false'.
NOTE: Ensure that volume services are enabled on your platform and volume service broker is registered before running this test.`
const SkipVolumeServicesDockerEnabledMessage = `Skipping this test because config.IncludeDocker is set to 'true'`
8 changes: 7 additions & 1 deletion volume_services/volume_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ var _ = VolumeServicesDescribe("Volume Services", func() {
appName = random_name.CATSRandomName("APP")

workflowhelpers.AsUser(TestSetup.AdminUserContext(), TestSetup.ShortTimeout(), func() {
session := cf.Cf("curl", "/routing/v1/router_groups").Wait()
session := cf.Cf("enable-feature-flag", "diego_docker").Wait()
Expect(session).To(Exit(0), "cannot enable diego_docker feature flag")

session = cf.Cf("curl", "/routing/v1/router_groups").Wait()
Expect(session).To(Exit(0), "cannot retrieve current router groups")

routerGroupGuid, reservablePorts = routerGroupIdAndPorts(session.Out.Contents())
Expand Down Expand Up @@ -131,6 +134,9 @@ var _ = VolumeServicesDescribe("Volume Services", func() {
payload := fmt.Sprintf(`{ "reservable_ports":"%s", "name":"default-tcp", "type": "tcp"}`, reservablePorts)
session := cf.Cf("curl", fmt.Sprintf("/routing/v1/router_groups/%s", routerGroupGuid), "-X", "PUT", "-d", payload).Wait()
Expect(session).To(Exit(0), "cannot retrieve current router groups")

session = cf.Cf("disable-feature-flag", "diego_docker").Wait()
Expect(session).To(Exit(0), "cannot disable diego_docker feature flag")
})
})

Expand Down

0 comments on commit 82adc19

Please sign in to comment.