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

Use a MockRestClient in storage/tests/error_injection_integration_test #14428

Open
coryan opened this issue Jul 3, 2024 · 0 comments
Open

Use a MockRestClient in storage/tests/error_injection_integration_test #14428

coryan opened this issue Jul 3, 2024 · 0 comments
Labels
api: storage Issues related to the Cloud Storage API. type: cleanup An internal cleanup or hygiene concern.

Comments

@coryan
Copy link
Contributor

coryan commented Jul 3, 2024

This test does some low-level black magic to force a specific type of socket error.

  1. The storage library should not be testing this, if anywhere, this belongs in the RestClient tests,
  2. The storage library should just mock RestClient and assume it works.

Even if we decided to "move" these tests: it seems better to assume libcurl works, and just returns the right error code. If we want to make sure our wrappers work when libcurl returns the error codes corresponding to socket errors then (as libcurl cannot be easily mocked) we can use the testbench to force the error type we want.

@coryan coryan added api: storage Issues related to the Cloud Storage API. type: cleanup An internal cleanup or hygiene concern. labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant