summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2017-06-08 11:32:56 -0700
committerJames E. Blair <jeblair@redhat.com>2017-06-08 11:38:22 -0700
commit16d96a02db7d00e102b37ef27d5d19d462bd892e (patch)
tree62bbec2c8bc3acb72bd09191e7b717b721e89192 /tests
parente64b0e4789269b93947b6b389d4e5eb2b7868df4 (diff)
downloadzuul-16d96a02db7d00e102b37ef27d5d19d462bd892e.tar.gz
Change node 'image' to 'label'
We are keeping the 'label' terminology in nodepool, and since that is actually what zuul asks for, use that terminology here to avoid confusion. Change-Id: I5f5f1cd041b6dbd80a75af66fe02520f3eb32151
Diffstat (limited to 'tests')
-rwxr-xr-xtests/base.py8
-rw-r--r--tests/fixtures/config/ansible/git/common-config/zuul.yaml2
-rw-r--r--tests/fixtures/config/inventory/git/common-config/zuul.yaml8
-rw-r--r--tests/fixtures/config/multi-tenant/git/common-config/zuul.yaml2
-rw-r--r--tests/fixtures/config/multi-tenant/git/tenant-one-config/zuul.yaml2
-rw-r--r--tests/fixtures/config/multi-tenant/git/tenant-two-config/zuul.yaml2
-rw-r--r--tests/fixtures/config/openstack/git/project-config/zuul.yaml4
-rw-r--r--tests/fixtures/config/single-tenant/git/common-config/zuul.yaml6
-rw-r--r--tests/fixtures/layouts/disable_at.yaml2
-rw-r--r--tests/fixtures/layouts/dont-ignore-ref-deletes.yaml2
-rw-r--r--tests/fixtures/layouts/idle.yaml4
-rw-r--r--tests/fixtures/layouts/no-timer.yaml4
-rw-r--r--tests/fixtures/layouts/repo-deleted.yaml4
-rw-r--r--tests/fixtures/layouts/smtp.yaml4
-rw-r--r--tests/fixtures/layouts/timer.yaml4
-rw-r--r--tests/unit/test_model.py10
-rwxr-xr-xtests/unit/test_scheduler.py4
-rw-r--r--tests/unit/test_v3.py6
18 files changed, 39 insertions, 39 deletions
diff --git a/tests/base.py b/tests/base.py
index d8f88b707..93a3a8644 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1098,14 +1098,14 @@ class FakeBuild(object):
self.jobdir = None
self.uuid = job.unique
self.parameters = json.loads(job.arguments)
- # TODOv3(jeblair): self.node is really "the image of the node
- # assigned". We should rename it (self.node_image?) if we
+ # TODOv3(jeblair): self.node is really "the label of the node
+ # assigned". We should rename it (self.node_label?) if we
# keep using it like this, or we may end up exposing more of
# the complexity around multi-node jobs here
- # (self.nodes[0].image?)
+ # (self.nodes[0].label?)
self.node = None
if len(self.parameters.get('nodes')) == 1:
- self.node = self.parameters['nodes'][0]['image']
+ self.node = self.parameters['nodes'][0]['label']
self.unique = self.parameters['ZUUL_UUID']
self.pipeline = self.parameters['ZUUL_PIPELINE']
self.project = self.parameters['ZUUL_PROJECT']
diff --git a/tests/fixtures/config/ansible/git/common-config/zuul.yaml b/tests/fixtures/config/ansible/git/common-config/zuul.yaml
index 02b87bdc0..b31c148a6 100644
--- a/tests/fixtures/config/ansible/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/ansible/git/common-config/zuul.yaml
@@ -71,7 +71,7 @@
name: check-vars
nodes:
- name: ubuntu-xenial
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: hello
diff --git a/tests/fixtures/config/inventory/git/common-config/zuul.yaml b/tests/fixtures/config/inventory/git/common-config/zuul.yaml
index 184bd8003..e147b9875 100644
--- a/tests/fixtures/config/inventory/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/inventory/git/common-config/zuul.yaml
@@ -16,11 +16,11 @@
name: nodeset1
nodes:
- name: controller
- image: controller-image
+ label: controller-label
- name: compute1
- image: compute-image
+ label: compute-label
- name: compute2
- image: compute-image
+ label: compute-label
groups:
- name: ceph-osd
nodes:
@@ -35,7 +35,7 @@
name: single-inventory
nodes:
- name: ubuntu-xenial
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: group-inventory
diff --git a/tests/fixtures/config/multi-tenant/git/common-config/zuul.yaml b/tests/fixtures/config/multi-tenant/git/common-config/zuul.yaml
index ec9c6dd53..362434e4f 100644
--- a/tests/fixtures/config/multi-tenant/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/multi-tenant/git/common-config/zuul.yaml
@@ -15,4 +15,4 @@
name: python27
nodes:
- name: controller
- image: ubuntu-trusty
+ label: ubuntu-trusty
diff --git a/tests/fixtures/config/multi-tenant/git/tenant-one-config/zuul.yaml b/tests/fixtures/config/multi-tenant/git/tenant-one-config/zuul.yaml
index 63a19e256..347bc53c5 100644
--- a/tests/fixtures/config/multi-tenant/git/tenant-one-config/zuul.yaml
+++ b/tests/fixtures/config/multi-tenant/git/tenant-one-config/zuul.yaml
@@ -23,7 +23,7 @@
name: nodeset1
nodes:
- name: controller
- image: controller-image
+ label: controller-label
- job:
name: project1-test1
diff --git a/tests/fixtures/config/multi-tenant/git/tenant-two-config/zuul.yaml b/tests/fixtures/config/multi-tenant/git/tenant-two-config/zuul.yaml
index 4feb9f5cc..5ea803e58 100644
--- a/tests/fixtures/config/multi-tenant/git/tenant-two-config/zuul.yaml
+++ b/tests/fixtures/config/multi-tenant/git/tenant-two-config/zuul.yaml
@@ -23,7 +23,7 @@
name: nodeset1
nodes:
- name: controller
- image: controller-image
+ label: controller-label
- job:
name: project2-test1
diff --git a/tests/fixtures/config/openstack/git/project-config/zuul.yaml b/tests/fixtures/config/openstack/git/project-config/zuul.yaml
index aff204615..2ad600cee 100644
--- a/tests/fixtures/config/openstack/git/project-config/zuul.yaml
+++ b/tests/fixtures/config/openstack/git/project-config/zuul.yaml
@@ -38,7 +38,7 @@
timeout: 30
nodes:
- name: controller
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: python27
@@ -50,7 +50,7 @@
branches: stable/mitaka
nodes:
- name: controller
- image: ubuntu-trusty
+ label: ubuntu-trusty
- job:
name: python35
diff --git a/tests/fixtures/config/single-tenant/git/common-config/zuul.yaml b/tests/fixtures/config/single-tenant/git/common-config/zuul.yaml
index 2bb61ee3c..27454d3d6 100644
--- a/tests/fixtures/config/single-tenant/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/single-tenant/git/common-config/zuul.yaml
@@ -49,20 +49,20 @@
attempts: 4
nodes:
- name: controller
- image: image1
+ label: label1
- job:
name: project-test1
branches: stable
nodes:
- name: controller
- image: image2
+ label: label2
- job:
name: project-post
nodes:
- name: static
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: project-test2
diff --git a/tests/fixtures/layouts/disable_at.yaml b/tests/fixtures/layouts/disable_at.yaml
index 2956ebf0a..8e352d805 100644
--- a/tests/fixtures/layouts/disable_at.yaml
+++ b/tests/fixtures/layouts/disable_at.yaml
@@ -19,7 +19,7 @@
name: project-test1
nodes:
- name: controller
- image: image1
+ label: label1
- project:
name: org/project
diff --git a/tests/fixtures/layouts/dont-ignore-ref-deletes.yaml b/tests/fixtures/layouts/dont-ignore-ref-deletes.yaml
index aee5ac62c..6a05fe60c 100644
--- a/tests/fixtures/layouts/dont-ignore-ref-deletes.yaml
+++ b/tests/fixtures/layouts/dont-ignore-ref-deletes.yaml
@@ -11,7 +11,7 @@
name: project-post
nodes:
- name: static
- image: ubuntu-xenial
+ label: ubuntu-xenial
- project:
name: org/project
diff --git a/tests/fixtures/layouts/idle.yaml b/tests/fixtures/layouts/idle.yaml
index ff3384274..60f8ed1fb 100644
--- a/tests/fixtures/layouts/idle.yaml
+++ b/tests/fixtures/layouts/idle.yaml
@@ -9,13 +9,13 @@
name: project-bitrot-stable-old
nodes:
- name: static
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: project-bitrot-stable-older
nodes:
- name: static
- image: ubuntu-trusty
+ label: ubuntu-trusty
- project:
name: org/project
diff --git a/tests/fixtures/layouts/no-timer.yaml b/tests/fixtures/layouts/no-timer.yaml
index c8ced6288..12eaa3538 100644
--- a/tests/fixtures/layouts/no-timer.yaml
+++ b/tests/fixtures/layouts/no-timer.yaml
@@ -27,13 +27,13 @@
name: project-bitrot-stable-old
nodes:
- name: static
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: project-bitrot-stable-older
nodes:
- name: static
- image: ubuntu-trusty
+ label: ubuntu-trusty
- project:
name: org/project
diff --git a/tests/fixtures/layouts/repo-deleted.yaml b/tests/fixtures/layouts/repo-deleted.yaml
index a33da7746..95d11bbdd 100644
--- a/tests/fixtures/layouts/repo-deleted.yaml
+++ b/tests/fixtures/layouts/repo-deleted.yaml
@@ -40,14 +40,14 @@
name: project-test1
nodes:
- name: controller
- image: image1
+ label: label1
- job:
name: project-test1
branches: stable
nodes:
- name: controller
- image: image2
+ label: label2
- job:
name: project-test2
diff --git a/tests/fixtures/layouts/smtp.yaml b/tests/fixtures/layouts/smtp.yaml
index 8f53d022d..fd91d36d6 100644
--- a/tests/fixtures/layouts/smtp.yaml
+++ b/tests/fixtures/layouts/smtp.yaml
@@ -46,14 +46,14 @@
name: project-test1
nodes:
- name: controller
- image: image1
+ label: label1
- job:
name: project-test1
branches: stable
nodes:
- name: controller
- image: image2
+ label: label2
- job:
name: project-test2
diff --git a/tests/fixtures/layouts/timer.yaml b/tests/fixtures/layouts/timer.yaml
index 95199e7c6..883c32e63 100644
--- a/tests/fixtures/layouts/timer.yaml
+++ b/tests/fixtures/layouts/timer.yaml
@@ -28,13 +28,13 @@
name: project-bitrot-stable-old
nodes:
- name: static
- image: ubuntu-xenial
+ label: ubuntu-xenial
- job:
name: project-bitrot-stable-older
nodes:
- name: static
- image: ubuntu-trusty
+ label: ubuntu-trusty
- project:
name: org/project
diff --git a/tests/unit/test_model.py b/tests/unit/test_model.py
index e7e53c4d5..7a4d53e44 100644
--- a/tests/unit/test_model.py
+++ b/tests/unit/test_model.py
@@ -186,7 +186,7 @@ class TestJob(BaseTestCase):
'post-run': 'base-post',
'nodes': [{
'name': 'controller',
- 'image': 'base',
+ 'label': 'base',
}],
})
layout.addJob(base)
@@ -199,7 +199,7 @@ class TestJob(BaseTestCase):
'post-run': 'py27-post',
'nodes': [{
'name': 'controller',
- 'image': 'new',
+ 'label': 'new',
}],
'timeout': 40,
})
@@ -216,7 +216,7 @@ class TestJob(BaseTestCase):
'post-run': 'py27-diablo-post',
'nodes': [{
'name': 'controller',
- 'image': 'old',
+ 'label': 'old',
}],
'timeout': 50,
})
@@ -264,7 +264,7 @@ class TestJob(BaseTestCase):
self.assertEqual(job.timeout, 40)
nodes = job.nodeset.getNodes()
self.assertEqual(len(nodes), 1)
- self.assertEqual(nodes[0].image, 'new')
+ self.assertEqual(nodes[0].label, 'new')
self.assertEqual([x.path for x in job.pre_run],
['playbooks/base-pre',
'playbooks/py27-pre'])
@@ -292,7 +292,7 @@ class TestJob(BaseTestCase):
self.assertEqual(job.timeout, 50)
nodes = job.nodeset.getNodes()
self.assertEqual(len(nodes), 1)
- self.assertEqual(nodes[0].image, 'old')
+ self.assertEqual(nodes[0].label, 'old')
self.assertEqual([x.path for x in job.pre_run],
['playbooks/base-pre',
'playbooks/py27-pre',
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 0ac42c177..d420042b2 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -59,7 +59,7 @@ class TestScheduler(ZuulTestCase):
self.assertEqual(A.data['status'], 'MERGED')
self.assertEqual(A.reported, 2)
self.assertEqual(self.getJobFromHistory('project-test1').node,
- 'image1')
+ 'label1')
self.assertIsNone(self.getJobFromHistory('project-test2').node)
# TODOv3(jeblair): we may want to report stats by tenant (also?).
@@ -109,7 +109,7 @@ class TestScheduler(ZuulTestCase):
self.assertIn('gate', A.messages[1],
"A should transit gate")
self.assertEqual(self.getJobFromHistory('project-test1').node,
- 'image2')
+ 'label2')
def test_parallel_changes(self):
"Test that changes are tested in parallel and merged in series"
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index d15189d35..0763dd075 100644
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -375,9 +375,9 @@ class TestInRepoConfig(ZuulTestCase):
name: duplicate
nodes:
- name: compute
- image: foo
+ label: foo
- name: compute
- image: foo
+ label: foo
""")
file_dict = {'.zuul.yaml': in_repo_conf}
@@ -400,7 +400,7 @@ class TestInRepoConfig(ZuulTestCase):
name: duplicate
nodes:
- name: compute
- image: foo
+ label: foo
groups:
- name: group
nodes: compute