kevinjqliu commented on code in PR #2482:
URL: https://github.com/apache/iceberg-python/pull/2482#discussion_r2371135386


##########
mkdocs/docs/contributing.md:
##########
@@ -155,6 +155,27 @@ make test-integration-rebuild
 
 To rebuild the containers from scratch.
 
+#### Running Integration Tests against REST Catalogs
+
+PyIceberg supports the ability to run our catalog tests against an arbitrary 
REST Catalog.
+

Review Comment:
   we should add that we neeed to set env var 
`PYICEBERG_TEST_CATALOG=test_catalog` 



##########
tests/integration/test_catalog.py:
##########
@@ -74,6 +75,16 @@ def rest_catalog() -> Generator[Catalog, None, None]:
     clean_up(test_catalog)
 
 
[email protected](scope="function")
+def test_catalog() -> Generator[Catalog, None, None]:
+    if test_catalog_name := os.environ.get("PYICEBERG_TEST_CATALOG"):
+        test_catalog = RestCatalog(test_catalog_name)

Review Comment:
   based on the docs above, i think we'd want to use `load_catalog` here which 
automatically look at both the env and `~/.pyiceberg.yaml`
   
   Specifically, based on the example above, its looking for a catalog named 
"test_catalog" 
   
   
https://github.com/apache/iceberg-python/blob/67c9b5088005cf7134c6a2940fbac7f98974f377/pyiceberg/catalog/__init__.py#L228-L275



##########
mkdocs/docs/contributing.md:
##########
@@ -155,6 +155,27 @@ make test-integration-rebuild
 
 To rebuild the containers from scratch.
 
+#### Running Integration Tests against REST Catalogs
+

Review Comment:
   we can make som potentially very destructive calls to the catalog.  nothing 
stops us from adding a test that will clear the entire catalog...
   
   Lets add a big warning sign here about that.   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to