Commit 4eec3e8
tests: restore cert reloading assertions and fix TLS test helpers
Replace TODO stubs with working implementations:
- peer_certificate_der(): raw tokio-rustls handshake to inspect peer
certificates. reqwest's TlsInfo::peer_certificate() only works with
the native-tls backend, returning None with rustls — so we drop down
to tokio_rustls::TlsConnector directly where
ServerConnection::peer_certificates() always works.
- cert_file_to_der(): parse PEM cert files to DER for comparison.
- make_http_tls(): now honors TestTlsConfig (builds hyper-rustls
connector from the client config that trusts the test CA).
- make_ws_tls(): uses rustls::StreamOwned for synchronous TLS
WebSocket connections.
Cert reloading test assertions in both environmentd and balancerd are
now fully restored — no remaining TODO stubs.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 59bf89a commit 4eec3e8
File tree
4 files changed
+64
-67
lines changed- src
- balancerd/tests
- environmentd
- src
- tests
4 files changed
+64
-67
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | | - | |
269 | | - | |
270 | | - | |
| 267 | + | |
| 268 | + | |
271 | 269 | | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
275 | 273 | | |
276 | 274 | | |
277 | 275 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
| 276 | + | |
| 277 | + | |
290 | 278 | | |
291 | 279 | | |
292 | 280 | | |
| |||
295 | 283 | | |
296 | 284 | | |
297 | 285 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 286 | + | |
| 287 | + | |
310 | 288 | | |
311 | 289 | | |
312 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1693 | 1693 | | |
1694 | 1694 | | |
1695 | 1695 | | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
1696 | 1729 | | |
1697 | 1730 | | |
1698 | 1731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | | - | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4737 | 4737 | | |
4738 | 4738 | | |
4739 | 4739 | | |
4740 | | - | |
4741 | | - | |
4742 | | - | |
4743 | | - | |
4744 | 4740 | | |
| 4741 | + | |
| 4742 | + | |
| 4743 | + | |
| 4744 | + | |
4745 | 4745 | | |
4746 | 4746 | | |
4747 | 4747 | | |
4748 | 4748 | | |
4749 | 4749 | | |
4750 | 4750 | | |
4751 | 4751 | | |
| 4752 | + | |
| 4753 | + | |
4752 | 4754 | | |
4753 | 4755 | | |
4754 | 4756 | | |
4755 | 4757 | | |
4756 | 4758 | | |
4757 | 4759 | | |
4758 | 4760 | | |
4759 | | - | |
4760 | | - | |
4761 | | - | |
4762 | | - | |
4763 | | - | |
4764 | | - | |
4765 | | - | |
4766 | | - | |
4767 | | - | |
4768 | | - | |
| 4761 | + | |
| 4762 | + | |
4769 | 4763 | | |
4770 | 4764 | | |
4771 | 4765 | | |
| |||
4775 | 4769 | | |
4776 | 4770 | | |
4777 | 4771 | | |
4778 | | - | |
4779 | | - | |
4780 | | - | |
4781 | | - | |
4782 | | - | |
4783 | | - | |
4784 | | - | |
4785 | | - | |
4786 | | - | |
4787 | | - | |
| 4772 | + | |
| 4773 | + | |
4788 | 4774 | | |
4789 | 4775 | | |
4790 | 4776 | | |
| |||
0 commit comments