summaryrefslogtreecommitdiff
path: root/morphlib/artifactresolver_tests.py
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-04-16 19:11:23 +0100
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-04-16 19:11:23 +0100
commit84e51a23a2ed2b9aeac03fc8f08050ecfc56ab4d (patch)
treeceecf3ca405c9007df7b8857d499cae595f6aa34 /morphlib/artifactresolver_tests.py
parentd2d2007a322c8187f20ac8c1a0ee6fcb3bd9bc24 (diff)
downloadmorph-84e51a23a2ed2b9aeac03fc8f08050ecfc56ab4d.tar.gz
Remove buggy cyclic dependency chain check from ArtifactResolver.
However, leave a TODO note that we really want this in the source.
Diffstat (limited to 'morphlib/artifactresolver_tests.py')
-rw-r--r--morphlib/artifactresolver_tests.py67
1 files changed, 1 insertions, 66 deletions
diff --git a/morphlib/artifactresolver_tests.py b/morphlib/artifactresolver_tests.py
index 68a2c886..d77ff5bb 100644
--- a/morphlib/artifactresolver_tests.py
+++ b/morphlib/artifactresolver_tests.py
@@ -41,7 +41,7 @@ class FakeChunkMorphology(morphlib.morph2.Morphology):
{
"name": "%s",
"kind": "chunk",
- "artifacts": %s
+ "chunks": %s
}
''' % (name, json.dumps(artifacts)))
else:
@@ -699,71 +699,6 @@ class ArtifactResolverTests(unittest.TestCase):
self.assertEqual(artifacts[1].dependencies, [])
self.assertEqual(artifacts[1].dependents, [artifacts[0]])
- def test_detection_of_cyclic_chunk_dependency_chain(self):
- pool = morphlib.sourcepool.SourcePool()
-
- morph = morphlib.morph2.Morphology(
- '''
- {
- "name": "stratum1",
- "kind": "stratum",
- "sources": [
- {
- "name": "chunk1",
- "repo": "repo",
- "ref": "original/ref"
- },
- {
- "name": "chunk2",
- "repo": "repo",
- "ref": "original/ref",
- "build-depends": [
- "chunk1"
- ]
- },
- {
- "name": "chunk3",
- "repo": "repo",
- "ref": "original/ref",
- "build-depends": [
- "chunk2"
- ]
- }
- ]
- }
- ''')
- stratum1 = morphlib.source.Source(
- 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph')
- pool.add(stratum1)
-
- morph = FakeStratumMorphology(
- 'stratum2', [
- ('chunk3', 'chunk3', 'repo', 'original/ref'),
- ('chunk1', 'chunk1', 'repo', 'original/ref')
- ], ['stratum1'])
- stratum2 = morphlib.source.Source(
- 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph')
- pool.add(stratum2)
-
- morph = FakeChunkMorphology('chunk1')
- chunk1 = morphlib.source.Source(
- 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph')
- pool.add(chunk1)
-
- morph = FakeChunkMorphology('chunk2')
- chunk2 = morphlib.source.Source(
- 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph')
- pool.add(chunk2)
-
- morph = FakeChunkMorphology('chunk3')
- chunk3 = morphlib.source.Source(
- 'repo', 'original/ref', 'sha1', morph, 'chunk3.morph')
- pool.add(chunk3)
-
- self.assertRaises(
- morphlib.artifactresolver.CyclicDependencyChainError,
- self.resolver.resolve_artifacts, pool)
-
def test_detection_of_chunk_dependencies_in_invalid_order(self):
pool = morphlib.sourcepool.SourcePool()