diff --git a/python/tests/test_storage_connector.py b/python/tests/test_storage_connector.py index 5dc96a546..a1f7e77c3 100644 --- a/python/tests/test_storage_connector.py +++ b/python/tests/test_storage_connector.py @@ -113,9 +113,21 @@ def test_default_path(self, mocker): ) sc.read(data_format="csv") # assert - assert "" == mock_engine_read.call_args[0][3] + assert "s3://test-bucket" in mock_engine_read.call_args[0][3] def test_get_path(self, mocker): + mocker.patch("hsfs.engine.get_instance", return_value=spark.Engine()) + sc = storage_connector.S3Connector( + id=1, name="test_connector", featurestore_id=1, bucket="test-bucket" + ) + + # act + result = sc._get_path("some/location") + + # assert + assert "s3://test-bucket/some/location" == result + + def test_get_path_storage_connector_with_path(self, mocker): mocker.patch("hsfs.engine.get_instance", return_value=spark.Engine()) sc = storage_connector.S3Connector( id=1, name="test_connector", featurestore_id=1, bucket="test-bucket", path="abc/def"