[tests] Fuzz: one fixed credentials folder, rewritten by each run, instead of one per process
This commit is contained in:
@@ -105,7 +105,8 @@ fn compile_checked(site: &str, hosts: &[(String, String)]) {
|
||||
fn creds_dir() -> &'static PathBuf {
|
||||
static DIR: OnceLock<PathBuf> = OnceLock::new();
|
||||
DIR.get_or_init(|| {
|
||||
let d = std::env::temp_dir().join(format!("ianitor-fuzz-creds-{}", std::process::id()));
|
||||
// One fixed folder, rewritten by every run: nothing piles up in the temp folder.
|
||||
let d = std::env::temp_dir().join("ianitor-fuzz-creds");
|
||||
std::fs::create_dir_all(&d).unwrap();
|
||||
std::fs::write(d.join("api_key"), b"fuzz-secret-value\n").unwrap();
|
||||
std::fs::write(d.join("ui-proof"), b"fuzz-proof-value\n").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user