()
| 28 | |
| 29 | #[tokio::test] |
| 30 | async fn test_lorawan_10() { |
| 31 | let _guard = test::prepare().await; |
| 32 | |
| 33 | let t = tenant::create(tenant::Tenant { |
| 34 | name: "tenant".into(), |
| 35 | can_have_gateways: true, |
| 36 | ..Default::default() |
| 37 | }) |
| 38 | .await |
| 39 | .unwrap(); |
| 40 | |
| 41 | let gw = gateway::create(gateway::Gateway { |
| 42 | name: "gateway".into(), |
| 43 | tenant_id: t.id, |
| 44 | gateway_id: EUI64::from_be_bytes([1, 2, 3, 4, 5, 6, 7, 8]), |
| 45 | ..Default::default() |
| 46 | }) |
| 47 | .await |
| 48 | .unwrap(); |
| 49 | |
| 50 | let app = application::create(application::Application { |
| 51 | name: "app".into(), |
| 52 | tenant_id: t.id, |
| 53 | ..Default::default() |
| 54 | }) |
| 55 | .await |
| 56 | .unwrap(); |
| 57 | |
| 58 | let dp_relay = device_profile::create(device_profile::DeviceProfile { |
| 59 | name: "dp-relay".into(), |
| 60 | tenant_id: Some(t.id), |
| 61 | region: lrwn::region::CommonName::EU868, |
| 62 | mac_version: lrwn::region::MacVersion::LORAWAN_1_0_4, |
| 63 | reg_params_revision: lrwn::region::Revision::RP002_1_0_3, |
| 64 | supports_otaa: true, |
| 65 | relay_params: Some(fields::RelayParams { |
| 66 | is_relay: true, |
| 67 | relay_enabled: true, |
| 68 | ..Default::default() |
| 69 | }), |
| 70 | ..Default::default() |
| 71 | }) |
| 72 | .await |
| 73 | .unwrap(); |
| 74 | |
| 75 | let dp_relay_ed = device_profile::create(device_profile::DeviceProfile { |
| 76 | name: "dp-relay-ed".into(), |
| 77 | tenant_id: Some(t.id), |
| 78 | region: lrwn::region::CommonName::EU868, |
| 79 | mac_version: lrwn::region::MacVersion::LORAWAN_1_0_4, |
| 80 | reg_params_revision: lrwn::region::Revision::RP002_1_0_3, |
| 81 | supports_otaa: true, |
| 82 | relay_params: Some(fields::RelayParams { |
| 83 | is_relay_ed: true, |
| 84 | ..Default::default() |
| 85 | }), |
| 86 | ..Default::default() |
| 87 | }) |
nothing calls this directly
no test coverage detected