diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-09-17 15:07:46 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2014-09-19 12:43:26 +0000 |
commit | dea5e91b2e7b109051bff68e15f8f55fe8c950bd (patch) | |
tree | 47bbdf8837ff4dd5c379687e99dc61dd95be79b0 /morphlib/cachekeycomputer_tests.py | |
parent | 27ad604d18f0440c1db714f8c22eda5f27bd4c13 (diff) | |
download | morph-dea5e91b2e7b109051bff68e15f8f55fe8c950bd.tar.gz |
FIXUP: Fix unit tests after changing to per-source builds
Diffstat (limited to 'morphlib/cachekeycomputer_tests.py')
-rw-r--r-- | morphlib/cachekeycomputer_tests.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/morphlib/cachekeycomputer_tests.py b/morphlib/cachekeycomputer_tests.py index fb5b1e28..55936f94 100644 --- a/morphlib/cachekeycomputer_tests.py +++ b/morphlib/cachekeycomputer_tests.py @@ -123,7 +123,7 @@ class CacheKeyComputerTests(unittest.TestCase): self.ckc._hash_tuple = inccount(self.ckc._hash_tuple, 'tuple') artifact = self._find_artifact('system-rootfs') - self.ckc.compute_key(artifact) + self.ckc.compute_key(artifact.source) self.assertNotEqual(runcount['thing'], 0) self.assertNotEqual(runcount['dict'], 0) @@ -136,13 +136,13 @@ class CacheKeyComputerTests(unittest.TestCase): def test_compute_twice_same_key(self): artifact = self._find_artifact('system-rootfs') - self.assertEqual(self.ckc.compute_key(artifact), - self.ckc.compute_key(artifact)) + self.assertEqual(self.ckc.compute_key(artifact.source), + self.ckc.compute_key(artifact.source)) def test_compute_twice_same_id(self): artifact = self._find_artifact('system-rootfs') - id1 = self.ckc.get_cache_id(artifact) - id2 = self.ckc.get_cache_id(artifact) + id1 = self.ckc.get_cache_id(artifact.source) + id2 = self.ckc.get_cache_id(artifact.source) hash1 = self.ckc._hash_id(id1) hash2 = self.ckc._hash_id(id2) self.assertEqual(hash1, hash2) @@ -150,13 +150,13 @@ class CacheKeyComputerTests(unittest.TestCase): def test_compute_key_returns_sha256(self): artifact = self._find_artifact('system-rootfs') self.assertTrue(self._valid_sha256( - self.ckc.compute_key(artifact))) + self.ckc.compute_key(artifact.source))) def test_different_env_gives_different_key(self): artifact = self._find_artifact('system-rootfs') - oldsha = self.ckc.compute_key(artifact) + oldsha = self.ckc.compute_key(artifact.source) build_env = copy.deepcopy(self.build_env) build_env.env["USER"] = "brian" ckc = morphlib.cachekeycomputer.CacheKeyComputer(build_env) - self.assertNotEqual(oldsha, ckc.compute_key(artifact)) + self.assertNotEqual(oldsha, ckc.compute_key(artifact.source)) |