push
gitlab-ci
feat: Implement `mender::update::http_resumer` Implement class to download the Artifact, which will react to server disconnections or other sorts of short read by scheduling new HTTP requests with `Range` header. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests for an introduction to the feature, and read the specification for more details. The user calls _once_ `AsyncCall` with the header and body handlers, and `DownloadResumerClient` will call back these handlers _once_ (each). At the user's header handler, the Reader returned by `MakeBodyAsyncReader` is a wrapper of the actual Body reader that is taking care of the resume of the download, calling the `AsyncRead` finalized handler only after the download is fully completed (with potential resumes) and or/the resuming times out. The validation of the `Content-Range` header and the cases for the unit tests are heavily inspired by the legacy client. See: * https://github.com/mendersoftware/mender/blob/<a class=hub.com/mendersoftware/mender/commit/d9010526d35d3ac861ea1e4210d36c2fef748ef8">d9010526d/client/update_resumer.go#L113 * https://github.com/mendersoftware/mender/blob/d9010526d35d3ac861ea1e4210d36c2fef748ef8/client/update_resumer_test.go#L197 Ticket: MEN-6498 Changelog: None Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
267 of 267 new or added lines in 5 files covered. (100.0%)
6686 of 8601 relevant lines covered (77.74%)
10755.08 hits per line