зеркало из https://github.com/mozilla/treeherder.git
finished coverage
This commit is contained in:
Родитель
ff2954902e
Коммит
e0701ebdfe
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from treeherder.log_parser.artifactbuildercollection import ArtifactBuilderCollection
|
||||
from treeherder.log_parser.artifactbuilders import BuildbotLogViewArtifactBuilder
|
||||
from ..sampledata import SampleData
|
||||
|
||||
|
||||
def test_builders_as_list():
|
||||
|
@ -31,3 +30,35 @@ def test_default_builders():
|
|||
)
|
||||
assert isinstance(lpc.builders, list)
|
||||
assert len(lpc.builders) == 2
|
||||
|
||||
|
||||
def test_all_builders_complete():
|
||||
"""test no builders"""
|
||||
log = "mozilla-central_fedora-b2g_test-crashtest-1-bm54-tests1-linux-build50"
|
||||
url = "file://{0}".format(
|
||||
SampleData().get_log_path("{0}.txt.gz".format(log)))
|
||||
lpc = ArtifactBuilderCollection(
|
||||
url,
|
||||
)
|
||||
for builder in lpc.builders:
|
||||
for parser in builder.parsers:
|
||||
parser.parse_complete = True
|
||||
|
||||
lpc.parse()
|
||||
exp = {
|
||||
"Structured Log": {
|
||||
"header": {},
|
||||
"logurl": "file:///home/vagrant/treeherder-service/tests/sample_data/logs/mozilla-central_fedora-b2g_test-crashtest-1-bm54-tests1-linux-build50.txt.gz",
|
||||
"step_data": {
|
||||
"all_errors": [],
|
||||
"steps": []
|
||||
}
|
||||
},
|
||||
"Unknown Builder Job Artifact": {
|
||||
"errors": [],
|
||||
"logurl": "file:///home/vagrant/treeherder-service/tests/sample_data/logs/mozilla-central_fedora-b2g_test-crashtest-1-bm54-tests1-linux-build50.txt.gz",
|
||||
"tinderbox_printlines": []
|
||||
}
|
||||
}
|
||||
|
||||
assert lpc.artifacts == exp
|
Загрузка…
Ссылка в новой задаче