Commit f9e65f8
authored
chore(fuzz): address hyper deprecations in fuzz tests (#3455)
* chore(app/inbound): address hyper deprecations in http/1 tests
this is a follow-up commit related to 24dc5d8 (#3445).
see <linkerd/linkerd2#8733> for more
information on upgrading to hyper 1.0.
---
this addresses hyper deprecations in the http/1 tests for the inbound
proxy.
prior, we made use of `tower::ServiceExt::oneshot`, which consumes a
service and drops it after sending a request and polling the response
future to completion.
<https://docs.rs/tower/0.5.2/src/tower/util/oneshot.rs.html#96-100>
tower is not a 1.0 library yet, so `SendRequest` does not provide an
implementation of `tower::Service` in hyper's 1.0 interface:
- <https://docs.rs/hyper/0.14.31/hyper/client/conn/struct.SendRequest.html#impl-Service%3CRequest%3CB%3E%3E-for-SendRequest%3CB%3E>
- <https://docs.rs/hyper/1.5.1/hyper/client/conn/http1/struct.SendRequest.html#trait-implementations>
consequentially, we must drop the sender ourselves after receiving a
response now.
---
this commit *also* addresses hyper deprecations in the http/1 downgrade
tests for the inbound proxy.
because these tests involve a http/2 client and an http/1 server, we
take the choice of inlining the body of
`http_util::connect_and_accept()` rather than introducing a new, third
`http_util::connect_and_accept_http_downgrade()` function.
we will refactor these helper functions in follow-on commits.
NB: because `ContextError` is internal to the `linkerd-app-test` crate,
we do not wrap the errors. these are allegedly used by the fuzzing tests
(_see f.ex #986 and #989_), but for our purposes with respect to the
inbound proxy we can elide them rather than making `ctx()` a public
method.
---
Signed-off-by: katelyn martin <[email protected]>
* refactor(app/test): remove unused `http_util::connect_and_accept(..)`
this removes `connect_and_accept(..)`. this will break fuzzing builds,
but it is not used elsewhere.
Signed-off-by: katelyn martin <[email protected]>
* chore(fuzz): address hyper deprecation in inbound fuzz tests
Signed-off-by: katelyn martin <[email protected]>
* chore(fuzz): address preëxisting fuzz breakage
this commit addresses other breakage found in the fuzz tests, tied to
other previous work.
after these changes, one can observe that the fuzz tests build and run
once more by running the following:
```sh
cargo +nightly fuzz run --fuzz-dir=linkerd/app/inbound/fuzz/ fuzz_target_1
```
Signed-off-by: katelyn martin <[email protected]>
* nit(fuzz): remove stray newline from manifest
Signed-off-by: katelyn martin <[email protected]>
---------
Signed-off-by: katelyn martin <[email protected]>1 parent 42fe4cf commit f9e65f8
File tree
4 files changed
+17
-21
lines changed- linkerd/app
- inbound
- fuzz
- src
- test/src
4 files changed
+17
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
| 57 | + | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 76 | + | |
85 | 77 | | |
86 | 78 | | |
87 | 79 | | |
| |||
93 | 85 | | |
94 | 86 | | |
95 | 87 | | |
96 | | - | |
97 | 88 | | |
98 | 89 | | |
99 | 90 | | |
100 | 91 | | |
101 | 92 | | |
102 | | - | |
| 93 | + | |
| 94 | + | |
103 | 95 | | |
104 | 96 | | |
105 | 97 | | |
106 | 98 | | |
107 | | - | |
| 99 | + | |
108 | 100 | | |
109 | 101 | | |
110 | 102 | | |
| |||
235 | 227 | | |
236 | 228 | | |
237 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
238 | 233 | | |
239 | 234 | | |
240 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
0 commit comments