pub struct TestCompositeBuilder { /* private fields */ }Expand description
Builder for configuring and creating test environments.
This builder is used to configure the test environment with the services that will be used in the test. It provides an API for adding services and configuring them.
Implementations§
Source§impl TestCompositeBuilder
impl TestCompositeBuilder
Sourcepub fn with_service<C: Config + 'static>(self, config: C) -> Self
pub fn with_service<C: Config + 'static>(self, config: C) -> Self
Configures a service with the provided configuration. The service will be started when the test environment is built. Each service must have a unique hostname.
Sourcepub async fn build(self) -> Result<TestComposite, TestError>
pub async fn build(self) -> Result<TestComposite, TestError>
Builds the test environment with all configured services.
Starts Docker containers, creates networks and initializes all services.
Returns a TestComposite that can be used to access the services.
Auto Trait Implementations§
impl Freeze for TestCompositeBuilder
impl !RefUnwindSafe for TestCompositeBuilder
impl !Send for TestCompositeBuilder
impl !Sync for TestCompositeBuilder
impl Unpin for TestCompositeBuilder
impl !UnwindSafe for TestCompositeBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more