Struct libcnb_test::IntegrationTestContext
source · [−]pub struct IntegrationTestContext<'a> {
pub pack_stdout: String,
pub pack_stderr: String,
pub image_name: String,
pub app_dir: PathBuf,
/* private fields */
}
Expand description
Context for a currently executing integration test.
Fields
pack_stdout: String
Standard output of pack
, interpreted as an UTF-8 string.
pack_stderr: String
Standard error of pack
, interpreted as an UTF-8 string.
image_name: String
The name of the image this integration test created.
app_dir: PathBuf
The directory of the app this integration test uses.
This is a copy of the app_dir
directory passed to IntegrationTest::new
and unique to
this integration test run. It is safe to modify the directory contents inside the test.
Implementations
Starts a new container with the image from the integration test.
The given exposed_ports
are mapped to random ports on the host machine. Use
ContainerContext::address_for_port
to obtain the local port for a mapped port.
Panics
- When the container could not be created
- When the container could not be started
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for IntegrationTestContext<'a>
impl<'a> Send for IntegrationTestContext<'a>
impl<'a> Sync for IntegrationTestContext<'a>
impl<'a> Unpin for IntegrationTestContext<'a>
impl<'a> !UnwindSafe for IntegrationTestContext<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more