diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 58630f1..5a2004f 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -4,4 +4,5 @@ * #103 Enabled SaaS connections for both the database and the BucketFS. * #105 Added the new configuration element - storage_backend. +* #108 Supplied the BucketFS service name when opening an on-prem bucketfs bucket. diff --git a/exasol/nb_connector/connections.py b/exasol/nb_connector/connections.py index 0301195..81c985f 100644 --- a/exasol/nb_connector/connections.py +++ b/exasol/nb_connector/connections.py @@ -244,7 +244,7 @@ def open_bucketfs_connection(conf: Secrets) -> bfs.BucketLike: } # Connect to the BucketFS service and navigate to the bucket of choice. - bucketfs = bfs.Service(buckfs_url, buckfs_credentials, verify) + bucketfs = bfs.Service(buckfs_url, buckfs_credentials, verify, conf.get(CKey.bfs_service)) return bucketfs[conf.get(CKey.bfs_bucket)] else: diff --git a/test/unit/test_connections.py b/test/unit/test_connections.py index 14bd7f8..3f70b86 100644 --- a/test/unit/test_connections.py +++ b/test/unit/test_connections.py @@ -47,6 +47,7 @@ def conf(mock_conf) -> Secrets: mock_conf.save(CKey.bfs_port, "6666") mock_conf.save(CKey.bfs_user, "buck_user") mock_conf.save(CKey.bfs_password, "buck_pwd") + mock_conf.save(CKey.bfs_service, "buck_svc") mock_conf.save(CKey.bfs_bucket, "my_bucket") return mock_conf @@ -192,7 +193,8 @@ def test_open_bucketfs_connection(mock_bfs_service, conf): "password": conf.get(CKey.bfs_password), } }, - False + False, + conf.get(CKey.bfs_service) ) @@ -208,7 +210,8 @@ def test_open_bucketfs_connection_https_no_verify(mock_bfs_service, conf): "password": conf.get(CKey.bfs_password), } }, - False + False, + conf.get(CKey.bfs_service) ) @@ -225,7 +228,8 @@ def test_open_bucketfs_connection_https_verify(mock_bfs_service, conf): "password": conf.get(CKey.bfs_password), } }, - True + True, + conf.get(CKey.bfs_service) ) @@ -244,7 +248,8 @@ def test_open_bucketfs_connection_trust_ca_file(mock_bfs_service, conf): "password": conf.get(CKey.bfs_password), } }, - tmp_file.name + tmp_file.name, + conf.get(CKey.bfs_service) )