Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#108 Supplied the bucketfs service name to the bfs Service constructor. #109

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

2 changes: 1 addition & 1 deletion exasol/nb_connector/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 9 additions & 4 deletions test/unit/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
)


Expand All @@ -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)
)


Expand All @@ -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)
)


Expand All @@ -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)
)


Expand Down
Loading