Skip to content
Merged
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
17 changes: 17 additions & 0 deletions tests/unit/remote/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,20 @@ def test_walk_files(remote):
]

assert list(remote.walk_files(remote.path_info / "data")) == files


def test_copy_preserve_etag_across_buckets(remote):
s3 = remote.s3
s3.create_bucket(Bucket="another")

another = RemoteS3(None, {"url": "s3://another", "region": "us-east-1"})

from_info = remote.path_info / "foo"
to_info = another.path_info / "foo"

remote.copy(from_info, to_info)

from_etag = RemoteS3.get_etag(s3, "bucket", "foo")
to_etag = RemoteS3.get_etag(s3, "another", "foo")

assert from_etag == to_etag