Skip to content

Commit

Permalink
Fix config generation for tester
Browse files Browse the repository at this point in the history
  • Loading branch information
IAvecilla committed Feb 23, 2024
1 parent 8b6f54d commit 65e5295
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions node/tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ pub async fn generate_config() -> anyhow::Result<()> {
.await
.context("Failed to get consensus pods address")?;
let config_file_path = get_config_path();
let mut config_file = fs::OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(&config_file_path)?;
for addr in pods_ip {
let mut config_file = fs::OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(&config_file_path)?;
config_file
.write_all(addr.to_string().as_bytes())
.write_all(format!("{}\n", addr.to_string()).as_bytes())
.with_context(|| "Failed to write to config file")?;
}
Ok(())
Expand Down

0 comments on commit 65e5295

Please sign in to comment.