log=log,
)
+ async def test_fail(self):
+ """
+ This test creates a build and pretends a job failed
+ """
+ path = self.source_path("tests/data/beep-1.3-2.ip3.src.pfm")
+
+ # Create the build
+ with self.db.transaction():
+ build = await self._create_build(path, owner=self.user)
+
+ # Assign all jobs to the default builder
+ for job in build.jobs:
+ job.assign(self.builder)
+
+ # Pick the first job
+ job = build.jobs[0]
+
+ # Upload the log
+ log = await self._create_upload(
+ self.source_path("tests/data/beep-1.3-2.ip3.x86_64.log"),
+ )
+
+ # Pretend that the job has failed
+ await job.finished(
+ success=False,
+ log=log,
+ )
+
async def test_log(self):
"""
This test creates a build and tries to access the log