Struct merino_integration_tests::utils::test_tools::TestingTools
source · [−]#[non_exhaustive]pub struct TestingTools {
pub test_client: TestReqwestClient,
pub settings: Settings,
pub log_watcher: LogWatcher,
pub redis_client: Client,
pub metrics_watcher: MetricsWatcher,
}
Expand description
A set of tools for tests, including mock servers and logging helpers.
The fields of this struct are marked as non-exhaustive, meaning that any
destructuring of this struct will require a ..
“and the rest” entry, even
if all present items are named. This makes adding tools in the future easier,
since old tests won’t need to be rewritten to account for the added tools.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.test_client: TestReqwestClient
A wrapper around a reqwest::client
that automatically uses the Merino
server under test.
settings: Settings
A copy of the current settings.
log_watcher: LogWatcher
To make assertions about logs.
redis_client: Client
To interact with the Redis cache
metrics_watcher: MetricsWatcher
To make assertions about metrics.
Auto Trait Implementations
impl !RefUnwindSafe for TestingTools
impl Send for TestingTools
impl Sync for TestingTools
impl Unpin for TestingTools
impl !UnwindSafe for TestingTools
Blanket Implementations
sourceimpl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
sourceimpl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more