aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-03-16 15:57:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-16 15:57:03 +0000
commit9a2c5b0de21a9541d4ad2728e9c64e8d97d66dd6 (patch)
tree88422a52318c372d648220b46ab92fbd13414a8c /tests
parentb40b4b80ce06a1e2c96563e177df0e513c2187eb (diff)
parentbb5af4b9be1325b61c7f80e71c7d50892ae22956 (diff)
Merge "Implement 'show' command."
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/cli/cmd_metric_test.py6
-rw-r--r--tests/unit/cli/cmd_plan_test.py5
-rw-r--r--tests/unit/cli/cmd_qpi_test.py5
3 files changed, 10 insertions, 6 deletions
diff --git a/tests/unit/cli/cmd_metric_test.py b/tests/unit/cli/cmd_metric_test.py
index e121fb1e..cd496ad9 100644
--- a/tests/unit/cli/cmd_metric_test.py
+++ b/tests/unit/cli/cmd_metric_test.py
@@ -34,8 +34,10 @@ def test_run(runner):
def test_show(runner):
- result = runner.invoke(cli, ['metric', 'show', 'fake-metric'])
- assert result.output == ''
+ result = runner.invoke(cli, ['metric', 'show', 'dhrystone'])
+ assert 'Name: dhrystone' in result.output
+ assert 'Description: A synthetic computing benchmark program intended to be representative of' \
+ 'system (integer) programming.'
result = runner.invoke(cli, ['metric', 'show'])
assert 'Missing argument "name".' in result.output
diff --git a/tests/unit/cli/cmd_plan_test.py b/tests/unit/cli/cmd_plan_test.py
index 7c3335fc..30025ae0 100644
--- a/tests/unit/cli/cmd_plan_test.py
+++ b/tests/unit/cli/cmd_plan_test.py
@@ -32,8 +32,9 @@ def test_run(runner):
def test_show(runner):
- result = runner.invoke(cli, ['plan', 'show', 'fake-plan'])
- assert result.output == ''
+ result = runner.invoke(cli, ['plan', 'show', 'compute'])
+ assert 'Name: compute QPI' in result.output
+ assert 'Description: compute QPI profile'
result = runner.invoke(cli, ['plan', 'show'])
assert 'Missing argument "name".' in result.output
diff --git a/tests/unit/cli/cmd_qpi_test.py b/tests/unit/cli/cmd_qpi_test.py
index 7067d62c..3d2c2613 100644
--- a/tests/unit/cli/cmd_qpi_test.py
+++ b/tests/unit/cli/cmd_qpi_test.py
@@ -32,8 +32,9 @@ def test_run(runner):
def test_show(runner):
- result = runner.invoke(cli, ['qpi', 'show', 'fake-qpi'])
- assert result.output == ''
+ result = runner.invoke(cli, ['qpi', 'show', 'compute'])
+ assert 'Name: compute' in result.output
+ assert 'Description: sample performance index of computing' in result.output
result = runner.invoke(cli, ['qpi', 'show'])
assert 'Missing argument "name".' in result.output