-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add acceptance test for file based service bindings on Windows #1437
base: develop
Are you sure you want to change the base?
Add acceptance test for file based service bindings on Windows #1437
Conversation
aa732d0
to
aa7ec08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please integrate the file-based service binding config parameter as well by gating the tests on GetIncludeFileBasedServiceBindings()
Hey @ctlong, I addressed the feedback. |
Expect(curlResponse).Should(ContainSubstring(content)) | ||
} | ||
|
||
getServiceInstanceGuid := func(serviceName string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite some coding copied from file_based_service_bindings.go
. Could you extract at least these two function to a common helper file?
getServiceInstanceGuid
getServiceBindingGuid
E.g. to helpers/services/service_helpers.go
"-m", DEFAULT_MEMORY_LIMIT)..., | ||
).Wait(Config.CfPushTimeoutDuration())).To(Exit(0)) | ||
|
||
checkFileContent("binding-guid", getServiceBindingGuid(appGuid, serviceGuid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is also identical to file_based_service_bindings.go
. Can you try to extract it into a function and just call the function here?
Expect(cf.Cf("create-app", appName).Wait()).To(Exit(0)) | ||
appGuid := app_helpers.GetAppGuid(appName) | ||
|
||
appFeatureUrl := fmt.Sprintf("/v3/apps/%s/features/file-based-service-bindings", appGuid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app feature flag will be renamed according to the lastest updates of the RFC:
https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0030-add-support-for-file-based-service-binding.md#implementation-overview
We can leave it like that for the moment. We'll update CATs later and also add tests for the second implementation options.
What is this change about?
Added an acceptance test for validating file based service bindings on windows diego cells. The test will run if include_windows is enabled. I decided to re-use the catnip application for this test, since it is already adapted for such a test. That's why we build an catnip.exe. The test itself is the same as: https://github.com/cloudfoundry/cf-acceptance-tests/blob/main/file_based_service_bindings/file_based_service_bindings.go just tweaked a bit.
Please provide contextual information.
Follow up to cloudfoundry/community#901 and #1374.
What version of cf-deployment have you run this cf-acceptance-test change against?
v46.5.0 with modified capi and diego releases
Please check all that apply for this PR:
Did you update the README as appropriate for this change?
If you are introducing a new acceptance test, what is your rationale for including it CATs rather than your own acceptance test suite?
CATs should validate common operator workflows.
CATs is not a regression test suite.
CATs is run by every component team to validate their releases before promotion.
How many more (or fewer) seconds of runtime will this change introduce to CATs?
~ 1 minute for the whole test
What is the level of urgency for publishing this change?