Crate iceberg_test_utils

Source
Expand description

This crate contains common utilities for testing.

It’s not intended for use outside of iceberg-rust.

Macros§

normalize_test_name_with_parts
Macro to generate a normalized test name with module path prefix. Takes one or more string parts and joins them with the module path.

Constants§

DEFAULT_GCS_PORT
DEFAULT_GLUE_PORT
DEFAULT_HMS_PORT
DEFAULT_MINIO_PORT
DEFAULT_REST_CATALOG_PORT
ENV_GCS_ENDPOINT
ENV_GLUE_ENDPOINT
ENV_HMS_ENDPOINT
ENV_MINIO_ENDPOINT
ENV_REST_CATALOG_ENDPOINT

Functions§

cleanup_namespace
Helper to clean up a namespace and its tables before a test runs. This handles the case where previous test runs left data in the persistent database.
get_gcs_endpoint
Returns the GCS (fake-gcs-server) endpoint. Checks ICEBERG_TEST_GCS_ENDPOINT env var, otherwise returns localhost default.
get_glue_endpoint
Returns the Glue (Moto mock) endpoint. Checks ICEBERG_TEST_GLUE_ENDPOINT env var, otherwise returns localhost default.
get_hms_endpoint
Returns the HMS (Hive Metastore) endpoint. Checks ICEBERG_TEST_HMS_ENDPOINT env var, otherwise returns localhost default.
get_minio_endpoint
Returns the MinIO S3-compatible endpoint. Checks ICEBERG_TEST_MINIO_ENDPOINT env var, otherwise returns localhost default.
get_rest_catalog_endpoint
Returns the REST catalog endpoint. Checks ICEBERG_TEST_REST_ENDPOINT env var, otherwise returns localhost default.
normalize_test_name
set_up