File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ impl Client {
219
219
/// use futures::StreamExt;
220
220
/// # use serde_json::json;
221
221
/// # 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();
223
223
/// let db_url = "http://localhost:3000/";
224
224
/// let api_token = "secrettoken";
225
225
/// # let db_url = container.get_base_url().await.unwrap();
Original file line number Diff line number Diff line change @@ -169,14 +169,25 @@ impl Container {
169
169
/// Shortcut method to start the container with default settings.
170
170
///
171
171
/// 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.
173
173
///
174
174
/// # Errors
175
175
/// This functions returns the errors of [`ContainerBuilder::start()`]
176
176
pub async fn start_default ( ) -> Result < Container , ContainerError > {
177
177
Self :: builder ( ) . start ( ) . await
178
178
}
179
179
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
+
180
191
/// Get the host of the container.
181
192
///
182
193
/// This is the host that you can use to connect to the database. In most cases this will be `localhost`.
You can’t perform that action at this time.
0 commit comments