Skip to content

Commit

Permalink
Format Rust code using rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored May 19, 2024
1 parent 334c539 commit 114e0f6
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/database/finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,17 +1094,30 @@ mod tests {
opt.env.as_mut().unwrap().default_behavior = EnvBehavior::Keep;
opt.authentication = Some(SAuthentication::Skip);
}

assert_eq!(
get_security_min(&Some(rcopt.clone())),
SecurityMin::DisableBounding | SecurityMin::EnableRoot | SecurityMin::KeepUnsafePath | SecurityMin::KeepEnv | SecurityMin::SkipAuth
SecurityMin::DisableBounding
| SecurityMin::EnableRoot
| SecurityMin::KeepUnsafePath
| SecurityMin::KeepEnv
| SecurityMin::SkipAuth
);
rcopt.as_ref().borrow_mut().path.as_mut().unwrap().default_behavior = PathBehavior::KeepSafe;
rcopt
.as_ref()
.borrow_mut()
.path
.as_mut()
.unwrap()
.default_behavior = PathBehavior::KeepSafe;
assert_eq!(
get_security_min(&Some(rcopt.clone())),
SecurityMin::DisableBounding | SecurityMin::EnableRoot | SecurityMin::KeepPath | SecurityMin::KeepEnv | SecurityMin::SkipAuth
SecurityMin::DisableBounding
| SecurityMin::EnableRoot
| SecurityMin::KeepPath
| SecurityMin::KeepEnv
| SecurityMin::SkipAuth
);

}

#[test]
Expand Down

0 comments on commit 114e0f6

Please sign in to comment.