aprs.me/test/aprsme/cluster
Graham McIntire 7db78675a2
refactor: collapse nested if/case into pattern-matched helpers
- SharedPacketHandler.handle_packet_update: dispatch on filter-result,
  and use maybe_enrich/2 dispatched on the enrich? boolean instead of
  an inner `if`. lookup_device_info/1 is now a trio of function heads.
- Cluster.Topology.child_spec: build_spec/3 dispatches on
  (cluster_enabled?, topologies) tuples — no more nested `if`.
- Cluster.PacketDistributor.distribute_packet: maybe_broadcast/2
  dispatches on the leader-and-enabled check; the non-leader / disabled
  paths return :ok explicitly instead of relying on an `if` expression's
  implicit nil.

Adds tests for SharedPacketHandler (filter/enrich/match paths,
callsign_filter + callsign_and_weather_filter factories) and extends
Cluster.Topology tests to cover the nil-topology and opts-merge cases.
Coverage 66.41 → 66.81%.
2026-04-23 13:55:11 -05:00
..
connection_manager_test.exs more tests 2026-02-09 17:21:16 -06:00
leader_election_test.exs perf: optimize slow tests - 40% reduction in top 10 slowest tests 2026-03-03 10:47:40 -06:00
packet_distributor_test.exs perf: optimize slow tests - 40% reduction in top 10 slowest tests 2026-03-03 10:47:40 -06:00
packet_receiver_test.exs perf: optimize slow tests - 40% reduction in top 10 slowest tests 2026-03-03 10:47:40 -06:00
topology_test.exs refactor: collapse nested if/case into pattern-matched helpers 2026-04-23 13:55:11 -05:00