diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_v3.py | 63 |
1 files changed, 52 insertions, 11 deletions
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py index 08155e2d8..a0b7e678b 100644 --- a/tests/unit/test_v3.py +++ b/tests/unit/test_v3.py @@ -5022,7 +5022,11 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', A, {'zuul': {'artifacts': [ - {'name': 'image', 'url': 'http://example.com/image'}, + {'name': 'image', + 'url': 'http://example.com/image', + 'metadata': { + 'type': 'container_image' + }}, ]}} ) A.addApproval('Code-Review', 2) @@ -5059,7 +5063,8 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', A, {'zuul': {'artifacts': [ - {'name': 'image', 'url': 'http://example.com/image'}, + {'name': 'image', 'url': 'http://example.com/image', + 'metadata': {'type': 'container_image'}}, ]}} ) A.addApproval('Code-Review', 2) @@ -5101,6 +5106,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'image-builder', 'url': 'http://example.com/image', 'name': 'image', + 'metadata': { + 'type': 'container_image', + } }]) @simple_layout('layouts/provides-requires-unshared.yaml') @@ -5111,7 +5119,8 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', A, {'zuul': {'artifacts': [ - {'name': 'image', 'url': 'http://example.com/image'}, + {'name': 'image', 'url': 'http://example.com/image', + 'metadata': {'type': 'container_image'}}, ]}} ) A.addApproval('Code-Review', 2) @@ -5156,14 +5165,16 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', A, {'zuul': {'artifacts': [ - {'name': 'image', 'url': 'http://example.com/image'}, + {'name': 'image', 'url': 'http://example.com/image', + 'metadata': {'type': 'container_image'}}, ]}} ) self.executor_server.returnData( 'library-builder', A, {'zuul': {'artifacts': [ - {'name': 'library', 'url': 'http://example.com/library'}, + {'name': 'library', 'url': 'http://example.com/library', + 'metadata': {'type': 'library_object'}}, ]}} ) self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1)) @@ -5178,14 +5189,16 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', B, {'zuul': {'artifacts': [ - {'name': 'image2', 'url': 'http://example.com/image2'}, + {'name': 'image2', 'url': 'http://example.com/image2', + 'metadata': {'type': 'container_image'}}, ]}} ) self.executor_server.returnData( 'library-builder', B, {'zuul': {'artifacts': [ - {'name': 'library2', 'url': 'http://example.com/library2'}, + {'name': 'library2', 'url': 'http://example.com/library2', + 'metadata': {'type': 'library_object'}}, ]}} ) self.fake_gerrit.addEvent(B.getPatchsetCreatedEvent(1)) @@ -5230,6 +5243,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'image-builder', 'url': 'http://example.com/image', 'name': 'image', + 'metadata': { + 'type': 'container_image', + } }, { 'project': 'org/project1', 'change': '2', @@ -5237,6 +5253,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'image-builder', 'url': 'http://example.com/image2', 'name': 'image2', + 'metadata': { + 'type': 'container_image', + } }]) library_user = self.getJobFromHistory('library-user') self.assertEqual( @@ -5248,6 +5267,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'library-builder', 'url': 'http://example.com/library', 'name': 'library', + 'metadata': { + 'type': 'library_object', + } }, { 'project': 'org/project1', 'change': '2', @@ -5255,6 +5277,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'library-builder', 'url': 'http://example.com/library2', 'name': 'library2', + 'metadata': { + 'type': 'library_object', + } }]) @simple_layout('layouts/provides-requires.yaml') @@ -5264,14 +5289,16 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', A, {'zuul': {'artifacts': [ - {'name': 'image', 'url': 'http://example.com/image'}, + {'name': 'image', 'url': 'http://example.com/image', + 'metadata': {'type': 'container_image'}}, ]}} ) self.executor_server.returnData( 'library-builder', A, {'zuul': {'artifacts': [ - {'name': 'library', 'url': 'http://example.com/library'}, + {'name': 'library', 'url': 'http://example.com/library', + 'metadata': {'type': 'library_object'}}, ]}} ) self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1)) @@ -5289,14 +5316,16 @@ class TestProvidesRequires(ZuulDBTestCase): 'image-builder', B, {'zuul': {'artifacts': [ - {'name': 'image2', 'url': 'http://example.com/image2'}, + {'name': 'image2', 'url': 'http://example.com/image2', + 'metadata': {'type': 'container_image'}}, ]}} ) self.executor_server.returnData( 'library-builder', B, {'zuul': {'artifacts': [ - {'name': 'library2', 'url': 'http://example.com/library2'}, + {'name': 'library2', 'url': 'http://example.com/library2', + 'metadata': {'type': 'library_object'}}, ]}} ) self.fake_gerrit.addEvent(B.getPatchsetCreatedEvent(1)) @@ -5338,6 +5367,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'image-builder', 'url': 'http://example.com/image', 'name': 'image', + 'metadata': { + 'type': 'container_image', + } }, { 'project': 'org/project1', 'change': '2', @@ -5345,6 +5377,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'image-builder', 'url': 'http://example.com/image2', 'name': 'image2', + 'metadata': { + 'type': 'container_image', + } }]) library_user = self.getJobFromHistory('library-user') self.assertEqual( @@ -5356,6 +5391,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'library-builder', 'url': 'http://example.com/library', 'name': 'library', + 'metadata': { + 'type': 'library_object', + } }, { 'project': 'org/project1', 'change': '2', @@ -5363,6 +5401,9 @@ class TestProvidesRequires(ZuulDBTestCase): 'job': 'library-builder', 'url': 'http://example.com/library2', 'name': 'library2', + 'metadata': { + 'type': 'library_object', + } }]) @simple_layout('layouts/provides-requires.yaml') |