A Testcontainers module for running Oxia in integration tests.
pip install testcontainers-oxiafrom oxia_testcontainer import OxiaContainer
with OxiaContainer() as container:
address = container.get_service_address()
print(f"Oxia is running at {address}")
# Use the Oxia CLI inside the container
exit_code, output = container.exec(
["oxia", "client", "put", "hello", "world"]
)| Parameter | Default | Description |
|---|---|---|
image |
oxia/oxia:latest |
Docker image to use |
log_level |
info |
Oxia log level |
shards |
1 |
Number of shards |
get_service_address()- Returnshost:portfor the Oxia service (port 6648)get_internal_address()- Returnshost:portfor the internal port (port 6649)get_metrics_url()- Returns the full URL for the metrics endpoint (port 8080)
pip install -e . && pip install pytest
pytest tests/Apache License 2.0