Commit 7742b99
committed
test(tls): drop five tests that re-prove already-covered behavior
Each dropped test was a second layer over a code path another test already pins;
keeping both is the two-layers-that-sort-of-do smell. None of the five guarded a
behavior the surviving suite doesn't.
- test_rotate_peer_ca_sets_current: first-set + old-ca-None. Covered by
no_rotation_when_unchanged's first call (sets current, leaves old None) and the
else-branch remove_secret in clears_stale_old_ca_on_reenable. The rotation state
machine stays fully covered (rotate, no-op, clear, re-enable-clear).
- test_get_client_tls_files_none_when_absent: the absent getter path. Covered by
test_certificate_available_pushes_on_empty, which asserts get_client_tls_files
== (None, None, None) on an empty requirer.
- test_client_and_peer_requesters_have_distinct_common_names: the CN values live in
test_tls_state.py (three tests); requester construction is in test_handler_is_wired.
- test_peer_certificate_available_defers_when_internal_ca_absent and
test_peer_certificate_available_defers_on_workload_file_error: the defer guards live
in the shared _push_tls_files. The client variant proves each guard; the peer handler's
routing through _push_tls_files is proven by test_peer_certificate_available_rotates_ca_and_pushes.
The two surviving defer tests now note they cover the peer path too (shared guard).
Suite: 58 -> 48 TLS tests on both substrates.
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>1 parent 7a9b623 commit 7742b99
2 files changed
Lines changed: 3 additions & 91 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | 155 | | |
193 | 156 | | |
194 | 157 | | |
| |||
205 | 168 | | |
206 | 169 | | |
207 | 170 | | |
| 171 | + | |
| 172 | + | |
208 | 173 | | |
209 | 174 | | |
210 | 175 | | |
| |||
221 | 186 | | |
222 | 187 | | |
223 | 188 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 189 | | |
241 | 190 | | |
242 | 191 | | |
243 | 192 | | |
244 | 193 | | |
| 194 | + | |
245 | 195 | | |
246 | 196 | | |
247 | 197 | | |
| |||
262 | 212 | | |
263 | 213 | | |
264 | 214 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 31 | | |
41 | 32 | | |
42 | 33 | | |
| |||
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 79 | | |
95 | 80 | | |
96 | 81 | | |
| |||
0 commit comments