summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-17 16:12:20 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-19 16:16:28 +0100
commit14bcd4317dde8625aea11ca7c89e1984b93354bc (patch)
tree109b7abf63a9404b3a9f162d98a8bbd0b00f67e4
parentb2b427a1a08a2096b401faccb755250ae4cabb08 (diff)
downloadbuildstream-14bcd4317dde8625aea11ca7c89e1984b93354bc.tar.gz
import_cas.py: Parametrize to allow different overlay combinations
-rw-r--r--tests/storage/import_cas.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/storage/import_cas.py b/tests/storage/import_cas.py
index 176e01914..f102b22b4 100644
--- a/tests/storage/import_cas.py
+++ b/tests/storage/import_cas.py
@@ -65,15 +65,16 @@ def create_new_vdir(root_number, fake_context, tmpdir):
return d
-def test_cas_import(cli, tmpdir):
+@pytest.mark.parametrize("roots", [(1, 2), (2, 1)])
+def test_cas_import(cli, tmpdir, roots):
fake_context = FakeContext()
fake_context.artifactdir = tmpdir
# Create some fake content
generate_import_roots(tmpdir)
- overlay = 2
+ (original, overlay) = roots
- d = create_new_vdir(1, fake_context, tmpdir)
+ d = create_new_vdir(original, fake_context, tmpdir)
d2 = create_new_vdir(overlay, fake_context, tmpdir)
d.import_files(d2)
d.export_files(os.path.join(tmpdir, "output"))