diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-02-05 12:24:30 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-02-15 07:03:25 +0800 |
commit | cdb8e1be12b724e9f68c7e46c9a653ec37c502cb (patch) | |
tree | 647fb60a48282deab3387deb493a1b3200aa6d96 /tests/unit/loader | |
parent | 0f3ad6f2db26fb91190e47c89f77fb59b7601b84 (diff) |
Implement logfile collector and grep parser
JIRA: QTIP-207
JIRA: QTIP-208
Change-Id: Icc14d3097fb305e59df716636ef87504490c9d1b
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'tests/unit/loader')
-rw-r--r-- | tests/unit/loader/plan_test.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unit/loader/plan_test.py b/tests/unit/loader/plan_test.py index 81fd0bd3..4872b4cd 100644 --- a/tests/unit/loader/plan_test.py +++ b/tests/unit/loader/plan_test.py @@ -9,13 +9,15 @@ import pytest +from qtip.collector.logfile import LogfileCollector +from qtip.loader.plan import load_collector from qtip.loader.plan import Plan from qtip.loader.plan import PlanProp from qtip.loader.plan import QPISpec def test_init(plan): - assert plan.name == 'fake plan' + assert plan.name == 'doctor performance profiling' assert isinstance(plan.content, dict) for qpi in plan.qpis: assert isinstance(qpi, QPISpec) @@ -28,7 +30,7 @@ def test_init(plan): def test_list_all(benchmarks_root): plan_list = Plan.list_all(paths=[benchmarks_root]) - assert len(list(plan_list)) is 2 + assert len(list(plan_list)) is 1 for desc in plan_list: assert PlanProp.NAME in desc assert PlanProp.CONTENT in desc @@ -42,3 +44,7 @@ def test_content(plan): assert PlanProp.DESCRIPTION in content assert PlanProp.CONFIG in content assert PlanProp.QPIS in content + + +def test_load_collector(): + assert load_collector(LogfileCollector.TYPE) is LogfileCollector |