Skip to content

Commit 2e20187

Browse files
committed
address PR comments
1 parent 64c24a7 commit 2e20187

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

mkdocs/docs/contributing.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ make test-integration-rebuild
155155

156156
To rebuild the containers from scratch.
157157

158+
#### Running Integration Tests against REST Catalogs
159+
160+
PyIceberg supports the ability to run our catalog tests against an arbitrary REST Catalog.
161+
162+
To do so, run the catalog integration tests with the `PYICEBERG_REST_CATALOG_PROPERTIES` environment variable.
163+
164+
```sh
165+
PYICEBERG_REST_CATALOG_PROPERTIES='{"uri": "http://localhost:8181"}' poetry run pytest tests/integration/
166+
```
167+
168+
`PYICEBERG_REST_CATALOG_PROPERTIES` should be a JSON-encoded string that contains any [catalog properties](https://py.iceberg.apache.org/configuration/#rest-catalog) necessary to interact with your REST Catalog implementation.
169+
158170
## Code standards
159171

160172
Below are the formalized conventions that we adhere to in the PyIceberg project. The goal of this is to have a common agreement on how to evolve the codebase, but also using it as guidelines for newcomers to the project.

tests/integration/test_catalog.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def rest_catalog() -> Generator[Catalog, None, None]:
7878

7979
@pytest.fixture(scope="function")
8080
def rest_catalog_env() -> Generator[Catalog, None, None]:
81-
properties_json = os.environ.get("PYICEBERG_REST_CATALOG_PROPERTIES")
82-
if properties_json:
81+
if properties_json := os.environ.get("PYICEBERG_REST_CATALOG_PROPERTIES"):
8382
properties = json.loads(properties_json)
8483
test_catalog = RestCatalog(
8584
"rest_env",

0 commit comments

Comments
 (0)