Skip to main content

Crate s2_testcontainers

Crate s2_testcontainers 

Source
Expand description

§s2-testcontainers

Testcontainers helpers for the S2 Docker image, with a paved path for s2-lite integration tests.

See examples/s2_lite.rs for a complete example that starts s2-lite, builds an SDK client, and ensures a basin/stream.

For lower-level composition with testcontainers, use s2_image() for the raw S2 Docker image or s2_lite_image() for a container request with the lite subcommand configured:

use s2_testcontainers::{s2_config_for_endpoint, s2_image, s2_lite_image};

let image = s2_image();
let request = s2_lite_image();
let config = s2_config_for_endpoint("http://localhost:8080", "ignored").unwrap();

Structs§

S2Lite
Running s2-lite Testcontainers instance.

Enums§

Error
Errors from s2-testcontainers helpers.

Constants§

DEFAULT_ACCESS_TOKEN
Default access token used by S2Lite::client.
DEFAULT_TAG
Default S2 image tag.
IMAGE
Image repository for the S2 Docker image.
PORT
Port exposed by s2-lite.

Functions§

s2_config_for_endpoint
Build an S2Config wired to use an endpoint for both account and basin APIs.
s2_image
Return the default S2 Docker GenericImage.
s2_image_with_tag
Return an S2 Docker GenericImage with a specific tag.
s2_lite_image
Return the default S2 Docker ContainerRequest configured to run s2 lite.
s2_lite_image_with_tag
Return an S2 Docker ContainerRequest with a specific tag configured to run s2 lite.

Type Aliases§

Result
Result type for this crate.