Skip to content

Commit

Permalink
chore(rust): updated tests according to fn
Browse files Browse the repository at this point in the history
  • Loading branch information
PsychoPunkSage committed Jul 30, 2024
1 parent eaacc93 commit 7452a01
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/rust/tcp_inlet_and_outlet/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use example_test_helper::{find_available_port, CmdBuilder, Error};

#[test]
fn run_01_inlet_outlet_one_process() -> Result<(), Error> {
let port = find_available_port().expect("Failed to find available port");
let port = find_available_port();
// Spawn example, wait for it to start up
let runner = CmdBuilder::new(&format!(
"cargo run --locked --example 01-inlet-outlet 127.0.0.1:{port} ockam.io:80"
Expand All @@ -22,8 +22,8 @@ fn run_01_inlet_outlet_one_process() -> Result<(), Error> {

#[test]
fn run_02_inlet_outlet_separate_processes() -> Result<(), Error> {
let routing_port = find_available_port().expect("Failed to find available port");
let inlet_port = find_available_port().expect("Failed to find available port");
let routing_port = find_available_port();
let inlet_port = find_available_port();
// Spawn outlet, wait for it to start up
let outlet = CmdBuilder::new(&format!(
"cargo run --locked --example 02-outlet ockam.io:80 {routing_port}"
Expand Down Expand Up @@ -53,8 +53,8 @@ fn run_02_inlet_outlet_separate_processes() -> Result<(), Error> {
#[test]
#[ignore]
fn run_03_inlet_outlet_separate_processes_secure_channel() -> Result<(), Error> {
let routing_port = find_available_port().expect("Failed to find available port");
let inlet_port = find_available_port().expect("Failed to find available port");
let routing_port = find_available_port();
let inlet_port = find_available_port();
// Spawn outlet, wait for it to start up
let outlet = CmdBuilder::new(&format!(
"cargo run --locked --example 03-outlet ockam.io:80 {routing_port}"
Expand Down Expand Up @@ -84,7 +84,7 @@ fn run_03_inlet_outlet_separate_processes_secure_channel() -> Result<(), Error>
#[test]
#[ignore]
fn run_04_inlet_outlet_separate_processes_secure_channel_via_ockam_orchestrator() -> Result<(), Error> {
let port = find_available_port().expect("Failed to find available port");
let port = find_available_port();
// Spawn outlet, wait for it to start up, grab dynamic forwarding address
let outlet = CmdBuilder::new("cargo run --locked --example 04-outlet ockam.io:80").spawn()?;
outlet.match_stdout(r"(?i)RemoteRelay was created on the node")?;
Expand Down

0 comments on commit 7452a01

Please sign in to comment.