Skip to content

Commit

Permalink
Fix test parsing of nodeid
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidmackenzie committed Jan 27, 2025
1 parent 4ded337 commit 375b866
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/views/connect_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,7 @@ mod tests {
#[test]
fn test_connect_button_pressed_invalid_node_id() {
let mut connect_dialog = ConnectDialog::new();
let invalid_node_id =
"5ee6105f4cc993f0390595eed5c08732542fa585d89efca5e0c0b0518e06a699".to_string();
let invalid_node_id = "".to_string();

let _ = connect_dialog.update(ConnectButtonPressedIroh(invalid_node_id, "".to_string()));
assert!(!connect_dialog.iroh_connection_error.is_empty());
Expand Down
6 changes: 5 additions & 1 deletion tests/integration/iroh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ use serial_test::serial;
fn connect_via_iroh() {
let mut piglet = run("piglet", vec![], None);
let line = wait_for_stdout(&mut piglet, "nodeid:").expect("Could not get IP address");
let nodeid = line.split_once(":").expect("Couldn't fine ':'").1;
let nodeid = line
.split_once("nodeid:")
.expect("Couldn't find 'nodeid:'")
.1
.trim();

let mut piggui = run(
"piggui",
Expand Down

0 comments on commit 375b866

Please sign in to comment.