()
| 529 | |
| 530 | #[tokio::test] |
| 531 | async fn test_multicast_group() { |
| 532 | let _guard = test::prepare().await; |
| 533 | |
| 534 | // setup admin user |
| 535 | let u = user::User { |
| 536 | is_admin: true, |
| 537 | is_active: true, |
| 538 | email: "admin@admin".into(), |
| 539 | email_verified: true, |
| 540 | ..Default::default() |
| 541 | }; |
| 542 | let u = user::create(u).await.unwrap(); |
| 543 | |
| 544 | // create tenant |
| 545 | let t = tenant::create(tenant::Tenant { |
| 546 | name: "test-tenant".into(), |
| 547 | can_have_gateways: true, |
| 548 | max_gateway_count: 10, |
| 549 | ..Default::default() |
| 550 | }) |
| 551 | .await |
| 552 | .unwrap(); |
| 553 | |
| 554 | // create gws |
| 555 | let gw1 = gateway::create(gateway::Gateway { |
| 556 | name: "test-gw-1".into(), |
| 557 | tenant_id: t.id, |
| 558 | gateway_id: EUI64::from_be_bytes([8, 7, 6, 54, 4, 3, 2, 1]), |
| 559 | ..Default::default() |
| 560 | }) |
| 561 | .await |
| 562 | .unwrap(); |
| 563 | let gw2 = gateway::create(gateway::Gateway { |
| 564 | name: "test-gw-2".into(), |
| 565 | tenant_id: t.id, |
| 566 | gateway_id: EUI64::from_be_bytes([8, 7, 6, 54, 4, 3, 2, 2]), |
| 567 | ..Default::default() |
| 568 | }) |
| 569 | .await |
| 570 | .unwrap(); |
| 571 | |
| 572 | // create application |
| 573 | let app = application::create(application::Application { |
| 574 | name: "test-app".into(), |
| 575 | tenant_id: t.id, |
| 576 | ..Default::default() |
| 577 | }) |
| 578 | .await |
| 579 | .unwrap(); |
| 580 | |
| 581 | // create device-profile |
| 582 | let dp = device_profile::create(device_profile::DeviceProfile { |
| 583 | name: "test-dp".into(), |
| 584 | tenant_id: Some(t.id), |
| 585 | ..Default::default() |
| 586 | }) |
| 587 | .await |
| 588 | .unwrap(); |
nothing calls this directly
no test coverage detected