Skip to content

Commit

Permalink
e2e_tests/mangled_ping: Fix socket path
Browse files Browse the repository at this point in the history
Use the environment variable PARSEC_SERVICE_ENDPOINT to define the
socket path for the test.

Signed-off-by: Tomás González <[email protected]>
  • Loading branch information
tgonzalezorlandoarm committed Oct 25, 2023
1 parent 85e4370 commit c955d41
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions e2e_tests/tests/per_provider/normal_tests/ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use parsec_client::core::interface::requests::ProviderId;
use parsec_client::core::interface::requests::ResponseStatus;
use parsec_client::core::interface::requests::Result;
use parsec_client::core::ipc_handler::unix_socket;
use std::env;
use std::time::Duration;

#[test]
Expand All @@ -22,10 +23,12 @@ fn test_ping() -> Result<()> {

#[test]
fn mangled_ping() {
let socket_path = env::var("PARSEC_SERVICE_ENDPOINT")
.unwrap_or_else(|_| "/tmp/parsec.sock".into())
.replace("unix:", "");
let client = RequestClient {
ipc_handler: Box::from(
unix_socket::Handler::new("/tmp/parsec.sock".into(), Some(Duration::from_secs(1)))
.unwrap(),
unix_socket::Handler::new(socket_path.into(), Some(Duration::from_secs(1))).unwrap(),
),
..Default::default()
};
Expand Down

0 comments on commit c955d41

Please sign in to comment.