summaryrefslogtreecommitdiff
path: root/morphlib/stagingarea_tests.py
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-02-04 09:39:38 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-02-06 12:55:17 +0000
commit1701ee47ee9261ce52d8509f1fff1ad8a4e3134b (patch)
tree188005716d21e8f5729079fc1940d1041865a4a3 /morphlib/stagingarea_tests.py
parent2a2b15bf3b8e471ce8b2e61f49f2ad3b8879ef93 (diff)
downloadmorph-1701ee47ee9261ce52d8509f1fff1ad8a4e3134b.tar.gz
Use overlayfs when building systems
This will allow us to cache systems as a list of chunks and a small filesystem delta, rather than a massive tarball.
Diffstat (limited to 'morphlib/stagingarea_tests.py')
-rw-r--r--morphlib/stagingarea_tests.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/morphlib/stagingarea_tests.py b/morphlib/stagingarea_tests.py
index dc43e4f6..f64cf2d4 100644
--- a/morphlib/stagingarea_tests.py
+++ b/morphlib/stagingarea_tests.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2014 Codethink Limited
+# Copyright (C) 2012-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -119,6 +119,20 @@ class StagingAreaTests(unittest.TestCase):
self.assertEqual(self.created_dirs, [dirname])
self.assertTrue(dirname.startswith(self.staging))
+ def test_creates_overlay_upper_directory(self):
+ source = FakeSource()
+ self.sa._mkdir = self.fake_mkdir
+ dirname = self.sa.overlay_upperdir(source)
+ self.assertEqual(self.created_dirs, [dirname])
+ self.assertTrue(dirname.startswith(self.staging))
+
+ def test_creates_overlay_directory(self):
+ source = FakeSource()
+ self.sa._mkdir = self.fake_mkdir
+ dirname = self.sa.overlaydir(source)
+ self.assertEqual(self.created_dirs, [dirname])
+ self.assertTrue(dirname.startswith(self.staging))
+
def test_makes_relative_name(self):
filename = os.path.join(self.staging, 'foobar')
self.assertEqual(self.sa.relative(filename), '/foobar')