pub struct MysqlTestContainer { /* private fields */ }Expand description
Handle to the suite’s shared MySQL container.
Implementations§
Source§impl MysqlTestContainer
impl MysqlTestContainer
Sourcepub async fn start(suite: &TestContainerSuite) -> Self
pub async fn start(suite: &TestContainerSuite) -> Self
Starts (or reuses) the shared MySQL container with root/rootpass credentials.
Sourcepub fn database_url(&self, database: &str) -> String
pub fn database_url(&self, database: &str) -> String
Builds a URL for a database created inside this container.
Sourcepub fn stale_resources(&self) -> &[String]
pub fn stale_resources(&self) -> &[String]
Returns resources left by test processes that no longer exist.
Sourcepub fn remember_resource(&self, resource: &str)
pub fn remember_resource(&self, resource: &str)
Registers a product-owned resource, such as a per-test database name.
Sourcepub fn forget_resource(&self, resource: &str)
pub fn forget_resource(&self, resource: &str)
Removes a resource after the product test harness cleaned it up.
Auto Trait Implementations§
impl Freeze for MysqlTestContainer
impl !RefUnwindSafe for MysqlTestContainer
impl Send for MysqlTestContainer
impl Sync for MysqlTestContainer
impl Unpin for MysqlTestContainer
impl UnsafeUnpin for MysqlTestContainer
impl !UnwindSafe for MysqlTestContainer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].