-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerstest-framework
Description
Basically when creating an Output value already check that stderr doesn't contain the word panic and that the exit code is not 101.
sudo-rs/test-framework/sudo-test/src/docker/command.rs
Lines 213 to 235 in 71a2eb7
| impl TryFrom<process::Output> for Output { | |
| type Error = Error; | |
| fn try_from(output: process::Output) -> std::result::Result<Self, Self::Error> { | |
| let mut stderr = String::from_utf8(output.stderr)?; | |
| let mut stdout = String::from_utf8(output.stdout)?; | |
| // it's a common pitfall to forget to remove the trailing '\n' so remove it here | |
| if stderr.ends_with('\n') { | |
| stderr.pop(); | |
| } | |
| if stdout.ends_with('\n') { | |
| stdout.pop(); | |
| } | |
| Ok(Output { | |
| status: output.status, | |
| stderr, | |
| stdout, | |
| }) | |
| } | |
| } |
squell
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerstest-framework