googleapis / googleapis/google-cloud-go
all: make the operation type easier to use in tests
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
**Is your feature request related to a problem? Please describe.**
Writing tests for API calls that return a `*compute.Operation` is very frustrating ss the only field on the type is an unexported interface preventing any initialisation of the Operation type in test code. This means we end up hacking around calls to the library when testing which is far from desirable.
**Describe the solution you'd like**
A clear and concise description of what you want to happen. What should the API be? How would you use it?
Either expose the Operation Handle and its implementations or expose a method that allows the creation of an operation.
**Describe alternatives you've considered**
Most of our tests use the context to bypass the operation wait - but I'd be happier not having that kind of logic in the test code
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.