Re-enable test_stuck_job_cleanup
We have to add playbooks that weren't there before in
commitLayoutUpdate so that we can add jobs in a layout update.
Change-Id: Ieeef822bd084647e99f331a7e94314a53231ee80
Story: 2000773
Task: 3555
diff --git a/tests/base.py b/tests/base.py
index 2729233..cef3eba 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1874,11 +1874,18 @@
def commitLayoutUpdate(self, orig_name, source_name):
source_path = os.path.join(self.test_root, 'upstream',
- source_name, 'zuul.yaml')
- with open(source_path, 'r') as nt:
- before = self.addCommitToRepo(
- orig_name, 'Pulling content from %s' % source_name,
- {'zuul.yaml': nt.read()})
+ source_name)
+ to_copy = ['zuul.yaml']
+ for playbook in os.listdir(os.path.join(source_path, 'playbooks')):
+ to_copy.append('playbooks/{}'.format(playbook))
+ commit_data = {}
+ for source_file in to_copy:
+ source_file_path = os.path.join(source_path, source_file)
+ with open(source_file_path, 'r') as nt:
+ commit_data[source_file] = nt.read()
+ before = self.addCommitToRepo(
+ orig_name, 'Pulling content from %s' % source_name,
+ commit_data)
return before
def addEvent(self, connection, event):