test(client): drop the coverage-only classification enumeration

The removed test only checked that every failure kind appeared somewhere in
the same hand-maintained case table the mapping test already walks. It could
not prove exhaustiveness or the absence of a fallback, which the compiler
enforces, and it pinned the incidental fact that each category currently has
an input.
This commit is contained in:
Nils Andreas Svee committed 2026-08-15 01:49:22 +07:00
1 parent e3003c348f
commit 665f839333
1 file changed
-26
-26
View File
@@ -592,32 +592,6 @@ mod tests {
}
}
#[test]
fn classification_covers_every_failure_kind_except_other() {
let observed: Vec<_> = classification_cases()
.into_iter()
.map(|(error, _)| {
classify_client_error(ManagedTargetFailurePhase::Sending, &error).kind
})
.collect();
for kind in [
ManagedTargetFailureKind::Resolve,
ManagedTargetFailureKind::Socket,
ManagedTargetFailureKind::SocketOption,
ManagedTargetFailureKind::Protocol,
ManagedTargetFailureKind::Timeout,
ManagedTargetFailureKind::Configuration,
ManagedTargetFailureKind::ResourceExhausted,
ManagedTargetFailureKind::InvalidState,
] {
assert!(observed.contains(&kind), "no case classifies as {kind}");
}
assert!(
!observed.contains(&ManagedTargetFailureKind::Other),
"Other must remain a deliberate category, not a fallback"
);
}
#[test]
fn classification_preserves_the_reported_phase() {
for phase in [