fix: use tempdir when testing static files (#6962)

This commit is contained in:
Abner Zheng
2024-03-16 20:57:18 +08:00
committed by GitHub
parent 5e9e21dec5
commit 3b4726a714
10 changed files with 88 additions and 96 deletions

View File

@ -661,11 +661,12 @@ mod tests {
#[test]
fn provider_factory_with_database_path() {
let chain_spec = ChainSpecBuilder::mainnet().build();
let (_static_dir, static_dir_path) = create_test_static_files_dir();
let factory = ProviderFactory::new_with_database_path(
tempfile::TempDir::new().expect(ERROR_TEMPDIR).into_path(),
Arc::new(chain_spec),
DatabaseArguments::new(Default::default()),
create_test_static_files_dir(),
static_dir_path,
)
.unwrap();