From 40317cb1ecfd555d898e90a984c211e3868606a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gonz=C3=A1lez?= Date: Wed, 25 Oct 2023 12:55:10 +0100 Subject: [PATCH] e2e_tests/mangled_ping: Fix socket path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the environment variable PARSEC_SERVICE_ENDPOINT to define the socket path for the test. Signed-off-by: Tomás González --- e2e_tests/tests/per_provider/normal_tests/ping.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e_tests/tests/per_provider/normal_tests/ping.rs b/e2e_tests/tests/per_provider/normal_tests/ping.rs index 34b97127..76b5bb7c 100644 --- a/e2e_tests/tests/per_provider/normal_tests/ping.rs +++ b/e2e_tests/tests/per_provider/normal_tests/ping.rs @@ -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] @@ -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() };