Skip to content

Commit 4456939

Browse files
committed
fix: switch read_event_type doctest to preview image
1 parent c5e15fa commit 4456939

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl Client {
219219
/// use futures::StreamExt;
220220
/// # use serde_json::json;
221221
/// # tokio_test::block_on(async {
222-
/// # let container = eventsourcingdb::container::Container::start_default().await.unwrap();
222+
/// # let container = eventsourcingdb::container::Container::start_preview().await.unwrap();
223223
/// let db_url = "http://localhost:3000/";
224224
/// let api_token = "secrettoken";
225225
/// # let db_url = container.get_base_url().await.unwrap();

src/container.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,25 @@ impl Container {
169169
/// Shortcut method to start the container with default settings.
170170
///
171171
/// This is the same as calling [`Container::builder`] and then [`ContainerBuilder::start`].
172-
/// In most cases this will create a contaienr with the latest image tag and a working configuration.
172+
/// In most cases this will create a container with the latest image tag and a working configuration.
173173
///
174174
/// # Errors
175175
/// This functions returns the errors of [`ContainerBuilder::start()`]
176176
pub async fn start_default() -> Result<Container, ContainerError> {
177177
Self::builder().start().await
178178
}
179179

180+
/// Shortcut method to start the container with the preview tag and default settings.
181+
///
182+
/// This is the same as calling [`Container::builder`], [`Container::with_image_tag("preview")`] and then [`ContainerBuilder::start`].
183+
/// In most cases this will create a container with the latest image tag and a working configuration.
184+
///
185+
/// # Errors
186+
/// This functions returns the errors of [`ContainerBuilder::start()`]
187+
pub async fn start_preview() -> Result<Container, ContainerError> {
188+
Self::builder().with_image_tag("preview").start().await
189+
}
190+
180191
/// Get the host of the container.
181192
///
182193
/// This is the host that you can use to connect to the database. In most cases this will be `localhost`.

0 commit comments

Comments
 (0)