mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 13:16:28 +00:00
test(connect): use protected home for bootstrap fixtures (#6515)
This commit is contained in:
@@ -434,10 +434,11 @@ mod tests {
|
||||
};
|
||||
|
||||
fn secure_tempdir() -> tempfile::TempDir {
|
||||
let home = std::path::PathBuf::from(std::env::var_os("HOME").expect("test requires a protected home directory"));
|
||||
tempfile::Builder::new()
|
||||
.prefix(".connect-registration-bootstrap-")
|
||||
.tempdir_in(env!("CARGO_MANIFEST_DIR"))
|
||||
.expect("temporary directory inside the protected checkout")
|
||||
.tempdir_in(home)
|
||||
.expect("temporary directory inside the protected home directory")
|
||||
}
|
||||
|
||||
fn create_secure_state_tree(state: &Path) {
|
||||
|
||||
@@ -278,10 +278,11 @@ fn prepare_inputs(temp: &tempfile::TempDir, root_pem: &str) -> (std::path::PathB
|
||||
}
|
||||
|
||||
fn secure_tempdir() -> tempfile::TempDir {
|
||||
let home = std::path::PathBuf::from(std::env::var_os("HOME").expect("test requires a protected home directory"));
|
||||
tempfile::Builder::new()
|
||||
.prefix(".connect-registration-")
|
||||
.tempdir_in(env!("CARGO_MANIFEST_DIR"))
|
||||
.expect("temporary directory inside the protected checkout")
|
||||
.tempdir_in(home)
|
||||
.expect("temporary directory inside the protected home directory")
|
||||
}
|
||||
|
||||
fn run_binary(endpoint: String, root: std::path::PathBuf, state: std::path::PathBuf, token: Vec<u8>) -> std::process::Output {
|
||||
|
||||
Reference in New Issue
Block a user