googleapis / googleapis/google-cloud-cpp

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

Offen
#14,428 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
api: storage type: cleanup
Vorherrschende Sprache
C++
Sterne
659
Forks
462
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
89

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.