Fix broken project config in dynamic config test
The test test_dynamic_config_new_patchset updated its project config
with a non existent job. Fix this and also assert on the history.
Change-Id: Iaf49d2a223a3653570f75b1692507171ecfcf8fc
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index fb80660..3e0dc15 100644
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -173,6 +173,9 @@
in_repo_conf = textwrap.dedent(
"""
- job:
+ name: project-test1
+
+ - job:
name: project-test2
- project:
@@ -196,9 +199,16 @@
self.assertTrue(items[0].live)
self.executor_server.hold_jobs_in_build = False
+ self.executor_server.release('project-test1')
+ self.waitUntilSettled()
self.executor_server.release()
self.waitUntilSettled()
+ self.assertHistory([
+ dict(name='project-test2', result='ABORTED', changes='1,1'),
+ dict(name='project-test1', result='SUCCESS', changes='1,2'),
+ dict(name='project-test2', result='SUCCESS', changes='1,2')])
+
def test_dynamic_dependent_pipeline(self):
# Test dynamically adding a project to a
# dependent pipeline for the first time