Refactor acceptance serialized_tests (#920)
* add network listening address to default config
This commit is contained in:
parent
1d6183ef84
commit
d349f2bbc2
|
@ -26,7 +26,7 @@ pub fn tempdir(create_config: bool) -> Result<(PathBuf, impl Drop)> {
|
|||
fs::create_dir(&cache_dir)?;
|
||||
fs::File::create(dir.path().join("zebrad.toml"))?.write_all(
|
||||
format!(
|
||||
"[state]\ncache_dir = '{}'\nmemory_cache_bytes = 256000000",
|
||||
"[state]\ncache_dir = '{}'\nmemory_cache_bytes = 256000000\n[network]\nlisten_addr = '127.0.0.1:0'\n",
|
||||
cache_dir
|
||||
.into_os_string()
|
||||
.into_string()
|
||||
|
|
|
@ -127,6 +127,7 @@ fn revhex_args() -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn seed_no_args() -> Result<()> {
|
||||
zebra_test::init();
|
||||
let (tempdir, _guard) = tempdir(true)?;
|
||||
|
@ -171,6 +172,7 @@ fn seed_args() -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_no_args() -> Result<()> {
|
||||
zebra_test::init();
|
||||
let (tempdir, _guard) = tempdir(true)?;
|
||||
|
@ -192,6 +194,7 @@ fn start_no_args() -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_args() -> Result<()> {
|
||||
zebra_test::init();
|
||||
let (tempdir, _guard) = tempdir(true)?;
|
||||
|
@ -263,15 +266,6 @@ fn version_args() -> Result<()> {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn serialized_tests() -> Result<()> {
|
||||
start_no_args()?;
|
||||
start_args()?;
|
||||
seed_no_args()?;
|
||||
valid_generated_config()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn valid_generated_config() -> Result<()> {
|
||||
zebra_test::init();
|
||||
let (tempdir, _guard) = tempdir(false)?;
|
||||
|
|
Loading…
Reference in New Issue