Add a leading slash to path in test to make it consistent with odb.path. The path_to_oid was raising error because, self.path uses to be in the format of /baea92ba-aed5-4473-bfb8-318ca73b0278/files/md5, which when split turns into 4-tuple:
whereas the actual paths did not have leading slashes, as an example baea92ba-aed5-4473-bfb8-318ca73b0278/files/md5/00/14ffd92a6cbf5f2f657067df0d5881a6 which turns into 5-tuple,
Add a leading slash to path in test to make it consistent with
odb.path
. Thepath_to_oid
was raising error because,self.path
uses to be in the format of/baea92ba-aed5-4473-bfb8-318ca73b0278/files/md5
, which when split turns into 4-tuple:whereas the actual paths did not have leading slashes, as an example
baea92ba-aed5-4473-bfb8-318ca73b0278/files/md5/00/14ffd92a6cbf5f2f657067df0d5881a6
which turns into 5-tuple,and the relative parts will just be last value, which is not a valid
oid
, and the test would fail.See https://github.com/iterative/dvc-hdfs/actions/runs/5950643602/job/16139617183#step:6:136
Traceback
```python =================================== FAILURES =================================== ________________________ TestRemote.test_pull_00_prefix ________________________ [gw0] linux -- Python 3.8.17 /opt/hostedtoolcache/Python/3.8.17/x64/bin/python self =