From 84303c3205bb4dbcd9afd79ba1280d631c4ccb46 Mon Sep 17 00:00:00 2001 From: Paul Warren Date: Thu, 7 May 2020 11:51:41 -0700 Subject: [PATCH 1/3] Enable docker before tests - and disable again afterwards [#172250234](https://www.pivotaltracker.com/story/show/172250234) Co-authored-by: Paul Warren Co-authored-by: Lisa Burns --- volume_services/volume_services.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/volume_services/volume_services.go b/volume_services/volume_services.go index 3e70b2c61..9b943f5d4 100644 --- a/volume_services/volume_services.go +++ b/volume_services/volume_services.go @@ -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()) @@ -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") }) }) From d4ff1ac9dbb4365967c610f7a041ccea5b7a88c2 Mon Sep 17 00:00:00 2001 From: Paul Warren Date: Thu, 7 May 2020 15:11:50 -0700 Subject: [PATCH 2/3] Update the volume services section of the readme - remove the statement saying docker must be enabled. now done by the test [#172250234](https://www.pivotaltracker.com/story/show/172250234) Co-authored-by: Paul Warren Co-authored-by: Lisa Burns --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf5b5cab4..8e9742582 100644 --- a/README.md +++ b/README.md @@ -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. From 92b226c7a18731880f58839ea4d051413267f2d9 Mon Sep 17 00:00:00 2001 From: Dave Walter Date: Thu, 28 May 2020 15:17:56 -0700 Subject: [PATCH 3/3] Ensure the volume services test suite cant run when the docker test suite is also running [#172729514](https://www.pivotaltracker.com/story/show/172729514) Signed-off-by: Paul Warren --- cats_suite_helpers/cats_suite_helpers.go | 3 +++ helpers/skip_messages/skip_messages.go | 1 + 2 files changed, 4 insertions(+) diff --git a/cats_suite_helpers/cats_suite_helpers.go b/cats_suite_helpers/cats_suite_helpers.go index b787b02ba..d320ea81d 100644 --- a/cats_suite_helpers/cats_suite_helpers.go +++ b/cats_suite_helpers/cats_suite_helpers.go @@ -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) }) diff --git a/helpers/skip_messages/skip_messages.go b/helpers/skip_messages/skip_messages.go index 724da7f6c..4fef99257 100644 --- a/helpers/skip_messages/skip_messages.go +++ b/helpers/skip_messages/skip_messages.go @@ -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'`