REST API: test /junit

Also fix a potential crash if the TestJob has no metadata associated.

Test #209

Signed-off-by: Rémi Duraffort <remi.duraffort@linaro.org>
12 jobs for issue_209 in 3 minutes and 5 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #24861
amd64
dispatcher-debian-10

00:02:43

passed #24859
amd64
dispatcher-debian-9

00:03:05

passed #24862
amd64
server-debian-10

00:02:11

failed #24860
amd64
server-debian-9

00:02:40

 
  Analyze
skipped #24863
amd64
black
skipped #24864
amd64
codestyle
skipped #24865
dind amd64 allowed to fail
sast
 
  Build
skipped #24868
amd64
amd64/pkg-debian-10
skipped #24867
amd64
amd64/pkg-debian-9
skipped #24866
amd64
doc
 
  Docker
skipped #24869
dind amd64
amd64/lava-dispatcher
skipped #24870
dind amd64
amd64/lava-server
 
Name Stage Failure
failed
server-debian-9 Test
WC1 /builds/ivoire/lava/lava_rest_app/tests.py cannot collect test class 'TestJob' because it has a __init__ constructor
==== 1 failed, 280 passed, 2 skipped, 23 pytest-warnings in 122.88 seconds =====
Starting PostgreSQL 9.6 database server: main.
psql: FATAL: the database system is starting up
Uploading artifacts...
common.xml: found 1 matching files
server.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=24860 responseStatus=201 Created token=i863CTyg
ERROR: Job failed: exit code 1