diff --git a/dvc/output.py b/dvc/output.py index 07be26acc..ff0c50a55 100644 --- a/dvc/output.py +++ b/dvc/output.py @@ -45,18 +45,24 @@ CHECKSUM_SCHEMA = Any( And(Any(str, And(int, Coerce(str))), Length(min=3), Lower), ) +CASE_SENSITIVE_CHECKSUM_SCHEMA = Any( + None, + And(str, Length(max=0), SetTo(None)), + And(Any(str, And(int, Coerce(str))), Length(min=3)), +) + # NOTE: currently there are only 3 possible checksum names: # # 1) md5 (LOCAL, SSH); -# 2) etag (S3); +# 2) etag (S3, GS, OSS, AZURE, HTTP); # 3) checksum (HDFS); # # so when a few types of outputs share the same name, we only need # specify it once. CHECKSUMS_SCHEMA = { LocalFileSystem.PARAM_CHECKSUM: CHECKSUM_SCHEMA, - S3FileSystem.PARAM_CHECKSUM: CHECKSUM_SCHEMA, HDFSFileSystem.PARAM_CHECKSUM: CHECKSUM_SCHEMA, + S3FileSystem.PARAM_CHECKSUM: CASE_SENSITIVE_CHECKSUM_SCHEMA, } diff --git a/tests/func/test_import_url.py b/tests/func/test_import_url.py index b222ae18f..01ddd172b 100644 --- a/tests/func/test_import_url.py +++ b/tests/func/test_import_url.py @@ -123,6 +123,7 @@ def test_import_url_with_no_exec(tmp_dir, dvc, erepo_dir): [ pytest.lazy_fixture("local_cloud"), pytest.lazy_fixture("s3"), + pytest.lazy_fixture("azure"), pytest.param( pytest.lazy_fixture("gs"), marks=pytest.mark.needs_internet ),