| 694 | } |
| 695 | |
| 696 | pub async fn create_tenant() -> Tenant { |
| 697 | let t = Tenant { |
| 698 | id: Uuid::new_v4().into(), |
| 699 | created_at: Utc::now().round_subsecs(1), |
| 700 | updated_at: Utc::now().round_subsecs(1), |
| 701 | name: "test t".into(), |
| 702 | description: "test description".into(), |
| 703 | can_have_gateways: true, |
| 704 | max_device_count: 20, |
| 705 | max_gateway_count: 10, |
| 706 | private_gateways_up: true, |
| 707 | private_gateways_down: true, |
| 708 | tags: fields::KeyValue::new(HashMap::new()), |
| 709 | dev_addr_prefixes: fields::DevAddrPrefixVec::new(vec![]), |
| 710 | }; |
| 711 | create(t).await.unwrap() |
| 712 | } |
| 713 | |
| 714 | #[tokio::test] |
| 715 | async fn test_tenant() { |