zebra_test::command

Trait TestDirExt

Source
pub trait TestDirExt
where Self: AsRef<Path> + Sized,
{ // Required method fn spawn_child_with_command( self, cmd: &str, args: Arguments, ) -> Result<TestChild<Self>>; }
Expand description

Extension trait for methods on tempdir::TempDir for using it as a test directory with an arbitrary command.

This trait is separate from ZebradTestDirExt, so that we can test zebra_test::command without running zebrad.

Required Methods§

Source

fn spawn_child_with_command( self, cmd: &str, args: Arguments, ) -> Result<TestChild<Self>>

Spawn cmd with args as a child process in this test directory, potentially taking ownership of the tempdir for the duration of the child process.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> TestDirExt for T
where Self: AsRef<Path> + Sized,