mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-04 15:28:27 +01:00
* dvc: get rid of is_walking_tree No longer needed. Some applications of `isinstance()` will be refactored in the future, as trees will just provide the needed functionality. * dvc: move GitTree to dvc/tree/ * dvc: rename *RemoteTree to *Tree
23 lines
584 B
Python
23 lines
584 B
Python
from dvc.tree.oss import OSSTree
|
|
|
|
bucket_name = "bucket-name"
|
|
endpoint = "endpoint"
|
|
key_id = "Fq2UVErCz4I6tq"
|
|
key_secret = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsu"
|
|
|
|
|
|
def test_init(dvc):
|
|
prefix = "some/prefix"
|
|
url = f"oss://{bucket_name}/{prefix}"
|
|
config = {
|
|
"url": url,
|
|
"oss_key_id": key_id,
|
|
"oss_key_secret": key_secret,
|
|
"oss_endpoint": endpoint,
|
|
}
|
|
tree = OSSTree(dvc, config)
|
|
assert tree.path_info == url
|
|
assert tree.endpoint == endpoint
|
|
assert tree.key_id == key_id
|
|
assert tree.key_secret == key_secret
|