Skip to content

Commit

Permalink
fix(test): update the node_manager tests to use the new error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin authored and joshuef committed Jun 7, 2024
1 parent 5e673b6 commit 4994dfb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sn_node_manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,10 @@ mod tests {
let result = service_manager.start().await;
match result {
Ok(_) => panic!("This test should have resulted in an error"),
Err(e) => assert_eq!("The 'safenode1' service has failed to start", e.to_string()),
Err(e) => assert_eq!(
"The PID of the process was not found after starting it.",
e.to_string()
),
}

Ok(())
Expand Down Expand Up @@ -3553,7 +3556,10 @@ mod tests {
let result = service_manager.remove(false).await;
match result {
Ok(_) => panic!("This test should result in an error"),
Err(e) => assert_eq!("A running service cannot be removed", e.to_string()),
Err(e) => assert_eq!(
"The service(s) is already running: [\"safenode1\"]",
e.to_string()
),
}

Ok(())
Expand Down Expand Up @@ -3616,7 +3622,7 @@ mod tests {
match result {
Ok(_) => panic!("This test should result in an error"),
Err(e) => assert_eq!(
"This service was marked as running but it had actually stopped",
"The service status is not as expected. Expected: Running",
e.to_string()
),
}
Expand Down

0 comments on commit 4994dfb

Please sign in to comment.