summaryrefslogtreecommitdiff
path: root/morphlib/cachekeycomputer_tests.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-07-03 17:04:09 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-07-03 17:04:52 +0000
commit6b0703a908e82dddd6c1a0cc8a944ba46ad96657 (patch)
tree3bc60dd092508278114078f75997c9d9c6f42769 /morphlib/cachekeycomputer_tests.py
parent1eff90528732e9c6ffbad03ca30adecbf11f87f7 (diff)
downloadmorph-6b0703a908e82dddd6c1a0cc8a944ba46ad96657.tar.gz
tests: fix up for change in artifact name
This fixes references to a system artifact without the -rootfs appended and adds a unit test for resolving an arm system artifact.
Diffstat (limited to 'morphlib/cachekeycomputer_tests.py')
-rw-r--r--morphlib/cachekeycomputer_tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/cachekeycomputer_tests.py b/morphlib/cachekeycomputer_tests.py
index 807fbe89..82d3e6e5 100644
--- a/morphlib/cachekeycomputer_tests.py
+++ b/morphlib/cachekeycomputer_tests.py
@@ -117,7 +117,7 @@ class CacheKeyComputerTests(unittest.TestCase):
self.ckc._hash_list = inccount(self.ckc._hash_list, 'list')
self.ckc._hash_tuple = inccount(self.ckc._hash_tuple, 'tuple')
- artifact = self._find_artifact('system')
+ artifact = self._find_artifact('system-rootfs')
self.ckc.compute_key(artifact)
self.assertNotEqual(runcount['thing'], 0)
@@ -130,12 +130,12 @@ class CacheKeyComputerTests(unittest.TestCase):
return len(s) == 64 and all([c in validchars for c in s])
def test_compute_key_returns_sha256(self):
- artifact = self._find_artifact('system')
+ artifact = self._find_artifact('system-rootfs')
self.assertTrue(self._valid_sha256(
self.ckc.compute_key(artifact)))
def test_different_env_gives_different_key(self):
- artifact = self._find_artifact('system')
+ artifact = self._find_artifact('system-rootfs')
oldsha = self.ckc.compute_key(artifact)
build_env = DummyBuildEnvironment({
"USER": "foouser",
@@ -150,7 +150,7 @@ class CacheKeyComputerTests(unittest.TestCase):
self.assertNotEqual(oldsha, ckc.compute_key(artifact))
def test_same_morphology_text_but_changed_sha1_gives_same_cache_key(self):
- old_artifact = self._find_artifact('system')
+ old_artifact = self._find_artifact('system-rootfs')
morphology = old_artifact.source.morphology
new_source = morphlib.source.Source('repo', 'original/ref', 'newsha',
morphology,