MCPcopy Create free account
hub / github.com/bootc-dev/bootc / mock_userdb

Function mock_userdb

crates/tmpfiles/src/lib.rs:568–579  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566 }
567
568 fn mock_userdb() -> uzers::mock::MockUsers {
569 let testuid = rustix::process::getuid();
570 let testgid = rustix::process::getgid();
571 let mut users = uzers::mock::MockUsers::with_current_uid(testuid.as_raw());
572 users.add_user(uzers::User::new(
573 testuid.as_raw(),
574 "testuser",
575 testgid.as_raw(),
576 ));
577 users.add_group(uzers::Group::new(testgid.as_raw(), "testgroup"));
578 users
579 }
580
581 #[test]
582 fn test_tmpfiles_d_translation() -> anyhow::Result<()> {

Callers 2

test_log_regfileFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_log_regfileFunction · 0.68