testcontainer/exec
Types
The result of running a command inside a container via
testcontainer.exec/2.
stdout and stderr are returned separately when the command runs
without a TTY (the default). For TTY exec calls the combined output
arrives in stdout.
pub type ExecResult {
ExecResult(exit_code: Int, stdout: String, stderr: String)
}
Constructors
-
ExecResult(exit_code: Int, stdout: String, stderr: String)
Values
pub fn output(result: ExecResult) -> String
Returns stdout <> stderr, useful when the caller only cares about
the combined human-readable output.
pub fn succeeded(result: ExecResult) -> Bool
True iff the command exited with status 0.