pub struct Runner { /* private fields */ }Implementations§
Source§impl Runner
A test helper that runs a postgres container and waits for it to be ready.
impl Runner
A test helper that runs a postgres container and waits for it to be ready.
Sourcepub fn container_tag(self, container_tag: &'static str) -> Self
pub fn container_tag(self, container_tag: &'static str) -> Self
Set the postgres image tag to use. See https://hub.docker.com/_/postgres for available tags.
Defaults to 15.3-alpine3.18.
Sourcepub fn container_timeout(self, container_timeout: Duration) -> Self
pub fn container_timeout(self, container_timeout: Duration) -> Self
Set the container timeout for the test. The test will fail if the container is not ready within this time.
Defaults to 10 seconds.
Sourcepub fn connection_timeout(self, timeout: Duration) -> Self
pub fn connection_timeout(self, timeout: Duration) -> Self
Set the connection timeout for the test. The test will fail if the connection is not established within this time.
Defaults to 2 seconds.
Sourcepub fn connection_test_interval(
self,
connection_test_interval: Duration,
) -> Self
pub fn connection_test_interval( self, connection_test_interval: Duration, ) -> Self
Set the interval between connection attempts.
Defaults to 100 milliseconds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runner
impl RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnwindSafe for Runner
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