Merge "Remove auto-add of localhost from unit test inventory"
This commit is contained in:
commit
afc0d62308
|
@ -1907,12 +1907,6 @@ class RecordingAnsibleJob(zuul.executor.server.AnsibleJob):
|
|||
for host in hosts:
|
||||
if not host['host_vars'].get('ansible_connection'):
|
||||
host['host_vars']['ansible_connection'] = 'local'
|
||||
|
||||
if not hosts:
|
||||
hosts.append(dict(
|
||||
name='localhost',
|
||||
host_vars=dict(ansible_connection='local'),
|
||||
host_keys=[]))
|
||||
return hosts
|
||||
|
||||
def pause(self):
|
||||
|
|
|
@ -81,6 +81,10 @@
|
|||
vars:
|
||||
base_var: 'base_var'
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
name: base-urls
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
name: python27
|
||||
|
|
|
@ -15,3 +15,7 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
parent: base
|
||||
|
|
|
@ -15,3 +15,7 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
|
|
@ -15,3 +15,7 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
|
|
@ -15,3 +15,7 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
name: python27
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
name: python27
|
||||
|
|
|
@ -36,3 +36,7 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
parent: base
|
||||
|
|
|
@ -36,3 +36,7 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
|
|
@ -63,6 +63,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
name: project-merge
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
- job:
|
||||
name: base
|
||||
parent: null
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: test_node
|
||||
label: test_label
|
||||
|
||||
- job:
|
||||
name: python27
|
||||
|
|
|
@ -4925,15 +4925,15 @@ class TestJobOutput(AnsibleZuulTestCase):
|
|||
'work/logs/job-output.json'))
|
||||
self.assertEqual(token,
|
||||
j[0]['plays'][0]['tasks'][0]
|
||||
['hosts']['localhost']['stdout'])
|
||||
['hosts']['test_node']['stdout'])
|
||||
self.assertTrue(j[0]['plays'][0]['tasks'][1]
|
||||
['hosts']['localhost']['skipped'])
|
||||
['hosts']['test_node']['skipped'])
|
||||
self.assertTrue(j[0]['plays'][0]['tasks'][2]
|
||||
['hosts']['localhost']['failed'])
|
||||
['hosts']['test_node']['failed'])
|
||||
self.assertEqual(
|
||||
"This is a handler",
|
||||
j[0]['plays'][0]['tasks'][3]
|
||||
['hosts']['localhost']['stdout'])
|
||||
['hosts']['test_node']['stdout'])
|
||||
|
||||
self.log.info(self._get_file(self.history[0],
|
||||
'work/logs/job-output.txt'))
|
||||
|
@ -4983,7 +4983,7 @@ class TestJobOutput(AnsibleZuulTestCase):
|
|||
'work/logs/job-output.json'))
|
||||
self.assertEqual(token,
|
||||
j[0]['plays'][0]['tasks'][0]
|
||||
['hosts']['localhost']['stdout'])
|
||||
['hosts']['test_node']['stdout'])
|
||||
|
||||
self.log.info(self._get_file(self.history[0],
|
||||
'work/logs/job-output.json'))
|
||||
|
|
Loading…
Reference in New Issue