mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
* fs: don't use repo for jobs/hash_jobs * fs: local: exists: use fsspec's LocalFileSystem * fs: make constructor comply with fsspec
23 lines
581 B
Python
23 lines
581 B
Python
from dvc.fs.oss import OSSFileSystem
|
|
|
|
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,
|
|
}
|
|
fs = OSSFileSystem(**config)
|
|
assert fs.path_info == url
|
|
assert fs.endpoint == endpoint
|
|
assert fs.key_id == key_id
|
|
assert fs.key_secret == key_secret
|