(catalog: &SystemCatalog)
| 39 | } |
| 40 | |
| 41 | pub fn put_admin_user(catalog: &SystemCatalog) { |
| 42 | let user = StoredUser { |
| 43 | user_id: 1, |
| 44 | username: ADMIN.to_string(), |
| 45 | tenant_id: TENANT, |
| 46 | password_hash: "argon2id$dummy".to_string(), |
| 47 | scram_salt: vec![], |
| 48 | scram_salted_password: vec![], |
| 49 | roles: vec!["superuser".to_string()], |
| 50 | is_superuser: true, |
| 51 | is_active: true, |
| 52 | is_service_account: false, |
| 53 | created_at: 0, |
| 54 | updated_at: 0, |
| 55 | password_expires_at: 0, |
| 56 | must_change_password: false, |
| 57 | password_changed_at: 0, |
| 58 | default_database_id: 0, |
| 59 | accessible_databases: vec![], |
| 60 | }; |
| 61 | catalog.put_user(&user).unwrap(); |
| 62 | } |
| 63 | |
| 64 | pub fn make_collection(name: &str) -> StoredCollection { |
| 65 | StoredCollection::new(TENANT, name, ADMIN) |
no test coverage detected