20260707 支持本地HTTP root证书
This commit is contained in:
@@ -289,6 +289,29 @@ fn parse_accepts_host_rsync_scope_policy() {
|
||||
assert_eq!(args.rsync_scope_policy, RsyncScopePolicy::Host);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_accepts_repeatable_http_root_cert_paths() {
|
||||
let argv = vec![
|
||||
"rpki".to_string(),
|
||||
"--db".to_string(),
|
||||
"db".to_string(),
|
||||
"--tal-url".to_string(),
|
||||
"https://example.test/x.tal".to_string(),
|
||||
"--http-root-cert".to_string(),
|
||||
"local-ca-1.pem".to_string(),
|
||||
"--http-root-cert".to_string(),
|
||||
"local-ca-2.pem".to_string(),
|
||||
];
|
||||
let args = parse_args(&argv).expect("parse args");
|
||||
assert_eq!(
|
||||
args.http_root_cert_paths,
|
||||
vec![
|
||||
PathBuf::from("local-ca-1.pem"),
|
||||
PathBuf::from("local-ca-2.pem")
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_rejects_invalid_rsync_scope_policy() {
|
||||
let argv = vec![
|
||||
|
||||
Reference in New Issue
Block a user