MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / test_lorawan_10

Function test_lorawan_10

chirpstack/src/test/relay_class_a_test.rs:30–789  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29#[tokio::test]
30async 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 })

Callers

nothing calls this directly

Calls 15

prepareFunction · 0.85
set_uplink_modulationFunction · 0.85
MACPayloadClass · 0.85
ForwardUplinkReqClass · 0.85
ForwardDownlinkReqClass · 0.85
unwrapMethod · 0.80
to_stringMethod · 0.80
encrypt_frm_payloadMethod · 0.80
as_refMethod · 0.80
set_uplink_data_micMethod · 0.80
set_downlink_data_micMethod · 0.80
run_testFunction · 0.70

Tested by

no test coverage detected