googleapis / googleapis/google-cloud-cpp

Use a `MockRestClient` in `storage/tests/error_injection_integration_test`

Abierto
#14,428 0 comentarios 0 reacciones 0 asignados Ver en GitHub
api: storage type: cleanup
Lenguaje dominante
C++
Estrellas
659
Forks
462
Merge medio
1 d 2 h
PR fusionados (30 d)
89

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.