X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/19ae770973482257117fe8ded5619c3018c4b60f..2ac65228ff6b32921e6c8194b6c51ce9a710f385:/services/fuse/tests/test_tmp_collection.py diff --git a/services/fuse/tests/test_tmp_collection.py b/services/fuse/tests/test_tmp_collection.py index 60eba1bf85..b8e064615b 100644 --- a/services/fuse/tests/test_tmp_collection.py +++ b/services/fuse/tests/test_tmp_collection.py @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + import arvados import arvados_fuse import arvados_fuse.command @@ -122,3 +126,16 @@ class TmpCollectionTest(IntegrationTest): with open(path, 'w') as f: f.write(content) self.assertRegexpMatches(current_manifest(tmpdir), expect) + + @IntegrationTest.mount(argv=mnt_args) + def test_tmp_rewrite(self): + self.pool_test(os.path.join(self.mnt, 'zzz')) + @staticmethod + def _test_tmp_rewrite(self, tmpdir): + with open(os.path.join(tmpdir, "b1"), 'w') as f: + f.write("b1") + with open(os.path.join(tmpdir, "b2"), 'w') as f: + f.write("b2") + with open(os.path.join(tmpdir, "b1"), 'w') as f: + f.write("1b") + self.assertRegexpMatches(current_manifest(tmpdir), "^\. ed4f3f67c70b02b29c50ce1ea26666bd\+4(\+\S+)? 0:2:b1 2:2:b2\n$")