Skip to content
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

better dashapi testing #5635

Open
tarasmadan opened this issue Dec 20, 2024 · 0 comments
Open

better dashapi testing #5635

tarasmadan opened this issue Dec 20, 2024 · 0 comments
Assignees

Comments

@tarasmadan
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I'd like to test dashapi with gcs/spanner dependencies.
The problematic API is a gcsPayloadHandler.

Describe the solution you'd like
I'd like to mock the dependencies and get maximum flexibility.
We have mockery and spanner mocks.
GCS mocks could be added the same way.

The question is how to inject mocks into the tested dashboard.
We are widely using context.Context tree to propagate similar data.

The proposal is to propagate context into the mocking targets constructors.
Constructor will be able to return the mock(if present) instead of real object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant