thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
210 stars 54 forks source link

test: use more robust http parsing in the c8y-proxy host header tests #2956

Closed jarhodes314 closed 1 week ago

jarhodes314 commented 1 week ago

Proposed changes

Improve the host header tests introduced in #2946 by actually parsing the headers instead of simply checking for the presence of a string in the incoming request. Additionally simplify the logic for obtaining the websocket host.

Types of changes

Paste Link to the issue


Checklist

Further comments

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.3%. Comparing base (e54f81a) to head (d1359b0). Report is 1 commits behind head on main.

Additional details and impacted files | [Files](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2956?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge) | Coverage Δ | | |---|---|---| | [crates/extensions/c8y\_auth\_proxy/src/server.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2956?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_auth_proxy%2Fsrc%2Fserver.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X2F1dGhfcHJveHkvc3JjL3NlcnZlci5ycw==) | `89.8% <93.3%> (+1.0%)` | :arrow_up: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2956/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge)
github-actions[bot] commented 1 week ago

Robot Results

:white_check_mark: Passed :x: Failed :next_track_button: Skipped Total Pass % :stopwatch: Duration
453 0 3 453 100 58m36.590424999s