feat allow custom config file in testing mode via env IPFS_TEST_CONFIG

This commit is contained in:
Joonas Koivunen 2019-11-22 15:28:19 +02:00 committed by David Craven
parent 06965e7b4c
commit 37dca2fd2d

View File

@ -111,7 +111,7 @@ impl Default for IpfsOptions<TestTypes> {
fn default() -> Self {
let ipfs_log = std::env::var("IPFS_LOG").unwrap_or(IPFS_LOG.into());
let ipfs_path = std::env::var("IPFS_PATH").unwrap_or(IPFS_PATH.into()).into();
let config = ConfigFile::default();
let config = std::env::var("IPFS_TEST_CONFIG").map(|s| ConfigFile::new(s)).unwrap_or_else(|_| ConfigFile::default());
IpfsOptions {
_marker: PhantomData,
ipfs_log,