Skip to content

Commit

Permalink
Make TP test module port configurable
Browse files Browse the repository at this point in the history
This enables running multiple TP's across different tests
simultaneously.
  • Loading branch information
jbesraa committed Sep 11, 2024
1 parent da4785d commit e7b16b0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions roles/tests-integration/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,16 @@ pub struct TemplateProvider {
}

impl TemplateProvider {
pub fn start() -> Self {
let temp_dir = PathBuf::from("/tmp/.template-provider/");
pub fn start(port: u16) -> Self {
let path_name = format!("/tmp/.template-provider-{}", port);
let temp_dir = PathBuf::from(&path_name);

let mut conf = Conf::default();
let port = format!("-sv2port={}", port);
conf.args.extend(vec![
"-txindex=1",
"-sv2",
"-sv2port=8442",
&port,
"-debug=sv2",
"-sv2interval=20",
"-sv2feedelta=1000",
Expand Down

0 comments on commit e7b16b0

Please sign in to comment.