summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-10-05 13:59:34 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-10-05 13:59:34 +0100
commit7cf28a8d62c163774064951358cff7ea0215c069 (patch)
treec3b983d3316f1f1bfc1e87d405f0b8358bb194b6
parent99f6e97c326aee025ac3f71f1c56f36eff71442b (diff)
downloadbuildstream-7cf28a8d62c163774064951358cff7ea0215c069.tar.gz
virtual_directory_import.py: Check import via a file-based directory
-rw-r--r--tests/storage/virtual_directory_import.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/storage/virtual_directory_import.py b/tests/storage/virtual_directory_import.py
index 2e5163c01..1c78c1bb4 100644
--- a/tests/storage/virtual_directory_import.py
+++ b/tests/storage/virtual_directory_import.py
@@ -174,6 +174,12 @@ def test_cas_import(cli, tmpdir, original, overlay):
# Note that isdir accepts symlinks to dirs, so a symlink to a dir is acceptable.
assert os.path.isdir(realpath)
+ # Now do the same thing with filebaseddirectories and check the contents match
+ d3 = create_new_casdir(original, fake_context, tmpdir)
+ d4 = create_new_filedir(overlay, tmpdir)
+ d3.import_files(d2)
+ assert d.ref.hash == d3.ref.hash
+
@pytest.mark.parametrize("root", [1, 2, 3, 4, 5, 6])
def test_directory_listing(cli, tmpdir, root):