add integration tests for mmrs, following the nmrs pattern.
test macros
macro_rules! require_modemmanager {
() => {
if !is_modemmanager_available().await {
eprintln!("skipping: modemmanager not available");
return;
}
};
}
macro_rules! require_modem {
($mm:expr) => {
if $mm.list_modems().await?.is_empty() {
eprintln!("skipping: no modem available");
return;
}
};
}
test cases
test_modemmanager_initialization — connect to mm d-bus
test_list_modems — enumerate modems
test_modem_properties — read manufacturer, model, imei
test_sim_properties — read iccid, imsi, operator (if sim present)
test_signal_quality — read signal strength
test_bearer_lifecycle — create, connect, disconnect, delete (needs real modem or mock)
mock modem
modemmanager supports virtual modems for testing. look into mmcli --test or libmm-glib test fixtures.
alternatively, skip bearer tests without hardware and just test the proxy/model layers.
hardware tests
for real modem testing, document the setup (sim with data plan, apn config). these would be #[ignore] by default and run manually.
add integration tests for mmrs, following the nmrs pattern.
test macros
test cases
test_modemmanager_initialization— connect to mm d-bustest_list_modems— enumerate modemstest_modem_properties— read manufacturer, model, imeitest_sim_properties— read iccid, imsi, operator (if sim present)test_signal_quality— read signal strengthtest_bearer_lifecycle— create, connect, disconnect, delete (needs real modem or mock)mock modem
modemmanager supports virtual modems for testing. look into
mmcli --testorlibmm-glibtest fixtures.alternatively, skip bearer tests without hardware and just test the proxy/model layers.
hardware tests
for real modem testing, document the setup (sim with data plan, apn config). these would be
#[ignore]by default and run manually.