test: use root for HIP user lookup (#696)

This commit is contained in:
Ihar Hrachyshka authored and GitHub committed 2026-11-06 09:08:48 +08:00
1 parent 16e08c09af
commit e03a758acb
1 file changed
+2 -3
+2 -3
View File
@@ -785,9 +785,8 @@ mod tests {
#[test]
fn explicit_hip_user_resolves_to_the_selected_account() {
let current = uzers::get_user_by_uid(uzers::get_effective_uid()).unwrap();
let name = current.name().to_string_lossy().into_owned();
assert_eq!(get_uid(&Some(name)).unwrap(), Some(current.uid()));
// Build sandboxes may use a UID without an entry in the user database.
assert_eq!(get_uid(&Some("root".to_string())).unwrap(), Some(0));
}
#[test]