Skip to content

Commit

Permalink
fix(tests): fix initial command to run httpd
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <tareknaser360@gmail.com>
  • Loading branch information
tareknaser authored and vincenzopalazzo committed Jul 9, 2023
1 parent 0ae65fb commit 3a7828c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coffee_testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub mod macros {

let cargo_target = concat!(env!("CARGO_MANIFEST_DIR"), "/..");
let httpd_path = std::path::Path::new(cargo_target).to_str().unwrap();
let mut command = Command::new(httpd_path);
let mut command = Command::new(format!("{httpd_path}//target/debug/coffee_httpd"));
command
.args(&args_tok)
.arg("--host=127.0.0.1")
Expand Down
5 changes: 3 additions & 2 deletions tests/src/coffee_httpd_integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ pub async fn init_httpd_add_remote() {
let lightning_dir = lightning_dir.strip_suffix("/regtest").unwrap();
log::info!("lightning path: {lightning_dir}");

let url = CoffeeHTTPDTesting::url(&manager).await.unwrap();
let url = manager.url().await.unwrap();
log::info!("base url: {url}");

let body = reqwest::get(format!("{url}/list"))
let body = reqwest::get(format!("http://{url}/list"))
.await
.unwrap()
.text()
Expand Down

0 comments on commit 3a7828c

Please sign in to comment.